ld warnings when building boost on Fedora Core 4 with gcc 3.4.4
I've recently switched my Linux system to Fedora Core 4 which has gcc 4.0.1 as the default compiler. Since the code I'm developing must be built with gcc 3.4.4, I have installed a copy of gcc 3.4.4 at /usr/local/gcc/gcc34. When I build boost with this compiler I get hundred of similar errors from /usr/bin/ld. I'll attach those warnings to the end of this email. I invoked the build with the command: ./bjam -d2 --with-serialization -sGCC_ROOT_DIRECTORY=/usr/local/gcc/gcc34 -sBUILD="release" I do see boost get built using my specified compiler but get all the warnings. Building boost without specifying the gcc 3.4.4 compiler does not produce any errors. I suspect the problem has something to do with the version of ld that gets invoked but even if it does, how would I fix it. ld is version: GNU ld version 2.15.94.0.2.2 20041220 Can anyone help? Build output follows in the proximity of the warnings: LD_LIBRARY_PATH=bin/boost/libs/serialization/build/libboost_serialization.so/gcc/release/shared-linkable-true:$LD_LIBRARY_PATH export LD_LIBRARY_PATH "/usr/local/gcc/gcc34/bin/g++" -s -fPIC -shared -o "bin/boost/libs/serialization/build/libboost_serialization.so/gcc/release/shared-linkable-true/libboost_serialization-gcc-1_33.so.1.33.0" -L"/usr/local/gcc/gcc34/lib" "bin/boost/libs/serialization/build/libboost_serialization.so/gcc/release/shared-linkable-true/basic_archive.o" "bin/boost/libs/serialization/build/libboost_serialization.so/gcc/release/shared-linkable-true/basic_archive_impl.o" "bin/boost/libs/serialization/build/libboost_serialization.so/gcc/release/shared-linkable-true/basic_iarchive.o" "bin/boost/libs/serialization/build/libboost_serialization.so/gcc/release/shared-linkable-true/basic_oarchive.o" "bin/boost/libs/serialization/build/libboost_serialization.so/gcc/release/shared-linkable-true/basic_iserializer.o" "bin/boost/libs/serialization/build/libboost_serialization.so/gcc/release/shared-linkable-true/basic_oserializer.o" "bin/boost/libs/serialization/build/libboost_serialization.so/gcc/release/shared-linkable-true/basic_pointer_iserializer.o" "bin/boost/libs/serialization/build/libboost_serialization.so/gcc/release/shared-linkable-true/basic_pointer_oserializer.o" "bin/boost/libs/serialization/build/libboost_serialization.so/gcc/release/shared-linkable-true/basic_serializer_map.o" "bin/boost/libs/serialization/build/libboost_serialization.so/gcc/release/shared-linkable-true/basic_text_iprimitive.o" "bin/boost/libs/serialization/build/libboost_serialization.so/gcc/release/shared-linkable-true/basic_text_oprimitive.o" "bin/boost/libs/serialization/build/libboost_serialization.so/gcc/release/shared-linkable-true/basic_xml_archive.o" "bin/boost/libs/serialization/build/libboost_serialization.so/gcc/release/shared-linkable-true/binary_iarchive.o" "bin/boost/libs/serialization/build/libboost_serialization.so/gcc/release/shared-linkable-true/binary_oarchive.o" "bin/boost/libs/serialization/build/libboost_serialization.so/gcc/release/shared-linkable-true/extended_type_info.o" "bin/boost/libs/serialization/build/libboost_serialization.so/gcc/release/shared-linkable-true/extended_type_info_no_rtti.o" "bin/boost/libs/serialization/build/libboost_serialization.so/gcc/release/shared-linkable-true/extended_type_info_typeid.o" "bin/boost/libs/serialization/build/libboost_serialization.so/gcc/release/shared-linkable-true/polymorphic_iarchive.o" "bin/boost/libs/serialization/build/libboost_serialization.so/gcc/release/shared-linkable-true/polymorphic_oarchive.o" "bin/boost/libs/serialization/build/libboost_serialization.so/gcc/release/shared-linkable-true/stl_port.o" "bin/boost/libs/serialization/build/libboost_serialization.so/gcc/release/shared-linkable-true/text_iarchive.o" "bin/boost/libs/serialization/build/libboost_serialization.so/gcc/release/shared-linkable-true/text_oarchive.o" "bin/boost/libs/serialization/build/libboost_serialization.so/gcc/release/shared-linkable-true/void_cast.o" "bin/boost/libs/serialization/build/libboost_serialization.so/gcc/release/shared-linkable-true/xml_grammar.o" "bin/boost/libs/serialization/build/libboost_serialization.so/gcc/release/shared-linkable-true/xml_iarchive.o" "bin/boost/libs/serialization/build/libboost_serialization.so/gcc/release/shared-linkable-true/xml_oarchive.o" -Wl,-rpath-link,. -Wl,-soname,libboost_serialization-gcc-1_33.so.1.33.0 ln -fs "libboost_serialization-gcc-1_33.so.1.33.0" "bin/boost/libs/serialization/build/libboost_serialization.so/gcc/release/shared-linkable-true/libboost_serialization-gcc-1_33.so" /usr/bin/ld: `.L3' referenced in section `.rodata' of bin/boost/libs/serialization/build/libboost_serialization.so/gcc/release/shared-linkable-true/basic_oarchive.o: defined in discarded section `.gnu.linkonce.t._ZNK5boost7archive17archive_exception4whatEv' of bin/boost/libs/serialization/build/libboost_serialization.so/gcc/release/shared-linkable-true/basic_oarchive.o /usr/bin/ld: `.L13' referenced in section `.rodata' of bin/boost/libs/serialization/build/libboost_serialization.so/gcc/release/shared-linkable-true/basic_oarchive.o: defined in discarded section `.gnu.linkonce.t._ZNK5boost7archive17archive_exception4whatEv' of bin/boost/libs/serialization/build/libboost_serialization.so/gcc/release/shared-linkable-true/basic_oarchive.o /usr/bin/ld: `.L4' referenced in section `.rodata' of bin/boost/libs/serialization/build/libboost_serialization.so/gcc/release/shared-linkable-true/basic_oarchive.o: defined in discarded section `.gnu.linkonce.t._ZNK5boost7archive17archive_exception4whatEv' of bin/boost/libs/serialization/build/libboost_serialization.so/gcc/release/shared-linkable-true/basic_oarchive.o /usr/bin/ld: `.L5' referenced in section `.rodata' of bin/boost/libs/serialization/build/libboost_serialization.so/gcc/release/shared-linkable-true/basic_oarchive.o: defined in discarded section `.gnu.linkonce.t._ZNK5boost7archive17archive_exception4whatEv' of bin/boost/libs/serialization/build/libboost_serialization.so/gcc/release/shared-linkable-true/basic_oarchive.o /usr/bin/ld: `.L6' referenced in section `.rodata' of bin/boost/libs/serialization/build/libboost_serialization.so/gcc/release/shared-linkable-true/basic_oarchive.o: defined in discarded section `.gnu.linkonce.t._ZNK5boost7archive17archive_exception4whatEv' of bin/boost/libs/serialization/build/libboost_serialization.so/gcc/release/shared-linkable-true/basic_oarchive.o /usr/bin/ld: `.L7' referenced in section `.rodata' of bin/boost/libs/serialization/build/libboost_serialization.so/gcc/release/shared-linkable-true/basic_oarchive.o: defined in discarded section `.gnu.linkonce.t._ZNK5boost7archive17archive_exception4whatEv' of bin/boost/libs/serialization/build/libboost_serialization.so/gcc/release/shared-linkable-true/basic_oarchive.o /usr/bin/ld: `.L8' referenced in section `.rodata' of bin/boost/libs/serialization/build/libboost_serialization.so/gcc/release/shared-linkable-true/basic_oarchive.o: defined in discarded section `.gnu.linkonce.t._ZNK5boost7archive17archive_exception4whatEv' of bin/boost/libs/serialization/build/libboost_serialization.so/gcc/release/shared-linkable-true/basic_oarchive.o /usr/bin/ld: `.L9' referenced in section `.rodata' of bin/boost/libs/serialization/build/libboost_serialization.so/gcc/release/shared-linkable-true/basic_oarchive.o: defined in discarded section `.gnu.linkonce.t._ZNK5boost7archive17archive_exception4whatEv' of bin/boost/libs/serialization/build/libboost_serialization.so/gcc/release/shared-linkable-true/basic_oarchive.o
Ken Roser wrote:
I've recently switched my Linux system to Fedora Core 4 which has gcc 4.0.1 as the default compiler. Since the code I'm developing must be built with gcc 3.4.4, I have installed a copy of gcc 3.4.4 at /usr/local/gcc/gcc34. When I build boost with this compiler I get hundred of similar errors from /usr/bin/ld. I'll attach those warnings to the end of this email. ... /usr/bin/ld: `.L8' referenced in section `.rodata' of
This is a bug in gcc: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16625 For some reasons, gcc developers don't give it much priority, maybe if you add "me too" comment to the bug it will help a bit.
I do see boost get built using my specified compiler but get all the warnings. Building boost without specifying the gcc 3.4.4 compiler does not produce any errors. I suspect the problem has something to do with the version of ld that gets invoked but even if it does, how would I fix it. ld is version:
GNU ld version 2.15.94.0.2.2 20041220
You can downgrade binutils to suppress the warning (the bug report above names exact version number). But this is just workaround. - Volodya
Per the suggestion, I installed a copy of binutils-2.15.94.0.1 from http://www.kernel.org/pub/linux/devel/binutils/binutils-2.15.94.0.1.tar.bz2 Now I get an error that seems to indicate this version of ld doesn't like the format of my /usr/lib/libc.so file. The error is: /usr/local/gcc/gcc34/lib/gcc/i686-pc-linux-gnu/3.4.4/../../../../i686-pc-linux-gnu/bin/ld:/usr/lib/libc.so: file format not recognized; treating as linker script /usr/local/gcc/gcc34/lib/gcc/i686-pc-linux-gnu/3.4.4/../../../../i686-pc-linux-gnu/bin/ld:/usr/lib/libc.so:5: syntax error collect2: ld returned 1 exit status ...failed gcc-Link-action bin/boost/libs/serialization/build/libboost_serialization.so/gcc/release/shared-linkable-true/libboost_serialization-gcc-1_33.so... ...skipped <@boost!libs!serialization!build/libboost_wserialization.so/gcc/release/shared-linkable-true>libboost_wserialization-gcc-1_33.so for lack of <@boost!libs!serialization!build/libboost_serialization.so/gcc/release/shared-linkable-true>libboost_serialization-gcc-1_33.so... /usr/lib/libc actually contains the following: /* GNU ld script Use the shared library, but some functions are only in the static library, so try that secondarily. */ OUTPUT_FORMAT(elf32-i386) GROUP ( /lib/libc.so.6 /usr/lib/libc_nonshared.a AS_NEEDED ( /lib/ld-linux.so.2 ) ) So what compiler does work with boost on Fedora Core 4? Just the gcc 4.0 series? Vladimir Prus wrote:
Ken Roser wrote:
I've recently switched my Linux system to Fedora Core 4 which has gcc 4.0.1 as the default compiler. Since the code I'm developing must be built with gcc 3.4.4, I have installed a copy of gcc 3.4.4 at /usr/local/gcc/gcc34. When I build boost with this compiler I get hundred of similar errors from /usr/bin/ld. I'll attach those warnings to the end of this email.
...
/usr/bin/ld: `.L8' referenced in section `.rodata' of
This is a bug in gcc:
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16625
For some reasons, gcc developers don't give it much priority, maybe if you add "me too" comment to the bug it will help a bit.
I do see boost get built using my specified compiler but get all the warnings. Building boost without specifying the gcc 3.4.4 compiler does not produce any errors. I suspect the problem has something to do with the version of ld that gets invoked but even if it does, how would I fix it. ld is version:
GNU ld version 2.15.94.0.2.2 20041220
You can downgrade binutils to suppress the warning (the bug report above names exact version number). But this is just workaround.
- Volodya
_______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
participants (2)
-
Ken Roser
-
Vladimir Prus