/usr/bin/ld: cannot find -lgcc_s

From: Iain Young (iain_at_g7iii.demon.co.uk)
Date: 04/29/04

  • Next message: Curtis Vaughan: "SFTP through proftpd"
    Date: Thu, 29 Apr 2004 20:15:42 +0100
    To: debian-user@lists.debian.org
    
    

    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

    -- 
    To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org 
    with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
    

  • Next message: Curtis Vaughan: "SFTP through proftpd"

    Relevant Pages

    • Re: /usr/bin/ld: cannot find -lgcc_s
      ... > a debian system, so I figured I'd try here ... > Does anyone have any idea why the following fails, when compiling ...
      (Debian-User)
    • Cups printing to W2K probs
      ... i have a prob with, okay, actually i dont't know if the debian system has ... a fault or the W2K machine is fucked up. ... W2K show an incoming printjob ...
      (Debian-User)