[MacPorts] #40155: serf1 @1.3.1: Build fails on PPC Tiger (Mac OS X 10.4.11) due to "more than one: -compatibility_version option specified"
MacPorts
noreply at macports.org
Tue Aug 27 11:49:13 PDT 2013
#40155: serf1 @1.3.1: Build fails on PPC Tiger (Mac OS X 10.4.11) due to "more than
one: -compatibility_version option specified"
------------------------------+---------------------
Reporter: Peter_Dyballa@… | Owner: blair@…
Type: defect | Status: new
Priority: Normal | Milestone:
Component: ports | Version: 2.2.99
Resolution: | Keywords: tiger
Port: serf1 |
------------------------------+---------------------
Comment (by mp@…):
Replying to [comment:12 ryandesign@…]:
> Since this patch fixes a build failure, no revision increase is
warranted.
Ah yes, because those systems where it already works don't need to be
rebuilt. Thanks.
----
> Patchfiles that are applied conditionally based on OS version are not
ideal, because someone updating the port on a different OS X version will
often not notice if and when such a patchfile needs to be updated. Better
to write a patch that can be safely applied unconditionally. That's also
what's going to be needed to get such a patch accepted upstream.
It is possible that the SConstruct patch works for all OS X versions, but
I only have Tiger to test on now.
The way it's currently handled as a special case for darwin is only to
increase the `compatibility_version` and `current_version` of the library
by one, because OS X wants the major version to start at 1, not 0. Would
be nice if someone could try the supplied patch for newer OS X versions.
In other words, it should be possible to replace
{{{
# 'man ld' says positive non-zero for the first number, so we add one.
# Mac's interpretation of compatibility is the same as our MINOR
version.
env.Append(LINKFLAGS='-Wl,-compatibility_version,%d' % (MINOR+1,))
env.Append(LINKFLAGS='-Wl,-current_version,%d.%d' % (MINOR+1, PATCH,))
}}}
with
{{{
env['SHLIBVERSION']='${%d}.0.0' % (MINOR+1,)
}}}
and let scons take care of it from there for all OS X versions.\\
I see it's a fairly new feature in scons:
RELEASE 2.3.0 - Mon, 02 Mar 2013 13:22:29 -0400
- Add SHLIBVERSION as an option that tells SharedLibrary to build\\a
versioned shared library and create the required symlinks.
----
> Why is "`build.args-append CC="MACOSX_DEPLOYMENT_TARGET=10.4
${configure.cc}"`" needed? MacPorts automatically sets
MACOSX_DEPLOYMENT_TARGET to the major OS X version, in all phases, on all
OS X versions.
Apparently, this is not recognized by `libtool` or `ld` here.\\
I found #16286, and when building `serf1`, in the log I can see that it
gets set to 10.4:
`---> Building serf1`\\
`DEBUG: Executing org.macports.build (serf1)`\\
`DEBUG: Environment: CPATH='/opt/local/include'
CC_PRINT_OPTIONS_FILE='/opt/local/var/macports/build/_Users_jag_src_macports_ports_www_serf1/serf1/work/.CC_PRINT_OPTIONS'
LIBRARY_PATH='/opt/local/lib' CC_PRINT_OPTIONS='YES'
MACOSX_DEPLOYMENT_TARGET='10.4'`
`DEBUG: Assembled command: 'cd
"/opt/local/var/macports/build/_Users_jag_src_macports_ports_www_serf1/serf1/work/serf-1.3.1"
&& /opt/local/bin/scons APR=/opt/local APU=/opt/local OPENSSL=/opt/local
PREFIX=/opt/local CC=/usr/bin/gcc-4.0 CPPFLAGS="-I/opt/local/include"
CFLAGS="-Os -arch ppc" LINKFLAGS="-L/opt/local/lib
-Wl,-headerpad_max_install_names -arch ppc"'`
but still libtool doesn't seem to get the `MACOSX_DEPLOYMENT_TARGET` and
this causes the linking of libserf to fail:
`ld: flag: -undefined dynamic_lookup can't be used with
MACOSX_DEPLOYMENT_TARGET environment variable set to: 10.1`\\
`/usr/libexec/gcc/powerpc-apple-darwin8/4.0.1/libtool: internal link edit
command failed`
That's the reason for the
{{{
build.args-append CC="MACOSX_DEPLOYMENT_TARGET=10.4 ${configure.cc}"
}}}
--
Ticket URL: <https://trac.macports.org/ticket/40155#comment:13>
MacPorts <http://www.macports.org/>
Ports system for OS X
More information about the macports-tickets
mailing list