Re: gcc 4.2 on 10.4 tiger: ld: unknown flag: -compatibility_version
site_archiver@lists.apple.com Delivered-To: darwin-dev@lists.apple.com User-agent: Thunderbird 2.0.0.14 (X11/20080501) YJZ wrote:
I find four separate copies of "libtool" in ~/gtk/ where the "jhbuild" process builds "gettext 0.16". Please find their "--config" output below. I also find other libtools throughout my box, but only the top two listed below accepts the "--config", whose output I can provide if necessary. Since Apple's gcc 4.2.1 builds gettext 0.17 fine, could the issue be attributed to gettext 0.16 using the bug-infected libtool?
A side question I have now is: How come there's no /path/to/4.2.1/libtool?
./opt/gtk/bin/libtool ./usr/local/apr/build/libtool
These two are GNU libtool.
./Developer/usr/bin/libtool ./Developer/usr/libexec/gcc/i686-apple-darwin8/4.0.1/libtool ./Developer/usr/libexec/gcc/powerpc-apple-darwin8/4.0.1/libtool
These are Apple's libtool.
./opt/gtk/share/libtool GNU ./usr/bin/libtool ./usr/libexec/gcc/i686-apple-darwin8/4.0.1/libtool ./usr/libexec/gcc/powerpc-apple-darwin8/4.0.1/libtool Apple ./usr/share/libtool GNU (but it is a directory).
See man glibtool and libtool on Mac OS X for some more information Some time ago I added support for IBM's xlc to GNU libtool (I have since removed it). At that time, both xlc and gcc used /usr/bin/libtool to create shared libraries, but xlc did not grok -compatibility_version etc, so I quoted it with -Wl, and all was well. Recently Apple changed to not use /usr/bin/libtool to create shared libraries (a good thing), that change broke building gcc but nothing else, I think because gcc continued to use collect2 to link shared libraries and that did understand -compatibility_version etc. Now, I can only assume, gcc calls ld directly, so all such older versions of libtool will fail. Easiest solutions are to update the libtool version in the package that you are attempting to build (autoreconf -fi) or simple sed out ${wl} before the -compatibility_version etc in ltmain.sh This is what I committed when the gcc build problem was reported: http://git.savannah.gnu.org/gitweb/?p=libtool.git;a=commitdiff;h=eee885d7c58... Using sed to remove the '${wl}' from verstring in ltmain.sh before configure should work fine: sed -e '/verstring=/s/\${wl}//g' < ltmain.sh > ltmain.fixed; mv ltmain.fixed ltmain.sh (untested) Peter -- Peter O'Gorman http://pogma.com _______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-dev mailing list (Darwin-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-dev/site_archiver%40lists.appl... This email sent to site_archiver@lists.apple.com
participants (1)
-
Peter O'Gorman