On Mon, Apr 6, 2009 at 3:32 PM, Ian Lance Taylor <iant@xxxxxxxxxx> wrote: > kamaraju kusumanchi <raju.mailinglists@xxxxxxxxx> writes: > >>> g++ a.cpp b.cpp -m64 >> /var/tmp//ccJd8iNV.o(.eh_frame+0x40): relocation truncated to fit: >> R_SPARC_DISP32 .gnu.linkonce.t._ZNSt6vectorISsSaISsEEC1Ev >> collect2: ld returned 1 exit status > > ... > >> Is this a bug or am I doing something crazy in the code? > > This looks like a bug. > > If you are using the GNU linker, it is possible that using a newer > version of the linker will fix this. I don't actually know, though. > > Ian > This g++ 4.4.0 20090206 is compiled with GNU ld 2.14 20030612. > g++ --print-prog-name=ld <munge2>/bin/ld > <munge2>/bin/ld --version GNU ld version 2.14 20030612 I compiled binutils-2.19.1 and installed it in <munge1>/software/myroot/binutils-2.19.1/bin . I added it to the PATH. > `which ld` --version GNU ld (GNU Binutils) 2.19.1 However nothing changes > g++ -m64 -B<munge1>/software/myroot/binutils-2.19.1/bin -L<munge1>/software/myroot/binutils-2.19.1/lib a.cpp b.cpp /var/tmp//cc4Tw4B3.o(.eh_frame+0x40): relocation truncated to fit: R_SPARC_DISP32 .gnu.linkonce.t._ZNSt6vectorISsSaISsEEC1Ev collect2: ld returned 1 exit status BTW, is the -B option correct way to specify the location of the linker?