Build failure in stage 3, latest CVS, linking abi_check mushroom~...gcc-obj>uname -a SunOS mushroom 5.7 Generic_106541-19 sun4u sparc SUNW,Ultra-2 mushroom~...gcc-obj>alias CONFIGURE setenv CC gcc ; /mnt/home3/utilities/gcc/configure --prefix=/mnt/home3/utilities --verbose --with-as=/mnt/home3/utilities/bin/as --with-ld=/mnt/home3/utilities/bin/ld --with-gnu-as --with-gnu-ld --disable-multilib --disable-libmudflap --enable-languages=c++ mushroom~...gcc-obj>alias BUILD nice gmake CFLAGS='-O' BOOT_CFLAGS='-O' LIBCFLAGS='-g -O' CXXFLAGS='-O' LIBCXXFLAGS='-g -O -fno-implicit-templates' bootstrap /export/home/mckelvey/utilities/gcc-obj/gcc/g++ -shared-libgcc -B/export/home/mckelvey/utilities/gcc-obj/gcc/ -nostdinc++ -B/mnt/home3/utilities/sparc-sun-solaris2.7/bin/ -B/mnt/home3/utilities/sparc-sun-solaris2.7/lib/ -isystem /mnt/home3/utilities/sparc-sun-solaris2.7/include -isystem /mnt/home3/utilities/sparc-sun-solaris2.7/sys-include -g -O2 -D_GLIBCXX_ASSERT -ffunction-sections -fdata-sections -fmessage-length=0 -DLOCALEDIR=/export/home/mckelvey/utilities/gcc-obj/sparc-sun-solaris2.7/libstdc++-v3/po/share/locale -O -o abi_check abi_check.o -L/export/home/mckelvey/utilities/gcc-obj/sparc-sun-solaris2.7/libstdc++-v3/src -L/export/home/mckelvey/utilities/gcc-obj/sparc-sun-solaris2.7/libstdc++-v3/src/.libs -lv3test -L/export/home/mckelvey/utilities/gcc-obj/sparc-sun-solaris2.7/libstdc++-v3/testsuite -lm -Wl,--rpath -Wl,/export/home/mckelvey/utilities/gcc-obj/gcc -Wl,--rpath -Wl,/export/home/mckelvey/utilities/gcc-obj/sparc-sun-solaris2.7/libstdc++-v3/src/.libs /export/home/mckelvey/utilities/gcc-obj/sparc-sun-solaris2.7/libstdc++-v3/testsuite/libv3test.a(testsuite_abi.o)(.gnu.linkonce.t._ZNSs12_S_constructIN9__gnu_cxx17__normal_iteratorIPcSsEEEES2_T_S4_RKSaIcESt20forward_iterator_tag+0xb8): In function `char* std::basic_string<char, std::char_traits<char>, std::allocator<char> >::_S_construct<__gnu_cxx::__normal_iterator<char*, std::basic_string<char, std::char_traits<char>, std::allocator<char> > > >(__gnu_cxx::__normal_iterator<char*, std::basic_string<char, std::char_traits<char>, std::allocator<char> > >, __gnu_cxx::__normal_iterator<char*, std::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<char> const&, std::forward_iterator_tag)': /mnt/home3/utilities/gcc/libstdc++-v3/testsuite/testsuite_abi.cc:210: undefined reference to `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::_Rep::_S_terminal' /export/home/mckelvey/utilities/gcc-obj/sparc-sun-solaris2.7/libstdc++-v3/testsuite/libv3test.a(testsuite_abi.o)(.gnu.linkonce.t._ZNSs12_S_constructIN9__gnu_cxx17__normal_iteratorIPcSsEEEES2_T_S4_RKSaIcESt20forward_iterator_tag+0xbc):/mnt/home3/utilities/gcc/libstdc++-v3/testsuite/testsuite_abi.cc:106: undefined reference to `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::_Rep::_S_terminal' /export/home/mckelvey/utilities/gcc-obj/sparc-sun-solaris2.7/libstdc++-v3/src/.libs/libstdc++.so: undefined reference to `std::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> >::_Rep::_S_max_size' /export/home/mckelvey/utilities/gcc-obj/sparc-sun-solaris2.7/libstdc++-v3/src/.libs/libstdc++.so: undefined reference to `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::_Rep::_S_max_size' collect2: ld returned 1 exit status gmake[4]: *** [abi_check] Error 1 gmake[4]: Leaving directory `/mnt/home3/utilities/gcc-obj/sparc-sun-solaris2.7/libstdc++-v3/testsuite' gmake[3]: *** [all-recursive] Error 1 gmake[3]: Leaving directory `/mnt/home3/utilities/gcc-obj/sparc-sun-solaris2.7/libstdc++-v3' gmake[2]: *** [all] Error 2 gmake[2]: Leaving directory `/mnt/home3/utilities/gcc-obj/sparc-sun-solaris2.7/libstdc++-v3' gmake[1]: *** [all-target-libstdc++-v3] Error 2 gmake[1]: Leaving directory `/mnt/home3/utilities/gcc-obj' gmake: *** [bootstrap] Error 2
Something is being miscompiled.
What was the last entry in the ChangeLog?
(In reply to comment #2) > What was the last entry in the ChangeLog? ChangeLog 2004-05-18 Kaz Kojima <kkojima@gcc.gnu.org> PR bootstrap/15120 * libtool.m4 (lt_cv_deplibs_check_method): Use pass_all on sh*. * */configure: Rebuilt. gcc/ChangeLog 2004-05-19 Jeff Law <law@redhat.com> * tree-ssa-phiopt.c (value_replacement): Handle the case where the desired edge out of COND_BLOCK reaches OTHER_BLOCK rather than BB directly. libstdc++-v3/ChangeLog 2004-05-18 Jonathan Wakely <redi@gcc.gnu.org> * include/ext/stdio_filebuf.h: Update comments to reflect PR 11691.
(In reply to comment #1) > Something is being miscompiled. I'm using the compiler below, and building in a separate tree as recommended. Reading specs from /mnt/home3/utilities/lib/gcc/sparc-sun-solaris2.7/3.5.0/specs Configured with: /mnt/home3/utilities/gcc/configure --prefix=/mnt/home3/utilities --verbose --with-as=/mnt/home3/utilities/bin/as --with-ld=/mnt/home3/utilities/bin/ld --with-gnu-as --with-gnu-ld --disable-multilib --enable-languages=c++ Thread model: posix gcc version 3.5.0 20040324 (experimental)
This is a cgraph problem, it might be that some of the functions are not being marked as needed so they are not being outputed.
It's caused by Zack's cgraph patches, also happens on ia64.
For x86_64, can someone test this patch: Index: i386.c =============================================================== ==== RCS file: /cvs/gcc/gcc/gcc/config/i386/i386.c,v retrieving revision 1.668 diff -u -p -r1.668 i386.c --- i386.c 17 May 2004 15:23:12 -0000 1.668 +++ i386.c 21 May 2004 13:30:26 -0000 @@ -6762,6 +6762,10 @@ output_pic_addr_const (FILE *file, rtx x break; case SYMBOL_REF: + /* Mark the decl as referenced so that cgraph will output the function. */ + if (SYMBOL_REF_DECL (x)) + mark_decl_referenced (SYMBOL_REF_DECL (x)); + assemble_name (file, XSTR (x, 0)); if (!TARGET_MACHO && code == 'P' && ! SYMBOL_REF_LOCAL_P (x)) fputs ("@PLT", file);
Subject: Re: [3.5 Regression] Bootstrap stage3: Undefined references to basic_string I am testing this patch along with a fix for the hash-tables-and-PCH bug. zw
Confirm Andrew's patch fixes the bug, will check it in shortly.
Subject: Bug 15546 CVSROOT: /cvs/gcc Module name: gcc Changes by: zack@gcc.gnu.org 2004-05-22 18:18:51 Modified files: gcc : ChangeLog gcc/config/i386: i386.c Log message: 2004-05-22 Andrew Pinski <pinskia@physics.uc.edu> PR 15546 * config/i386/i386.c (output_pic_addr_const <case SYMBOL_REF>): Call mark_decl_referenced on the SYMBOL_REF_DECL. Patches: http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&r1=2.3727&r2=2.3728 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/config/i386/i386.c.diff?cvsroot=gcc&r1=1.668&r2=1.669
fixed.
Not fixed. This bug is about sparc and ia64, not i386.
I think this is C++ front-end bug, I am looking into it as there are a couple of failures on powerpc- apple-darwin which were caused by the patch but not fixed by my patch to fix PPC.
Every call to assemble_name probably needs auditing.
Yes that fix was for x86/x86_64 but the regressions that used to be on PPC that looked related are fixed, Is this fixed with all of Zack's patches?
I think the following patch should fix ia64, can someone test it as I do not have access to a machine. Index: ia64.h =============================================================== ==== RCS file: /cvs/gcc/gcc/gcc/config/ia64/ia64.h,v retrieving revision 1.175 diff -u -p -r1.175 ia64.h --- ia64.h 13 May 2004 06:40:00 -0000 1.175 +++ ia64.h 25 May 2004 12:48:41 -0000 @@ -1478,6 +1478,7 @@ do { \ fputs ("\tdata8.ua @iplt(", FILE); \ else \ fputs ("\tdata16.ua @iplt(", FILE); \ + mark_decl_referenced (DECL); \ assemble_name (FILE, XSTR (XEXP (DECL_RTL (DECL), 0), 0)); \ fputs (")\n", FILE); \ if (TARGET_ILP32) \
Looks good. Bootstrap still running but libstdc++ has been successfully built.
Subject: Re: [3.5 Regression] Bootstrap stage3: Undefined references to basic_string I'll approve this conditionally on someone verifying that it works - it's the right form of patch for this problem. zw
I am going to assume that these results here: <http://gcc.gnu.org/ml/gcc-testresults/2004-05/ msg01173.html> is after the patch, thanks Andreas for testing it so I am going to apply it now.
Subject: Bug 15546 CVSROOT: /cvs/gcc Module name: gcc Changes by: pinskia@gcc.gnu.org 2004-05-25 17:05:46 Modified files: gcc : ChangeLog gcc/config/ia64: ia64.h Log message: 2004-05-25 Andrew Pinski <pinskia@physics.uc.edu> PR target/15546 * config/ia64/ia64.h (ASM_OUTPUT_FDESC): Mark the DECL as needed to be outputted. Patches: http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&r1=2.3745&r2=2.3746 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/config/ia64/ia64.h.diff?cvsroot=gcc&r1=1.175&r2=1.176
I assume that this also fixed for sparc-sun-solaris2.7 as there was a testresults from that today: <http: //gcc.gnu.org/ml/gcc-testresults/2004-05/msg01125.html>. So closing as fixed.
Showed up again last Wednesday (couldn't report until today); repeats today with latest CVS: /mnt/home3/utilities/gcc-obj/gcc/g++ -shared-libgcc -B/mnt/home3/utilities/gcc-obj/gcc/ -nostdinc++ -B/mnt/home3/utilities/sparc-sun-solaris2.7/bin/ -B/mnt/home3/utilities/sparc-sun-solaris2.7/lib/ -isystem /mnt/home3/utilities/sparc-sun-solaris2.7/include -isystem /mnt/home3/utilities/sparc-sun-solaris2.7/sys-include -g -O2 -D_GLIBCXX_ASSERT -ffunction-sections -fdata-sections -fmessage-length=0 -DLOCALEDIR=/mnt/home3/utilities/gcc-obj/sparc-sun-solaris2.7/libstdc++-v3/po/share/locale -O -o abi_check abi_check.o -L/mnt/home3/utilities/gcc-obj/sparc-sun-solaris2.7/libstdc++-v3/src -L/mnt/home3/utilities/gcc-obj/sparc-sun-solaris2.7/libstdc++-v3/src/.libs -lv3test -L/mnt/home3/utilities/gcc-obj/sparc-sun-solaris2.7/libstdc++-v3/testsuite -lm -Wl,--rpath -Wl,/mnt/home3/utilities/gcc-obj/gcc -Wl,--rpath -Wl,/mnt/home3/utilities/gcc-obj/sparc-sun-solaris2.7/libstdc++-v3/src/.libs /mnt/home3/utilities/gcc-obj/sparc-sun-solaris2.7/libstdc++-v3/testsuite/libv3test.a(testsuite_abi.o)(.gnu.linkonce.t._ZNSs12_S_constructIN9__gnu_cxx17__normal_iteratorIPcSsEEEES2_T_S4_RKSaIcESt20forward_iterator_tag+0xb8): In function `char* std::basic_string<char, std::char_traits<char>, std::allocator<char> >::_S_construct<__gnu_cxx::__normal_iterator<char*, std::basic_string<char, std::char_traits<char>, std::allocator<char> > > >(__gnu_cxx::__normal_iterator<char*, std::basic_string<char, std::char_traits<char>, std::allocator<char> > >, __gnu_cxx::__normal_iterator<char*, std::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<char> const&, std::forward_iterator_tag)': /mnt/home3/utilities/gcc/libstdc++-v3/testsuite/testsuite_abi.cc:211: undefined reference to `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::_Rep::_S_terminal' /mnt/home3/utilities/gcc-obj/sparc-sun-solaris2.7/libstdc++-v3/testsuite/libv3test.a(testsuite_abi.o)(.gnu.linkonce.t._ZNSs12_S_constructIN9__gnu_cxx17__normal_iteratorIPcSsEEEES2_T_S4_RKSaIcESt20forward_iterator_tag+0xbc):/mnt/home3/utilities/gcc/libstdc++-v3/testsuite/testsuite_abi.cc:106: undefined reference to `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::_Rep::_S_terminal' /mnt/home3/utilities/gcc-obj/sparc-sun-solaris2.7/libstdc++-v3/src/.libs/libstdc++.so: undefined reference to `std::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> >::_Rep::_S_max_size' /mnt/home3/utilities/gcc-obj/sparc-sun-solaris2.7/libstdc++-v3/src/.libs/libstdc++.so: undefined reference to `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::_Rep::_S_max_size' collect2: ld returned 1 exit status gmake[4]: *** [abi_check] Error 1 gmake[4]: Leaving directory `/mnt/home3/utilities/gcc-obj/sparc-sun-solaris2.7/libstdc++-v3/testsuite' gmake[3]: *** [all-recursive] Error 1 gmake[3]: Leaving directory `/mnt/home3/utilities/gcc-obj/sparc-sun-solaris2.7/libstdc++-v3' gmake[2]: *** [all] Error 2 gmake[2]: Leaving directory `/mnt/home3/utilities/gcc-obj/sparc-sun-solaris2.7/libstdc++-v3' gmake[1]: *** [all-target-libstdc++-v3] Error 2 gmake[1]: Leaving directory `/mnt/home3/utilities/gcc-obj' gmake: *** [bootstrap] Error 2
I almost think this is the same problem as PR 15721, why it does not effect anything except for solaris I do not know.
Can try again now that 15721 is fixed?
(In reply to comment #24) > Can try again now that 15721 is fixed? Builds fine now. Thanks!
Fixed.