Bug#655432: clang unusable on armel and armhf, link failures

peter green plugwash at p10link.net
Wed Jan 11 19:25:19 UTC 2012


Sylvestre Ledru wrote:
> As said in the error message, could you start it again with -v ?
>   
armhf:

root at debian:/# clang -v test.c
Debian clang version 3.0-5 (tags/RELEASE_30/final) (based on LLVM 3.0)
Target: arm-unknown-linux-gnueabihf
Thread model: posix
clang: warning: unknown platform, assuming -mfloat-abi=soft
 "/usr/bin/clang" -cc1 -triple armv4t-unknown-linux-gnueabihf -S 
-disable-free -disable-llvm-verifier -main-file-name test.c 
-mrelocation-model static -mdisable-fp-elim -mconstructor-aliases 
-target-abi apcs-gnu -target-cpu arm7tdmi -msoft-float -mfloat-abi soft 
-target-feature +soft-float -target-feature +soft-float-abi 
-target-feature -neon -target-linker-version 2.22 
-momit-leaf-frame-pointer -v -resource-dir /usr/bin/../lib/clang/3.0 
-fmodule-cache-path /var/tmp/clang-module-cache -internal-isystem 
/usr/local/include -internal-isystem /usr/bin/../lib/clang/3.0/include 
-internal-externc-isystem /usr/include/arm-linux-gnueabihf 
-internal-externc-isystem /usr/include -ferror-limit 19 -fmessage-length 
80 -fno-signed-char -fgnu-runtime -fobjc-runtime-has-arc 
-fobjc-runtime-has-weak -fobjc-fragile-abi -fdiagnostics-show-option 
-fcolor-diagnostics -o /tmp/test-wRia58.s -x c test.c
clang -cc1 version 3.0 based upon llvm 3.0 hosted on 
arm-unknown-linux-gnueabihf
ignoring nonexistent directory "/usr/bin/../lib/clang/3.0/include"
ignoring nonexistent directory "/usr/bin/../lib/clang/3.0/include"
ignoring duplicate directory "/usr/local/include"
ignoring duplicate directory "/usr/include/arm-linux-gnueabihf"
ignoring duplicate directory "/usr/include/arm-linux-gnueabihf"
ignoring duplicate directory "/usr/include/arm-linux-gnueabihf"
ignoring duplicate directory "/usr/include"
#include "..." search starts here:
#include <...> search starts here:
 /usr/local/include
 /usr/include/arm-linux-gnueabihf
 /usr/include
 /usr/include/clang/3.0/include/
 /usr/lib/gcc/arm-linux-gnueabihf/4.6/include/
 /usr/lib/gcc/arm-linux-gnueabihf/4.6/include-fixed/
End of search list.
 "/usr/bin/as" -o /tmp/test-gl0OK7.o /tmp/test-wRia58.s
 "/usr/bin/ld" -X --hash-style=both --build-id --eh-frame-hdr -m 
armelf_linux_eabi -dynamic-linker /lib/ld-linux.so.3 -o a.out crt1.o 
crti.o /usr/lib/gcc/arm-linux-gnueabihf/4.6/crtbegin.o 
-L/usr/lib/gcc/arm-linux-gnueabihf/4.6 
-L/usr/lib/gcc/arm-linux-gnueabihf/4.6/../../.. -L/lib -L/usr/lib 
/tmp/test-gl0OK7.o -lgcc --as-needed -lgcc_s --no-as-needed -lc -lgcc 
--as-needed -lgcc_s --no-as-needed 
/usr/lib/gcc/arm-linux-gnueabihf/4.6/crtend.o crtn.o
/usr/bin/ld.bfd.real: cannot find crt1.o: No such file or directory
/usr/bin/ld.bfd.real: cannot find crti.o: No such file or directory
clang: error: linker command failed with exit code 1 (use -v to see 
invocation)
root at debian:/#

armel:

root at debian:~# clang -v test.c
Debian clang version 3.0-5 (tags/RELEASE_30/final) (based on LLVM 3.0)
Target: arm-unknown-linux-gnueabi
Thread model: posix
 "/usr/bin/clang" -cc1 -triple armv4t-unknown-linux-gnueabi -S 
-disable-free -disable-llvm-verifier -main-file-name test.c 
-mrelocation-model static -mdisable-fp-elim -mconstructor-aliases 
-target-abi aapcs-linux -target-cpu arm7tdmi -mfloat-abi soft 
-target-feature +soft-float-abi -target-linker-version 2.22 
-momit-leaf-frame-pointer -v -resource-dir /usr/bin/../lib/clang/3.0 
-fmodule-cache-path /var/tmp/clang-module-cache -internal-isystem 
/usr/local/include -internal-isystem /usr/bin/../lib/clang/3.0/include 
-internal-externc-isystem /usr/include/arm-linux-gnueabi 
-internal-externc-isystem /usr/include -ferror-limit 19 -fmessage-length 
80 -fno-signed-char -fgnu-runtime -fobjc-runtime-has-arc 
-fobjc-runtime-has-weak -fobjc-fragile-abi -fdiagnostics-show-option 
-fcolor-diagnostics -o /tmp/test-sH9qlM.s -x c test.c
clang -cc1 version 3.0 based upon llvm 3.0 hosted on 
arm-unknown-linux-gnueabi
ignoring nonexistent directory "/usr/bin/../lib/clang/3.0/include"
ignoring nonexistent directory "/usr/bin/../lib/clang/3.0/include"
ignoring duplicate directory "/usr/local/include"
ignoring duplicate directory "/usr/include/arm-linux-gnueabi"
ignoring duplicate directory "/usr/include/arm-linux-gnueabi"
ignoring duplicate directory "/usr/include/arm-linux-gnueabi"
ignoring duplicate directory "/usr/include"
#include "..." search starts here:
#include <...> search starts here:
 /usr/local/include
 /usr/include/arm-linux-gnueabi
 /usr/include
 /usr/include/clang/3.0/include/
 /usr/lib/gcc/arm-linux-gnueabi/4.6/include/
 /usr/lib/gcc/arm-linux-gnueabi/4.6/include-fixed/
End of search list.
 "/usr/bin/as" -o /tmp/test-sHkGZo.o /tmp/test-sH9qlM.s
 "/usr/bin/ld" -X --hash-style=both --build-id --eh-frame-hdr -m 
armelf_linux_eabi -dynamic-linker /lib/ld-linux.so.3 -o a.out crt1.o 
crti.o /usr/lib/gcc/arm-linux-gnueabi/4.6/crtbegin.o 
-L/usr/lib/gcc/arm-linux-gnueabi/4.6 
-L/usr/lib/gcc/arm-linux-gnueabi/4.6/../../.. -L/lib -L/usr/lib 
/tmp/test-sHkGZo.o -lgcc --as-needed -lgcc_s --no-as-needed -lc -lgcc 
--as-needed -lgcc_s --no-as-needed 
/usr/lib/gcc/arm-linux-gnueabi/4.6/crtend.o crtn.o
/usr/bin/ld: cannot find crt1.o: No such file or directory
/usr/bin/ld: cannot find crti.o: No such file or directory
clang: error: linker command failed with exit code 1 (use -v to see 
invocation)
root at debian:~#
> what is the result of
> $ dpkg -S crti.o
> on your system ?
>   
armhf:

root at debian:/# dpkg -S crti.o
libc6-dev: /usr/lib/arm-linux-gnueabihf/crti.o
root at debian:/#

armel:

root at debian:~# dpkg -S crti.o
libc6-dbg: /usr/lib/debug/usr/lib/arm-linux-gnueabi/crti.o
libc6-dev: /usr/lib/arm-linux-gnueabi/crti.o
root at debian:~#

> and
> $ dpkg -l|grep llvm
>   
armhf:

root at debian:/# dpkg -l|grep llvm
ii  libllvm3.0                         3.0-5                      
Low-Level Virtual Machine (LLVM), runtime library
root at debian:/#

armel:

root at debian:~# dpkg -l|grep llvm
ii  libllvm3.0                           3.0-5                      
Low-Level Virtual Machine (LLVM), runtime library
ii  llvm-3.0                             3.0-5                      
Low-Level Virtual Machine (LLVM)
ii  llvm-3.0-dev                         3.0-5                      
Low-Level Virtual Machine (LLVM), libraries and headers
ii  llvm-3.0-runtime                     3.0-5                      
Low-Level Virtual Machine (LLVM), bytecode interpreter
root at debian:~#







More information about the Pkg-llvm-team mailing list