After bootstraping the newly built gcc, make fails on linking libstdc++-v3: /usr/src/gcc-3.4.3-objdir/gcc/xgcc -shared-libgcc -B/usr/src/gcc-3.4.3-objdir/ gcc/ -nostdinc++ -L/usr/src/gcc-3.4.3-objdir/powerpc-unknown-linux-gnu/nof/ libstdc++-v3/src -L/usr/src/gcc-3.4.3-objdir/powerpc-unknown-linux-gnu/nof/ libstdc++-v3/src/.libs -B/usr/local/powerpc-unknown-linux-gnu/bin/ -B/usr/local/ powerpc-unknown-linux-gnu/lib/ -isystem /usr/local/powerpc-unknown-linux-gnu/ include -isystem /usr/local/powerpc-unknown-linux-gnu/sys-include -msoft-float -fPIC -mstrict-align -shared /usr/lib/crti.o /usr/src/gcc-3.4.3-objdir/gcc/nof/ crtbeginS.o .libs/allocator.o .libs/codecvt.o .libs/complex_io.o .libs/ctype.o .libs/debug.o .libs/debug_list.o .libs/functexcept.o .libs/globals_locale.o . libs/globals_io.o .libs/ios.o .libs/ios_failure.o .libs/ios_init.o .libs/ ios_locale.o .libs/limits.o .libs/list.o .libs/locale.o .libs/locale_init.o . libs/locale_facets.o .libs/localename.o .libs/stdexcept.o .libs/strstream.o . libs/tree.o .libs/allocator-inst.o .libs/concept-inst.o .libs/fstream-inst.o . libs/ext-inst.o .libs/io-inst.o .libs/istream-inst.o .libs/locale-inst.o .libs/ locale-misc-inst.o .libs/misc-inst.o .libs/ostream-inst.o .libs/sstream-inst.o . libs/streambuf-inst.o .libs/string-inst.o .libs/valarray-inst.o .libs/wlocale- inst.o .libs/wstring-inst.o .libs/atomicity.o .libs/codecvt_members.o .libs/ collate_members.o .libs/ctype_members.o .libs/messages_members.o .libs/ monetary_members.o .libs/numeric_members.o .libs/time_members.o .libs/ basic_file.o .libs/c++locale.o .libs/libstdc++.lax/libmath.a/stubs.o .libs/ libstdc++.lax/libsupc++convenience.a/del_op.o .libs/libstdc++.lax/ libsupc++convenience.a/del_opnt.o .libs/libstdc++.lax/libsupc++convenience.a/ del_opv.o .libs/libstdc++.lax/libsupc++convenience.a/del_opvnt.o .libs/ libstdc++.lax/libsupc++convenience.a/eh_alloc.o .libs/libstdc++.lax/ libsupc++convenience.a/eh_aux_runtime.o .libs/libstdc++.lax/ libsupc++convenience.a/eh_catch.o .libs/libstdc++.lax/libsupc++convenience.a/ eh_exception.o .libs/libstdc++.lax/libsupc++convenience.a/eh_globals.o .libs/ libstdc++.lax/libsupc++convenience.a/eh_personality.o .libs/libstdc++.lax/ libsupc++convenience.a/eh_term_handler.o .libs/libstdc++.lax/ libsupc++convenience.a/eh_terminate.o .libs/libstdc++.lax/libsupc++convenience. a/eh_throw.o .libs/libstdc++.lax/libsupc++convenience.a/eh_type.o .libs/ libstdc++.lax/libsupc++convenience.a/eh_unex_handler.o .libs/libstdc++.lax/ libsupc++convenience.a/guard.o .libs/libstdc++.lax/libsupc++convenience.a/ new_handler.o .libs/libstdc++.lax/libsupc++convenience.a/new_op.o .libs/ libstdc++.lax/libsupc++convenience.a/new_opnt.o .libs/libstdc++.lax/ libsupc++convenience.a/new_opv.o .libs/libstdc++.lax/libsupc++convenience.a/ new_opvnt.o .libs/libstdc++.lax/libsupc++convenience.a/pure.o .libs/libstdc++. lax/libsupc++convenience.a/tinfo.o .libs/libstdc++.lax/libsupc++convenience.a/ tinfo2.o .libs/libstdc++.lax/libsupc++convenience.a/vec.o .libs/libstdc++.lax/ libsupc++convenience.a/vterminate.o .libs/libstdc++.lax/libsupc++convenience.a/ cp-demangle.o -L/usr/src/gcc-3.4.3-objdir/powerpc-unknown-linux-gnu/nof/ libstdc++-v3/src -L/usr/src/gcc-3.4.3-objdir/powerpc-unknown-linux-gnu/nof/ libstdc++-v3/src/.libs -lm ../libmath/.libs/libmath.a -lm ../libsupc++/.libs/ libsupc++convenience.a -lm -L/usr/src/gcc-3.4.3-objdir/gcc/nof -L/usr/src/gcc-3. 4.3-objdir/gcc -L/usr/local/powerpc-unknown-linux-gnu/bin -L/usr/local/powerpc- unknown-linux-gnu/lib -L/usr/local/lib/gcc/powerpc-unknown-linux-gnu/../../../ powerpc-unknown-linux-gnu/lib -L/usr/local/lib/gcc/powerpc-unknown-linux-gnu/../ .. -lgcc_s_nof -lc -lgcc_s_nof -lm -lgcc_s_nof -lc -lgcc_s_nof /usr/src/gcc-3. 4.3-objdir/gcc/nof/crtsavres.o /usr/src/gcc-3.4.3-objdir/gcc/nof/crtendS.o /usr/ lib/crtn.o -o .libs/libstdc++.so.6.0.3 /usr/lib/crti.o(.init+0x0): In function `_init': : multiple definition of `_init' /usr/lib/crti.o(.init+0x0): first defined here /usr/lib/crti.o(.fini+0x0): In function `_fini': : multiple definition of `_fini' /usr/lib/crti.o(.fini+0x0): first defined here /usr/src/gcc-3.4.3-objdir/gcc/nof/crtbeginS.o(.data.rel+0x0): multiple definition of `__dso_handle' /usr/src/gcc-3.4.3-objdir/gcc/nof/crtbeginS.o(.data.rel+0x0): first defined here /usr/src/gcc-3.4.3-objdir/gcc/nof/crtsavres.o(.text+0x0): In function `_savefpr_14': : multiple definition of `_savefpr_14' [repeat multiple definition errors for _savefpr_14 -> 31] [repeat multiple definition errors for _savegpr_14 -> 31] [repeat multiple definition errors for _restfpr_14 -> 31] [repeat multiple definition errors for _restgpr_14 -> 31] [repeat multiple definition errors for _restfpr_14_x -> 31] [repeat multiple definition errors for _restgpr_14_x -> 31] collect2: ld returned 1 exit status make[7]: *** [libstdc++.la] Error 1 make[7]: Leaving directory `/usr/src/gcc-3.4.3-objdir/powerpc-unknown-linux-gnu/ nof/libstdc++-v3/src' make[6]: *** [all-recursive] Error 1 make[6]: Leaving directory `/usr/src/gcc-3.4.3-objdir/powerpc-unknown-linux-gnu/ nof/libstdc++-v3' make[5]: *** [all] Error 2 make[5]: Leaving directory `/usr/src/gcc-3.4.3-objdir/powerpc-unknown-linux-gnu/ nof/libstdc++-v3' make[4]: *** [multi-do] Error 1 make[4]: Leaving directory `/usr/src/gcc-3.4.3-objdir/powerpc-unknown-linux-gnu/ libstdc++-v3' make[3]: *** [all-multi] Error 2 make[3]: Leaving directory `/usr/src/gcc-3.4.3-objdir/powerpc-unknown-linux-gnu/ libstdc++-v3' make[2]: *** [all] Error 2 make[2]: Leaving directory `/usr/src/gcc-3.4.3-objdir/powerpc-unknown-linux-gnu/ libstdc++-v3' make[1]: *** [all-target-libstdc++-v3] Error 2 make[1]: Leaving directory `/usr/src/gcc-3.4.3-objdir' make: *** [bootstrap] Error 2 bash-3.00:/usr/src/gcc-3.4.3-objdir$ configure (in this particular case) was run with: ../gcc-3.4.3/configure --with-cpu=603 --enable-languages=c,c++ --disable- checking --disable-altivec I previously tried configure with no options and got the same result. Previous versions of GCC (3.3.3 and 3.4.0) both resulted in this same problem -- however I did not need a c++ compiler at the time, so I simply specified 'c' for enable- languages and left it at that. I've tried searching around for anything related to this and haven't had any luck -- am I the only one? :/ Thanks to anyone who can help out.
libtool looks like it is messing up.
Can you attach the config.log that is in libstdc++ directory?
Created attachment 7740 [details] requested config.log from failed compile taken from "/usr/src/gcc-3.4.3-objdir/powerpc-unknown-linux-gnu/libstdc++-v3"
Created attachment 7741 [details] requested config.log from failed compile (in nof) taken from "/usr/src/gcc-3.4.3-objdir/powerpc-unknown-linux-gnu/nof/libstdc++-v3"
I attached the config.log file you requested. I wasn't sure if you were interested in the one also located in nof/, so I attached them both. If it matters at all, I'm using binutils-2.13.90.0.10 (built with gcc-3.4.3) and glibc-2.2.3. Let me know if I can be of any more help. I'm still trying to trace it down on my end here. Thanks!
Have you noticed the successful build reports? They are here: http://gcc.gnu.org/gcc-3.4/buildstat.html So, this is possible. You just need to figure out how your setup differs from the successful reports. I don't see what version of binutils you are using. You might want to specify, or try something like: %ld --version GNU ld version 2.15.92.0.2 20040927 -benjamin
Can you try a newer binutils than 2.13.90.0.10, since that is known to have bugs? And since this is known to work for other people?
Sorry for the late reply. Yes, I've noticed that gcc-3.4.0 and 3.4.1 has been successfully built for powerpc, which is why I figured I might have done something wrong. I upgraded to binutils-2.14 and glibc-2.3.3. Still, libstdc++-v3 would not successfully build. I looked through the link process, and found what .o files were causing the multiple definition errors, and determined that libtool was calling gcc incorrectly (as Andrew mentioned). As a test, I then downloaded and built libtool-1.5.10 locally, and when libstdc++-v3 failed to link, I overwrote the libtool script included with gcc (looks to be "1.4a-GCC3.0") with the one installed in /usr/bin, and ran make again. Aside from getting a "libtool: ignoring unknown tag CXX" error, libstdc++-v3 linked fine. I can compile, link, and run C++ programs which use the stdc library without problems. After continuing the build process, libjava also ran into exactly the same problem. Replacing libtool and running make again made the build process complete successfully. So... it looks like the version of libtool included with gcc just needs a small version up, perhaps?
This works for everyone else, I have no idea what your problem is here. Maybe you are over writting the libtool in GCC which is just wrong, you should be able to just mkdir objdir;cd objdir;$(srcdir)/configure && make bootstrap && make install and it will just work. Since this works for me and others I am closing as works for me.
I wouldn't have opened this bug if the standard configure && make bootstrap && make install had worked in the first place. It might have helped more if you had asked me more questions about my system and/or configuration instead of just saying "it works for me". My suggestion of updating the libtool included with gcc was only that -- a suggestion. While it may be "wrong", it did fix the linker errors, so I simply let everyone know what I had found out. I have plans to upgrade to gcc-4.0.1 in the near future. If I still have the same problem, I will be opening a new bug report.
Whatever this bug was in 3.4.3, does not occur or has been fixed in gcc-3.4.6 or gcc-4.1.1. Both of these compile bootstrap without any problems. For the record (and just to make sure it wasn't anything specific with my setup), after successfully building with 3.4.6, trying to make bootstrap on 3.4.3 again results in the above compilation error when trying to build libstdc++-v3.