help please: libstdc++ build error

Rob Lugt roblugt@bigfoot.com
Fri Aug 11 10:51:00 GMT 2000


I have been trying to build gcc with 
libstdc++ and the make is failing near the end with a link failure.
 
I have downloaded gcc 1.95.2 and libstdc++ 
2.90.8
 
I have unzipped and tarred them into a single 
source directory. And..
> mv libstdc++ libstdc++-v2
> mv libio libio-v2
> ln -s libstdc++-v3 libstdc++
 
in a seperate obj directory (usr/local/gcc-2.95) I 
have:-
> /usr/local/src/gcc/configure 
--enable-languages=c++ --prefix=/usr/local/gcc
> make bootstrap-lean
 
The build runs for some time and finally fails 
with the following message:-
 
/usr/local/src/gcc-2.95.2/libstdc++/bits/string.tcc:54: multiple 
definition of `basic_string<char, char_traits<char>, 
allocator<char> >::basic_string(unsigned int, char, 
allocator<char> const &)'
 
Here is the command being 
executed:
 
/usr/local/gcc-2.95/gcc/xgcc 
-B/usr/local/gcc-2.95/gcc/ -B/usr/local/gcc/i586-pc-linux-gnu/bin/ -shared  
limitsMEMBERS.lo c++io.lo cmath.lo complex.lo complexf.lo complexl.lo 
complex_io.lo stdexcept.lo ios.lo stdstreams.lo strstream.lo locale.lo 
localename.lo locale-inst.lo stl-inst.lo misc-inst.lo valarray-inst.lo 
stringMAIN.lo stringCTORNC.lo stringCTORAL.lo stringCTORCPR.lo 
stringCTORCPRAL.lo stringCTORPRAL.lo stringCTORPAL.lo stringCTORDUPAL.lo 
stringCTORPP.lo stringCTORII.lo stringMUTATE.lo stringRESERVE.lo stringSWAP.lo 
stringSLOP.lo stringRESIZE.lo stringAPPCOPY.lo stringAPPCPR.lo stringAPPPR.lo 
stringAPPDUP.lo stringAPPII.lo stringASSCP.lo stringASSII.lo stringINSII.lo 
stringREPRR.lo stringREPIIDUP.lo stringREPII.lo stringREPIII.lo stringREP4I.lo 
stringREPIIPP.lo stringREPIIPP2.lo stringCOPY.lo stringCONII.lo stringCONIIF.lo 
stringCONPPF.lo stringCONPPF2.lo stringCONSC.lo stringFIND.lo stringFINDC.lo 
stringRFIND.lo stringRFINDC.lo stringFFO.lo stringFLO.lo stringFFNO.lo 
stringFLNO.lo stringFLNOC.lo stringCOMPARE.lo stringCOMPARE2.lo 
stringCOMPAREP.lo stringCOMPAREP2.lo stringADDPS.lo stringADDCS.lo 
stringEXTRACT.lo stringINSERT.lo stringGETLINE.lo stringSCOPY.lo stringEQ.lo 
wstringMAIN.lo wstringCTORNC.lo wstringCTORAL.lo wstringCTORCPR.lo 
wstringCTORCPRAL.lo wstringCTORPRAL.lo wstringCTORPAL.lo wstringCTORDUPAL.lo 
wstringCTORPP.lo wstringCTORII.lo wstringMUTATE.lo wstringRESERVE.lo 
wstringSWAP.lo wstringSLOP.lo wstringRESIZE.lo wstringAPPCOPY.lo 
wstringAPPCPR.lo wstringAPPPR.lo wstringAPPDUP.lo wstringAPPII.lo 
wstringASSCP.lo wstringASSII.lo wstringINSII.lo wstringREPRR.lo 
wstringREPIIDUP.lo wstringREPII.lo wstringREPIII.lo wstringREP4I.lo 
wstringREPIIPP.lo wstringREPIIPP2.lo wstringCOPY.lo wstringCONII.lo 
wstringCONIIF.lo wstringCONPPF.lo wstringCONPPF2.lo wstringCONSC.lo 
wstringFIND.lo wstringFINDC.lo wstringRFIND.lo wstringRFINDC.lo wstringFFO.lo 
wstringFLO.lo wstringFFNO.lo wstringFLNO.lo wstringFLNOC.lo wstringCOMPARE.lo 
wstringCOMPARE2.lo wstringCOMPAREP.lo wstringCOMPAREP2.lo wstringADDPS.lo 
wstringADDCS.lo wstringEXTRACT.lo wstringINSERT.lo wstringGETLINE.lo 
wstringSCOPY.lo wstringEQ.lo -Wl,--whole-archive ../math/.libs/libmath.al 
../libio/.libs/libio.al -Wl,--no-whole-archive  -lm -lc  -Wl,-soname 
-Wl,libstdc++.so.3 -o .libs/libstdc++.so.3.0.0 stringCTORDUPAL.lo: In 
function `messages_base type_info 
function': /usr/local/src/gcc-2.95.2/libstdc++/bits/string.tcc:54: multiple 
definition of `basic_string<char, char_traits<char>, 
allocator<char> >::basic_string(unsigned int, char, 
allocator<char> const 
&)' stringCTORNC.lo:/usr/local/src/gcc-2.95.2/libstdc++/bits/string.tcc:54: 
first defined here
Why is it failing here?  Surely 
it is normal for a template function to be defined multiple 
times?
 
Any help greatly appreciated!
Rob Lugt



More information about the Libstdc++ mailing list