Bug#640547: /usr/bin/ld: cannot find -lgcc_s

Peter Eisentraut petere at debian.org
Mon Sep 5 17:43:43 UTC 2011


Package: clang
Version: 2.9-10
Severity: important

Linking seems completely broken:

$ cat test.c
int main() { return 0; }
$ clang test.c
/usr/bin/ld: cannot find -lgcc_s
clang: error: linker command failed with exit code 1 (use -v to see invocation)

In case it helps:

$ clang -v test.c
clang version 2.9 (tags/RELEASE_29/final)
Target: i386-pc-linux-gnu
Thread model: posix
 "/usr/bin/clang" -cc1 -triple i386-pc-linux-gnu -emit-obj -mrelax-all -disable-free -disable-llvm-verifier -main-file-name test.c -mrelocation-model static -mdisable-fp-elim -masm-verbose -mconstructor-aliases -target-cpu pentium4 -target-linker-version 2.21.53.20110823 -momit-leaf-frame-pointer -v -resource-dir /usr/bin/../lib/clang/2.9 -ferror-limit 19 -fmessage-length 140 -fgnu-runtime -fdiagnostics-show-option -fcolor-diagnostics -o /tmp/cc-14ar4q.o -x c test.c
clang -cc1 version 2.9 based upon llvm 2.9 hosted on i386-pc-linux-gnu
ignoring nonexistent directory "/usr/include/i486-linux-gnu"
#include "..." search starts here:
#include <...> search starts here:
 /usr/local/include
 /usr/include/i386-linux-gnu
 /usr/bin/../lib/clang/2.9/include
 /usr/include
End of search list.
 "/usr/bin/ld" --hash-style=both --no-copy-dt-needed-entries --build-id --eh-frame-hdr -m elf_i386 -dynamic-linker /lib/ld-linux.so.2 -o a.out /usr/lib/i386-linux-gnu/crt1.o /usr/lib/i386-linux-gnu/crti.o /usr/lib/gcc/i486-linux-gnu/4.3/crtbegin.o -L/usr/lib/gcc/i486-linux-gnu/4.3 -L/usr/lib/gcc/i486-linux-gnu/4.3/../../../../lib -L/lib/../lib -L/usr/lib/../lib -L/usr/lib/gcc/i486-linux-gnu/4.3/../../.. -L/usr/lib/i386-linux-gnu /tmp/cc-14ar4q.o -lgcc --as-needed -lgcc_s --no-as-needed -lc -lgcc --as-needed -lgcc_s --no-as-needed /usr/lib/gcc/i486-linux-gnu/4.3/crtend.o /usr/lib/i386-linux-gnu/crtn.o
/usr/bin/ld: cannot find -lgcc_s
clang: error: linker command failed with exit code 1 (use -v to see invocation)

It still worked a few days ago, so it might be a transient mismatch
with the GNU toolchain.

-- System Information:
Debian Release: wheezy/sid
  APT prefers testing
  APT policy: (990, 'testing'), (500, 'unstable'), (500, 'stable'), (101, 'experimental')
Architecture: i386 (x86_64)

Kernel: Linux 3.0.0-1-amd64 (SMP w/2 CPU cores)
Locale: LANG=en_US.utf8, LC_CTYPE=en_US.utf8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages clang depends on:
ii  libc6                      2.13-16       Embedded GNU C Library: Shared lib
ii  libffi5                    3.0.10~rc10-1 Foreign Function Interface library
ii  libgcc1                    1:4.6.1-4     GCC support library
ii  libllvm2.9                 2.9+dfsg-3    Low-Level Virtual Machine (LLVM), 
ii  libstdc++6                 4.6.1-4       GNU Standard C++ Library v3
ii  libstdc++6-4.6-dev         4.6.1-4       GNU Standard C++ Library v3 (devel

Versions of packages clang recommends:
ii  llvm-2.9-dev                  2.9+dfsg-3 Low-Level Virtual Machine (LLVM), 
ii  python                        2.6.7-3    interactive high-level object-orie

clang suggests no packages.

-- no debconf information





More information about the Pkg-llvm-team mailing list