Bug#629861: clang 2.9-3 can't link any programs: cannot find crtbegin.o, -lgcc, -lgcc_s
Urs Janssen
urs at tin.org
Fri Jun 10 16:16:43 UTC 2011
Package: clang
Version: 2.9-3
Followup-For: Bug #629861
-- System Information:
Debian Release: wheezy/sid
APT prefers stable-updates
APT policy: (500, 'stable-updates'), (500, 'unstable'), (500, 'testing'), (500, 'stable'), (1, 'experimental')
Architecture: i386 (i686)
Kernel: Linux 2.6.39-2-686-pae (SMP w/2 CPU cores)
Locale: LANG=C, LC_CTYPE=en_US (charmap=ISO-8859-1)
Shell: /bin/sh linked to /bin/bash
Versions of packages clang depends on:
ii libc6 2.13-6 Embedded GNU C Library: Shared lib
ii libffi5 3.0.9-4 Foreign Function Interface library
ii libgcc1 1:4.6.0-12 GCC support library
ii libllvm2.9 2.9+dfsg-1 Low-Level Virtual Machine (LLVM),
ii libstdc++6 4.6.0-12 GNU Standard C++ Library v3
ii libstdc++6-4.5-dev 4.5.3-2 The GNU Standard C++ Library v3 (d
Versions of packages clang recommends:
ii llvm-2.9-dev 2.9+dfsg-1 Low-Level Virtual Machine (LLVM),
ii python 2.6.6-14 interactive high-level object-orie
clang suggests no packages.
-- no debconf information
the crti/crto issue (#629594) seems to be fixed, but:
chao% touch foo.c
chao% clang -v -o foo foo.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 foo.c -mrelocation-model static -mdisable-fp-elim -masm-verbose -mconstructor-aliases -target-cpu pentium4 -target-linker-version 2.21.52.20110606 -momit-leaf-frame-pointer -v -resource-dir /usr/bin/../lib/clang/2.9 -ferror-limit 19 -fmessage-length 0 -fgnu-runtime -fdiagnostics-show-option -o /tmp/cc-Gu4xKN.o -x c foo.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/bin/../lib/clang/2.9/include
/usr/include
End of search list.
"/usr/bin/ld" --hash-style=both --build-id --eh-frame-hdr -m elf_i386 -dynamic-linker /lib/ld-linux.so.2 -o foo /usr/lib/i386-linux-gnu/crt1.o /usr/lib/i386-linux-gnu/crti.o crtbegin.o -L -L/../../../../lib -L/lib/../lib -L/usr/lib/../lib -L/../../.. -L/usr/lib/i386-linux-gnu /tmp/cc-Gu4xKN.o -lgcc --as-needed -lgcc_s --no-as-needed -lc -lgcc --as-needed -lgcc_s --no-as-needed crtend.o /usr/lib/i386-linux-gnu/crtn.o
/usr/bin/ld: cannot find crtbegin.o: No such file or directory
/usr/bin/ld: cannot find -lgcc
/usr/bin/ld: cannot find -lgcc_s
clang: error: linker command failed with exit code 1 (use -v to see invocation)
chao% find /usr/lib -name 'crtbegin*'
/usr/lib/i386-linux-gnu/gcc/i486-linux-gnu/4.6/crtbegin.o
/usr/lib/i386-linux-gnu/gcc/i486-linux-gnu/4.6/crtbeginT.o
/usr/lib/i386-linux-gnu/gcc/i486-linux-gnu/4.6/crtbeginS.o
/usr/lib/i386-linux-gnu/gcc/i486-linux-gnu/4.4/crtbegin.o
/usr/lib/i386-linux-gnu/gcc/i486-linux-gnu/4.4/crtbeginT.o
/usr/lib/i386-linux-gnu/gcc/i486-linux-gnu/4.4/crtbeginS.o
/usr/lib/i386-linux-gnu/gcc/i486-linux-gnu/4.5/crtbegin.o
/usr/lib/i386-linux-gnu/gcc/i486-linux-gnu/4.5/crtbeginT.o
/usr/lib/i386-linux-gnu/gcc/i486-linux-gnu/4.5/crtbeginS.o
chao% find /usr/lib -name 'libgcc[._]*'
/usr/lib/i386-linux-gnu/gcc/i486-linux-gnu/4.6/libgcc.a
/usr/lib/i386-linux-gnu/gcc/i486-linux-gnu/4.6/libgcc_eh.a
/usr/lib/i386-linux-gnu/gcc/i486-linux-gnu/4.6/libgcc_s.so
/usr/lib/i386-linux-gnu/gcc/i486-linux-gnu/4.4/libgcc.a
/usr/lib/i386-linux-gnu/gcc/i486-linux-gnu/4.4/libgcc_eh.a
/usr/lib/i386-linux-gnu/gcc/i486-linux-gnu/4.4/libgcc_s.so
/usr/lib/i386-linux-gnu/gcc/i486-linux-gnu/4.5/libgcc.a
/usr/lib/i386-linux-gnu/gcc/i486-linux-gnu/4.5/libgcc_eh.a
/usr/lib/i386-linux-gnu/gcc/i486-linux-gnu/4.5/libgcc_s.so
More information about the Pkg-llvm-team
mailing list