/usr/bin/ld: cannot find -lgcc_s
Hi Everyone,
Okay, this is rather a g++, or linker question, but its happening on
a debian system, so I figured I'd try here
'
Does anyone have any idea why the following fails, when compiling
statically:
g++ -Wno-deprecated -DD4H -DREN_MISSIONS -I/usr/X11R6/include \
-c -o d4h.o delta-iv.cxx
g++ -Wno-deprecated -DD4H -DREN_MISSIONS d4h.o -Wl,-Bstatic,-lm -lpthread \
-L/usr/X11R6/lib,-lXt,-lSM,-lICE,-lX11,-lXext,-lGLU \
-L/usr/lib/vtk,-lvtkRendering,-lvtkGraphics,-lvtkImaging,\
-lvtkFiltering,-lvtkCommon,-lvtkfreetype,-lvtkftgl -o d4h
/usr/bin/ld: cannot find -lgcc_s
If I compile it dynamically, everything is fine, and ld can find
-lgcc_s just fine. I'm running debian sid, and just did an upgrade
to the latest libc6, libc6-dev, gcc, g++, and binutils.
I've checked that its not the bug from 2001, with a symlink pointing
to the wrong library.
ldd /usr/lib/libgcc_s.so shows:
libc.so.6 => /lib/tls/libc.so.6 (0x40017000)
/lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x80000000)
gcc --print-libgcc-file-name shows:
/usr/lib/gcc-lib/i486-linux/3.3.3/libgcc.a
The specs file shows:
libgcc:
%{static|static-libgcc:-lgcc -lgcc_eh}%{!static:%{!static-libgcc:%{!shared:%{!sh
ared-libgcc:-lgcc -lgcc_eh}%{shared-libgcc:-lgcc_s%M -lgcc}}%{shared:%{shared-li
bgcc:-lgcc_s%M}%{!shared-libgcc:-lgcc}}}}
Anyone know what I've overlooked, or busted ?
All the Best
Iain
Reply to: