This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
2.95 branch, can't build libstdc++
- To: gcc at gcc dot gnu dot org
- Subject: 2.95 branch, can't build libstdc++
- From: Michael Matz <matzmich at cs dot tu-berlin dot de>
- Date: Thu, 20 Apr 2000 02:42:15 +0200 (MET DST)
Hi,
I just tried the actual CVS 2.95 branch on a i586-pc-linux-gnu system with
--enable-shared. While the compiler itself bootstraps normally, the
building of libstdc++ breaks:
/mnt/src/obj/gcc-2.95.2/gcc/xgcc -B/mnt/src/obj/gcc-2.95.2/gcc/
-B/usr/local/i586-pc-linux-gnu/bin/ -g -O2 -fvtable-thunks -D_GNU_SOURCE
-fno-implicit-templates -Wl,-soname,libstdc++-libc6.1-2.so.3 -shared -o
libstdc++-3-libc6.1-2-2.10.0.so `cat piclist` -lm
../libio/pic/strstream.o: In function `iostream::iostream(int)':
/mnt/src/obj/gcc-2.95.2/i586-pc-linux-gnu/libio/../../../../gcc-2.95.2/libio/str
stream.h:104: multiple definition of `iostream::iostream(int)'
../libio/pic/fstream.o(.text+0x0):/mnt/src/obj/gcc-2.95.2/i586-pc-linux-gnu/libi
o/../../../../gcc-2.95.2/libio/fstream.cc: first defined here
/usr/bin/ld: Warning: size of symbol `iostream::iostream(int)' changed
from 189 to 185 in ../libio/pic/strstream.o
../libio/pic/pfstream.o: In function `ofstream::ofstream(int)':
/mnt/src/obj/gcc-2.95.2/i586-pc-linux-gnu/libio/../../../../gcc-2.95.2/libio/pfs
tream.cc:77: multiple definition of `ofstream::ofstream(int)'
../libio/pic/PlotFile.o(.text+0x0):/mnt/src/obj/gcc-2.95.2/i586-pc-linux-gnu/lib
io/../../../../gcc-2.95.2/libio/PlotFile.h: first defined here
/usr/bin/ld: Warning: size of symbol `ofstream::ofstream(int)' changed
from 286 to 290 in ../libio/pic/pfstream.o
collect2: ld returned 1 exit status
And indeed :
% cd .../libio/pic
% nm --demangle fstream.o | grep iostream
...
00000000 T iostream::iostream(int)
...
% nm --demangle strstream.o | grep iostream
...
00000184 T iostream::iostream(int)
...
(For ofstream similar). If I remove the '#pragma implementation' from
{PlotFile,pfstream,strstream,fstream}.cc it is:
% nm --demangle strstream.o | grep iostream
00000000 W iostream::iostream(int)
So, it's now weak. In this case the linking succeeds, but I'm sure that's
not the right fix.
Any ideas?
Ciao,
Michael.