From: David F. <fa...@cs...> - 2011-01-19 01:41:06
|
Hi, It looks like the libtool script is dropping the -m64 during link. Recall that path-prefix-10.6's g++ (compiler_wrapper) is set to i386 (32b). This is why libgmpxx.4.dylib-master.o is built for i386, which causes subsequent links to libgmpxx.dylib (x86_64) to fail. Peter (our libtool-er), can you comment on my observation? Is this a possible libtool bug? gmp-5.0.1's ltmain.sh is from libtool 2.2.6b. Relevant log exceprt below (note the link command): /bin/sh ./libtool --tag=CXX --mode=link g++ -O2 -pedantic -m64 -mtune=core2 -march=core2 -version-info 6:1:2 -L/sw-fresh/lib/x86_64 -L/sw-fresh/lib -o libgmpxx.la -rpath /sw-fresh/lib/x86_64/gmp5 dummy.lo cxx/isfuns.lo cxx/ismpf.lo cxx/ismpq.lo cxx/ismpz.lo cxx/ismpznw.lo cxx/osdoprnti.lo cxx/osfuns.lo cxx/osmpf.lo cxx/osmpq.lo cxx/osmpz.lo libgmp.la libtool: link: g++ -r -keep_private_externs -nostdlib -o .libs/libgmpxx.4.dylib-master.o .libs/dummy.o cxx/.libs/isfuns.o cxx/.libs/ismpf.o cxx/.libs/ismpq.o cxx/.libs/ismpz.o cxx/.libs/ismpznw.o cxx/.libs/osdoprnti.o cxx/.libs/osfuns.o cxx/.libs/osmpf.o cxx/.libs/osmpq.o cxx/.libs/osmpz.o ld: warning: in .libs/dummy.o, file was built for unsupported file format which is not the architecture being linked (i386) ld: warning: in cxx/.libs/isfuns.o, file was built for unsupported file format which is not the architecture being linked (i386) ld: warning: in cxx/.libs/ismpf.o, file was built for unsupported file format which is not the architecture being linked (i386) ld: warning: in cxx/.libs/ismpq.o, file was built for unsupported file format which is not the architecture being linked (i386) ld: warning: in cxx/.libs/ismpz.o, file was built for unsupported file format which is not the architecture being linked (i386) ld: warning: in cxx/.libs/ismpznw.o, file was built for unsupported file format which is not the architecture being linked (i386) ld: warning: in cxx/.libs/osdoprnti.o, file was built for unsupported file format which is not the architecture being linked (i386) ld: warning: in cxx/.libs/osfuns.o, file was built for unsupported file format which is not the architecture being linked (i386) ld: warning: in cxx/.libs/osmpf.o, file was built for unsupported file format which is not the architecture being linked (i386) ld: warning: in cxx/.libs/osmpq.o, file was built for unsupported file format which is not the architecture being linked (i386) ld: warning: in cxx/.libs/osmpz.o, file was built for unsupported file format which is not the architecture being linked (i386) libtool: link: g++ -dynamiclib -Wl,-undefined -Wl,dynamic_lookup -o .libs/libgmpxx.4.dylib .libs/libgmpxx.4.dylib-master.o -L/sw-fresh/lib/x86_64 -L/sw-fresh/lib ./.libs/libgmp.dylib -m64 -mtune=core2 -march=core2 -install_name /sw-fresh/lib/x86_64/gmp5/libgmpxx.4.dylib -compatibility_version 7 -current_version 7.1 ld: warning: directory '/sw-fresh/lib/x86_64' following -L not found ld: warning: in .libs/libgmpxx.4.dylib-master.o, file was built for i386 which is not the architecture being linked (x86_64) libtool: link: dsymutil .libs/libgmpxx.4.dylib || : warning: no debug symbols in executable (-arch x86_64) libtool: link: (cd ".libs" && rm -f "libgmpxx.dylib" && ln -s "libgmpxx.4.dylib" "libgmpxx.dylib") libtool: link: ( cd ".libs" && rm -f "libgmpxx.la" && ln -s "../libgmpxx.la" "libgmpxx.la" ) Fang > If you examine the build log (ours should match), the failure is happening > when a .libs/libgmpxx.4.dylib-master.o is being linked, which happens to > be the only object that is i386, while all others are x86_64 (using file > *.o). the i386 intermediate step causes x86_64 symbols to be lost > somehow. There should be no business in compiling/linking an i386 object, > so I need to figure out why this is happening amidst all the compile/link > flags... > > Fang > >> I was finally able to reproduce this on a fresh bootstrap, but never on my >> primary fink, even after removing as many gmp* packages as possible. >> Anyhow, it looks like this is due to some architecture mismatch during >> compile or link earlier in the build. Will look into it further... >> >> Fang >> >>> -----BEGIN PGP SIGNED MESSAGE----- >>> Hash: SHA1 >>> >>> On a clean install of the package, with the following system parameters: >>> >>> $ fink -V >>> Package manager version: 0.29.99.cvs >>> Distribution version: selfupdate-cvs Wed Jan 12 09:20:24 2011, 10.6, x86_64 >>> Trees: stable/main stable/crypto unstable/main unstable/crypto >>> local/main local/injected >>> >>> $ fink list xcode | tail -n 1 >>> i xcode 3.2.5-1 [virtual package representing the developer tools] >>> >>> I have a linker failure as below: >>> >>> ... >>> g++ -DHAVE_CONFIG_H -I. -I../.. -I../.. -I../../tests -fexceptions >>> - -I/sw32/include -O2 -pedantic -m64 -mtune=core2 -march=core2 -c -o >>> t-istream.o t-istream.cc >>> /bin/sh ../../libtool --tag=CXX --mode=link g++ -O2 -pedantic -m64 >>> - -mtune=core2 -march=core2 -L/sw32/lib/x86_64 -L/sw32/lib -o t-istream >>> t-istream.o -L../../.libs ../../tests/libtests.la ../../libgmpxx.la >>> ../../libgmp.la >>> libtool: link: g++ -O2 -pedantic -m64 -mtune=core2 -march=core2 -o >>> .libs/t-istream t-istream.o >>> - -L/sw32/src/fink.build/gmp5-64bit-5.0.1-5/gmp-5.0.1/.libs >>> - -L/sw32/lib/x86_64 -L/sw32/lib ../../tests/.libs/libtests.a >>> ../../.libs/libgmpxx.dylib >>> /sw32/src/fink.build/gmp5-64bit-5.0.1-5/gmp-5.0.1/.libs/libgmp.dylib >>> ../../.libs/libgmp.dylib >>> ld: warning: directory '/sw32/lib/x86_64' following -L not found >>> Undefined symbols: >>> "operator>>(std::basic_istream<char, std::char_traits<char> >&, >>> __mpf_struct*)", referenced from: >>> check_mpf() in t-istream.o >>> "operator>>(std::basic_istream<char, std::char_traits<char> >&, >>> __mpq_struct*)", referenced from: >>> check_mpq() in t-istream.o >>> "operator>>(std::basic_istream<char, std::char_traits<char> >&, >>> __mpz_struct*)", referenced from: >>> check_mpz() in t-istream.o >>> ld: symbol(s) not found >>> collect2: ld returned 1 exit status >>> make[4]: *** [t-istream] Error 1 >>> >>> - -- >>> Alexander Hansen, Ph.D. >>> Fink User Liaison >>> -----BEGIN PGP SIGNATURE----- >>> Version: GnuPG v1.4.11 (Darwin) >>> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ >>> >>> iEYEARECAAYFAk0zkeUACgkQB8UpO3rKjQ+6OACbBCU0ppC7q3BkQ1LXoRQxZUOl >>> vwQAoJgexJaS6BIqKRBpC5RuTTclRmcb >>> =U8Zb >>> -----END PGP SIGNATURE----- >>> >>> ------------------------------------------------------------------------------ >>> Protect Your Site and Customers from Malware Attacks >>> Learn about various malware tactics and how to avoid them. Understand >>> malware threats, the impact they can have on your business, and how you >>> can protect your company and customers by using code signing. >>> http://p.sf.net/sfu/oracle-sfdevnl >>> _______________________________________________ >>> Fink-devel mailing list >>> Fin...@li... >>> http://news.gmane.org/gmane.os.apple.fink.devel >>> Subscription management: >>> https://lists.sourceforge.net/lists/listinfo/fink-devel >>> >> >> David Fang >> http://www.csl.cornell.edu/~fang/ >> http://www.achronix.com/ >> >> >> ------------------------------------------------------------------------------ >> Protect Your Site and Customers from Malware Attacks >> Learn about various malware tactics and how to avoid them. Understand >> malware threats, the impact they can have on your business, and how you >> can protect your company and customers by using code signing. >> http://p.sf.net/sfu/oracle-sfdevnl >> _______________________________________________ >> Fink-devel mailing list >> Fin...@li... >> http://news.gmane.org/gmane.os.apple.fink.devel >> Subscription management: >> https://lists.sourceforge.net/lists/listinfo/fink-devel >> > > David Fang > http://www.csl.cornell.edu/~fang/ > http://www.achronix.com/ > > > ------------------------------------------------------------------------------ > Protect Your Site and Customers from Malware Attacks > Learn about various malware tactics and how to avoid them. Understand > malware threats, the impact they can have on your business, and how you > can protect your company and customers by using code signing. > http://p.sf.net/sfu/oracle-sfdevnl > _______________________________________________ > Fink-devel mailing list > Fin...@li... > http://news.gmane.org/gmane.os.apple.fink.devel > Subscription management: > https://lists.sourceforge.net/lists/listinfo/fink-devel > David Fang http://www.csl.cornell.edu/~fang/ http://www.achronix.com/ |