On 25 Mai, 02:13, "Dr. David Kirkby" <david.kir...@onetel.net> wrote: > On 05/24/10 05:26 PM, leif wrote: > > > Looks like the (fairly old) gcc/g++ in /usr/local is misconfigured; it > > definitely tries to link a 64-bit (x86_64) C++ program against the 32- > > bit libstdc++.so (in /usr/local/lib) instead of the 64-bit version in / > > usr/local/lib64. (Actually it is forced to do so by libtool.) > > I'm not so convinced this failure with 'libfplll' is a gcc problem, but rather > it is a 'libfplll' problem. > > I'm seeing the exact same issue with 'libfplll' on OpenSolaris. > > http://trac.sagemath.org/sage_trac/ticket/7864 > > The fact the original poster, his colleague and myself are all seeing this, > suggests to me that perhaps libfplll may be at fault in trying to link 64-bit > objects to 32-bit libstdc++ > > Other parts of the Sage build process are correctly using the 64-bit version > of > libstdc++.so on my OpenSolaris box - see for example this line.
What I wanted to say is that installing another version of gcc in /usr/ local on systems (like Linux distros) where there already is a "native" one (gcc) in /usr is non-trivial, i.e. this doesn't work "out of the box". With the "native" gcc, "-lstdc++" is passed to the linker (which would have worked in Matthew's installation, too), while with gcc in /usr/ local its absolute filename is passed. These are snippets from install.log, the first is from Sage 4.4.2 on Ubuntu 9.04 x86_64 with "native" gcc (4.3.3), the second is from Sage 4.4.2.rc0 on Ubuntu 9.04 x86_64 with gcc 4.5.0 in /usr/local: * "native" gcc in /usr: -----8<----------8<----------8<----------8<----------8<----------8<---------- g++ -DPACKAGE_NAME=\"libfplll\" -DPACKAGE_TARNAME=\"libfplll\" - DPACKAGE_VERSION=\"3.0.12\" "-DPACKAGE_STRING=\"libfplll 3.0.12\"" - DPACKAGE_BUGREPORT=\"\" -DPACKAGE=\"libfplll\" -DVERSION=\"3.0.12\" - DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 - DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 - DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 - DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 -DHAVE_LIBGMP=1 -DHAVE_LIBMPFR=1 - DSTDC_HEADERS=1 -DHAVE_FLOAT_H=1 -DHAVE_LIMITS_H=1 -DHAVE_STDLIB_H=1 - DHAVE_SYS_TIME_H=1 -DHAVE_UNISTD_H=1 -DHAVE_STDBOOL_H=1 -DHAVE_FLOOR=1 -DHAVE_POW=1 -DHAVE_RINT=1 -DHAVE_SQRT=1 -DHAVE_STRTOL=1 - DHAVE_LIBGMP=1 -DHAVE_LIBMPFR=1 -I. -I. -I/home/leif64/Sage/sage-4.4.2- too/local/include/ -fPIC -I/home/leif64/Sage/sage-4.4.2-too/local/ include/ -L/home/leif64/Sage/sage-4.4.2-too/local/lib -MT dummy.lo -MD -MP -MF .deps/dummy.Tpo -c dummy.cpp -fPIC -DPIC -o .libs/dummy.o g++ -DPACKAGE_NAME=\"libfplll\" -DPACKAGE_TARNAME=\"libfplll\" - DPACKAGE_VERSION=\"3.0.12\" "-DPACKAGE_STRING=\"libfplll 3.0.12\"" - DPACKAGE_BUGREPORT=\"\" -DPACKAGE=\"libfplll\" -DVERSION=\"3.0.12\" - DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 - DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 - DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 - DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 -DHAVE_LIBGMP=1 -DHAVE_LIBMPFR=1 - DSTDC_HEADERS=1 -DHAVE_FLOAT_H=1 -DHAVE_LIMITS_H=1 -DHAVE_STDLIB_H=1 - DHAVE_SYS_TIME_H=1 -DHAVE_UNISTD_H=1 -DHAVE_STDBOOL_H=1 -DHAVE_FLOOR=1 -DHAVE_POW=1 -DHAVE_RINT=1 -DHAVE_SQRT=1 -DHAVE_STRTOL=1 - DHAVE_LIBGMP=1 -DHAVE_LIBMPFR=1 -I. -I. -I/home/leif64/Sage/sage-4.4.2- too/local/include/ -fPIC -I/home/leif64/Sage/sage-4.4.2-too/local/ include/ -L/home/leif64/Sage/sage-4.4.2-too/local/lib -MT dummy.lo -MD -MP -MF .deps/dummy.Tpo -c dummy.cpp -o dummy.o >/dev/null 2>&1 /bin/bash ./libtool --tag=CXX --mode=link g++ -fPIC -I/home/leif64/ Sage/sage-4.4.2-too/local/include/ -L/home/leif64/Sage/sage-4.4.2-too/ local/lib -o libfplll.la -rpath /home/leif64/Sage/sage-4.4.2-too/ local/lib -version-info 1:0:1 dummy.lo -lgmp -lmpfr -lmpfr -lgmp - lmpfr -lgmp g++ -shared -nostdlib /usr/lib/gcc/x86_64-linux-gnu/4.3.3/../../../../ lib/crti.o /usr/lib/gcc/x86_64-linux-gnu/4.3.3/crtbeginS.o .libs/ dummy.o -Wl,--rpath -Wl,/home/leif64/Sage/sage-4.4.2-too/local/lib - Wl,--rpath -Wl,/home/leif64/Sage/sage-4.4.2-too/local/lib -L/home/ leif64/Sage/sage-4.4.2-too/local/lib /home/leif64/Sage/sage-4.4.2-too/ local/lib/libmpfr.so /home/leif64/Sage/sage-4.4.2-too/local/lib/ libgmp.so -L/home/leif64/Sage/sage-4.4.2-too/local/lib/../lib -L/usr/ lib/gcc/x86_64-linux-gnu/4.3.3 -L/usr/lib/gcc/x86_64-linux-gnu/ 4.3.3/../../../../lib -L/lib/../lib -L/usr/lib/../lib -L/usr/lib/gcc/ x86_64-linux-gnu/4.3.3/../../.. -lstdc++ -lm -lc -lgcc_s /usr/lib/gcc/ x86_64-linux-gnu/4.3.3/crtendS.o /usr/lib/gcc/x86_64-linux-gnu/ 4.3.3/../../../../lib/crtn.o -Wl,-soname -Wl,libfplll.so.0 -o .libs/ libfplll.so.0.1.0 (cd .libs && rm -f libfplll.so.0 && ln -s libfplll.so.0.1.0 libfplll.so.0) (cd .libs && rm -f libfplll.so && ln -s libfplll.so.0.1.0 libfplll.so) ar cru .libs/libfplll.a dummy.o ranlib .libs/libfplll.a creating libfplll.la (cd .libs && rm -f libfplll.la && ln -s ../libfplll.la libfplll.la) make[3]: Verlasse Verzeichnis '/home/leif64/Sage/sage-4.4.2-too/spkg/ build/libfplll-3.0.12.p0/src' -----8<----------8<----------8<----------8<----------8<----------8<---------- * "custom" gcc in /usr/local: -----8<----------8<----------8<----------8<----------8<----------8<---------- g++ -DPACKAGE_NAME=\"libfplll\" -DPACKAGE_TARNAME=\"libfplll\" - DPACKAGE_VERSION=\"3.0.12\" "-DPACKAGE_STRING=\"libfplll 3.0.12\"" - DPACKAGE_BUGREPORT=\"\" -DPACKAGE=\"libfplll\" -DVERSION=\"3.0.12\" - DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 - DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 - DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 - DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 -DHAVE_LIBGMP=1 -DHAVE_LIBMPFR=1 - DSTDC_HEADERS=1 -DHAVE_FLOAT_H=1 -DHAVE_LIMITS_H=1 -DHAVE_STDLIB_H=1 - DHAVE_SYS_TIME_H=1 -DHAVE_UNISTD_H=1 -DHAVE_STDBOOL_H=1 -DHAVE_FLOOR=1 -DHAVE_POW=1 -DHAVE_RINT=1 -DHAVE_SQRT=1 -DHAVE_STRTOL=1 - DHAVE_LIBGMP=1 -DHAVE_LIBMPFR=1 -I. -I. -I/home/leif/sage-4.4.2.rc0/ local/include/ -fPIC -I/home/leif/sage-4.4.2.rc0/local/include/ -L/ home/leif/sage-4.4.2.rc0/local/lib -MT dummy.lo -MD -MP -MF .deps/ dummy.Tpo -c dummy.cpp -fPIC -DPIC -o .libs/dummy.o g++ -DPACKAGE_NAME=\"libfplll\" -DPACKAGE_TARNAME=\"libfplll\" - DPACKAGE_VERSION=\"3.0.12\" "-DPACKAGE_STRING=\"libfplll 3.0.12\"" - DPACKAGE_BUGREPORT=\"\" -DPACKAGE=\"libfplll\" -DVERSION=\"3.0.12\" - DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 - DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 - DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 - DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 -DHAVE_LIBGMP=1 -DHAVE_LIBMPFR=1 - DSTDC_HEADERS=1 -DHAVE_FLOAT_H=1 -DHAVE_LIMITS_H=1 -DHAVE_STDLIB_H=1 - DHAVE_SYS_TIME_H=1 -DHAVE_UNISTD_H=1 -DHAVE_STDBOOL_H=1 -DHAVE_FLOOR=1 -DHAVE_POW=1 -DHAVE_RINT=1 -DHAVE_SQRT=1 -DHAVE_STRTOL=1 - DHAVE_LIBGMP=1 -DHAVE_LIBMPFR=1 -I. -I. -I/home/leif/sage-4.4.2.rc0/ local/include/ -fPIC -I/home/leif/sage-4.4.2.rc0/local/include/ -L/ home/leif/sage-4.4.2.rc0/local/lib -MT dummy.lo -MD -MP -MF .deps/ dummy.Tpo -c dummy.cpp -o dummy.o >/dev/null 2>&1 /bin/bash ./libtool --tag=CXX --mode=link g++ -fPIC -I/home/leif/ sage-4.4.2.rc0/local/include/ -L/home/leif/sage-4.4.2.rc0/local/lib - o libfplll.la -rpath /home/leif/sage-4.4.2.rc0/local/lib -version-info 1:0:1 dummy.lo -lgmp -lmpfr -lmpfr -lgmp -lmpfr -lgmp g++ -shared -nostdlib /usr/lib/gcc/x86_64-unknown-linux-gnu/ 4.5.0/../../../../lib64/crti.o /usr/lib/gcc/x86_64-unknown-linux-gnu/ 4.5.0/crtbeginS.o .libs/dummy.o -Wl,--rpath -Wl,/home/leif/ sage-4.4.2.rc0/local/lib -Wl,--rpath -Wl,/usr/lib/gcc/x86_64-unknown- linux-gnu/4.5.0 -Wl,--rpath -Wl,/home/leif/sage-4.4.2.rc0/local/lib - Wl,--rpath -Wl,/usr/lib/gcc/x86_64-unknown-linux-gnu/4.5.0 -L/home/ leif/sage-4.4.2.rc0/local/lib /home/leif/sage-4.4.2.rc0/local/lib/ libmpfr.so /home/leif/sage-4.4.2.rc0/local/lib/libgmp.so -L/usr/lib/ gcc/x86_64-unknown-linux-gnu/4.5.0 -L/usr/lib/gcc/x86_64-unknown-linux- gnu/4.5.0/../../../../lib64 -L/lib/../lib64 -L/usr/lib/../lib64 -L/usr/ lib/gcc/x86_64-unknown-linux-gnu/4.5.0/../../.. /usr/lib/gcc/x86_64- unknown-linux-gnu/4.5.0/libstdc++.so -lm -lc -lgcc_s /usr/lib/gcc/ x86_64-unknown-linux-gnu/4.5.0/crtendS.o /usr/lib/gcc/x86_64-unknown- linux-gnu/4.5.0/../../../../lib64/crtn.o -Wl,-soname -Wl,libfplll.so. 0 -o .libs/libfplll.so.0.1.0 (cd .libs && rm -f libfplll.so.0 && ln -s libfplll.so.0.1.0 libfplll.so.0) (cd .libs && rm -f libfplll.so && ln -s libfplll.so.0.1.0 libfplll.so) ar cru .libs/libfplll.a dummy.o ranlib .libs/libfplll.a creating libfplll.la (cd .libs && rm -f libfplll.la && ln -s ../libfplll.la libfplll.la) make[3]: Verlasse Verzeichnis '/home/leif/sage-4.4.2.rc0/spkg/build/ libfplll-3.0.12.p0/src' -----8<----------8<----------8<----------8<----------8<----------8<---------- (In contrast to OpenSolaris, 64-bit code is gcc's default on any(?) Linux/x86_64 system/distribution.) -Leif -- To post to this group, send an email to sage-devel@googlegroups.com To unsubscribe from this group, send an email to sage-devel+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-devel URL: http://www.sagemath.org