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

2012-02-09 Thread Stanley Pinchak
Package: clang
Followup-For: Bug #655432

Dear Maintainer,

In order to help track down this bug, I have tried an older version of clang.
My test program compiles successfully with clang 2.9-16 and libllvm2.9
2.9+dfsg-4.  I will see if I can further pinpoint the change that may have
caused this bug.

me@mybox:/tmp$ dpkg -l | grep llvm
ii  libllvm2.9   2.9+dfsg-4Low-Level 
Virtual Machine (LLVM), runtime library
ii  libllvm3.0   3.0-5 Low-Level 
Virtual Machine (LLVM), runtime library

me@mybox:/temp$ clang -v test.c
Debian clang version 2.9-16 (tags/RELEASE_29/final) (based on LLVM 2.9)
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.21.53.20110823 -momit-leaf-frame-pointer -v 
-resource-dir /usr/bin/../lib/clang/2.9 -ferror-limit 19 -fmessage-length 80 
-fgnu-runtime -fdiagnostics-show-option -fcolor-diagnostics -o /tmp/cc-ssO3Xv.s 
-x c test.c
clang -cc1 version 2.9 based upon llvm 2.9 hosted on arm-unknown-linux-gnueabi
ignoring nonexistent directory /usr/bin/../lib/clang/2.9/include
ignoring duplicate directory /usr/include/arm-linux-gnueabi
ignoring duplicate directory /usr/include/arm-linux-gnueabi
#include ... search starts here:
#include ... search starts here:
 /usr/local/include
 /usr/include/arm-linux-gnueabi
 /usr/lib/gcc/arm-linux-gnueabi/4.6/include
 /usr/lib/gcc/arm-linux-gnueabi/4.6/include-fixed
 /usr/include
End of search list.
 /usr/bin/as -o /tmp/cc-qKJlbS.o /tmp/cc-ssO3Xv.s
 /usr/bin/ld -X --hash-style=both --no-copy-dt-needed-entries --build-id 
--eh-frame-hdr -m armelf_linux_eabi -dynamic-linker /lib/ld-linux.so.3 -o a.out 
/usr/lib/arm-linux-gnueabi/crt1.o /usr/lib/arm-linux-gnueabi/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/usr/lib/arm-linux-gnueabi 
/tmp/cc-qKJlbS.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 
/usr/lib/arm-linux-gnueabi/crtn.o

-- System Information:
Debian Release: wheezy/sid
  APT prefers testing
  APT policy: (650, 'testing'), (600, 'unstable')
Architecture: armel (armv5tel)

Kernel: Linux 3.2.0-1-orion5x
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages clang depends on:
ii  libc6   2.13-26
ii  libffi5 3.0.10-3
ii  libgcc1 1:4.6.2-12
ii  libllvm2.9  2.9+dfsg-4
ii  libstdc++6  4.6.2-12
ii  libstdc++6-4.6-dev  4.6.2-12

Versions of packages clang recommends:
ii  llvm-2.9-dev  none
ii  python2.7.2-10

clang suggests no packages.

-- no debconf information
execve(/usr/bin/clang, [clang, test.c, 2], [/* 19 vars */]) = 0
brk(0)  = 0x25ce000
uname({sys=Linux, node=mybox, ...}) = 0
access(/etc/ld.so.nohwcap, F_OK)  = -1 ENOENT (No such file or directory)
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 
0xb6fd4000
access(/etc/ld.so.preload, R_OK)  = -1 ENOENT (No such file or directory)
open(/etc/ld.so.cache, O_RDONLY)  = 9
fstat64(9, {st_mode=S_IFREG|0644, st_size=25055, ...}) = 0
mmap2(NULL, 25055, PROT_READ, MAP_PRIVATE, 9, 0) = 0xb6faa000
close(9)= 0
access(/etc/ld.so.nohwcap, F_OK)  = -1 ENOENT (No such file or directory)
open(/usr/lib/arm-linux-gnueabi/libLLVM-2.9.so.1, O_RDONLY) = 9
read(9, 
\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0(\0\1\0\0\0\220\227!\0004\0\0\0..., 512) = 
512
lseek(9, 15449028, SEEK_SET)= 15449028
read(9, \0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0..., 
1080) = 1080
lseek(9, 15448744, SEEK_SET)= 15448744
read(9, A1\0\0\0aeabi\0\1'\0\0\0\5ARM9TDMI\0\6\2\10\1\t\1..., 50) = 50
fstat64(9, {st_mode=S_IFREG|0644, st_size=15450108, ...}) = 0
mmap2(NULL, 15513816, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 9, 0) = 
0xb60de000
mprotect(0xb6e21000, 28672, PROT_NONE)  = 0
mmap2(0xb6e28000, 1548288, PROT_READ|PROT_WRITE, 
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 9, 0xd42) = 0xb6e28000
mmap2(0xb6fa2000, 30936, PROT_READ|PROT_WRITE, 
MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0xb6fa2000
close(9)= 0
access(/etc/ld.so.nohwcap, F_OK)  = -1 ENOENT (No such file or directory)
open(/lib/arm-linux-gnueabi/libpthread.so.0, O_RDONLY) = 9
read(9, \177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0(\0\1\0\0\0DE\0\0004\0\0\0..., 
512) = 512
lseek(9, 86800, SEEK_SET)   = 86800
read(9, \0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0..., 
1400) = 1400
lseek(9, 86404, 

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

2012-02-09 Thread Stanley Pinchak
Package: clang
Version: 3.0-1
Followup-For: Bug #655432

Dear Maintainer,

 It appears that this bug first appears in 3.0-1 on the armel platform.
The changelog notes the removal of some debian specific patches which related
to debian multi-arch search paths.  It seems likely that the upstream patches
which replaced the debian ones differed slightly from the debian clang 2.9-16
patches in some manner significant for the armel architecture.  Please let me
know if I can be of further assistance in squashing this bug. 

 Trying to compile the test.c file fails at linking in a manner similar
to that reported above for clang 3.0-5.

me@mybox:/temp$ dpkg -l | grep llvm
ii  libllvm3.0   3.0-1 Low-Level 
Virtual Machine (LLVM), runtime library

stanley@mml-home-nas:/temp$ clang -v test.c
Debian clang version 3.0-1 (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.21.90.20111025 -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-xKivDt.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
#include ... search starts here:
#include ... search starts here:
 /usr/local/include
 /usr/include/arm-linux-gnueabi
 /usr/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-g08sZM.o /tmp/test-xKivDt.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-g08sZM.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)


-- System Information:
Debian Release: wheezy/sid
  APT prefers testing
  APT policy: (650, 'testing'), (600, 'unstable')
Architecture: armel (armv5tel)

Kernel: Linux 3.2.0-1-orion5x
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages clang depends on:
ii  libc6   2.13-26
ii  libffi5 3.0.10-3
ii  libgcc1 1:4.6.2-12
ii  libllvm3.0  3.0-1
ii  libstdc++6  4.6.2-12
ii  libstdc++6-4.6-dev  4.6.2-12

Versions of packages clang recommends:
ii  llvm-3.0-dev  none
ii  python2.7.2-10

clang suggests no packages.

-- no debconf information
execve(/usr/bin/clang, [clang, test.c, 2], [/* 19 vars */]) = 0
brk(0)  = 0xb6b000
uname({sys=Linux, node=mybox, ...}) = 0
access(/etc/ld.so.nohwcap, F_OK)  = -1 ENOENT (No such file or directory)
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 
0xb6f9d000
access(/etc/ld.so.preload, R_OK)  = -1 ENOENT (No such file or directory)
open(/etc/ld.so.cache, O_RDONLY)  = 10
fstat64(10, {st_mode=S_IFREG|0644, st_size=24970, ...}) = 0
mmap2(NULL, 24970, PROT_READ, MAP_PRIVATE, 10, 0) = 0xb6f73000
close(10)   = 0
access(/etc/ld.so.nohwcap, F_OK)  = -1 ENOENT (No such file or directory)
open(/usr/lib/arm-linux-gnueabi/libLLVM-3.0.so.1, O_RDONLY) = 10
read(10, \177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0(\0\1\0\0\0\270G'\0004\0\0\0..., 
512) = 512
lseek(10, 17706308, SEEK_SET)   = 17706308
read(10, \0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0..., 
1080) = 1080
lseek(10, 17706024, SEEK_SET)   = 17706024
read(10, A1\0\0\0aeabi\0\1'\0\0\0\5ARM9TDMI\0\6\2\10\1\t\1..., 50) = 50
fstat64(10, {st_mode=S_IFREG|0644, 

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

2012-02-06 Thread Stanley Pinchak
Package: clang
Version: 3.0-5
Followup-For: Bug #655432

Dear Maintainer,

I can confirm this bug for the armel architecture.  I too am unable to 
link a simple test program.  Mine differed slightly from the original 
reporter in that my program was a simple Hello World test instead of 
containing an empty main function.  My system is primarily testing, but 
the clang and llvm packages are from unstable.  I was expecting the test 
program to be compiled and linked, but clang failed during linking in a 
manner similar to the original reporter.

dpkg -l | grep llvm
ii  libllvm3.0   3.0-5 Low-Level 
Virtual Machine (LLVM), runtime library

dpkg -S crti.o
libc6-dev: /usr/lib/arm-linux-gnueabi/crti.o

me@mybox:/tmp$ clang test.c -v
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-1AcllR.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
ignoring duplicate directory /usr/include/arm-linux-gnueabi
ignoring duplicate directory /usr/include
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-4BKE8B.o /tmp/test-1AcllR.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-4BKE8B.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)


-- System Information:
Debian Release: wheezy/sid
  APT prefers testing
  APT policy: (650, 'testing'), (600, 'unstable')
Architecture: armel (armv5tel)

Kernel: Linux 3.2.0-1-orion5x
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages clang depends on:
ii  libc62.13-26
ii  libclang-common-dev  3.0-5
ii  libffi5  3.0.10-3
ii  libgcc1  1:4.6.2-12
ii  libllvm3.0   3.0-5
ii  libstdc++6   4.6.2-12
ii  libstdc++6-4.6-dev   4.6.2-12

Versions of packages clang recommends:
ii  llvm-3.0-dev  none
ii  python2.7.2-10

clang suggests no packages.

-- no debconf information


clang_test_strace.log
Description: inode/empty


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

2012-02-06 Thread Stanley Pinchak
Package: clang
Version: 3.0-5
Followup-For: Bug #655432

Trying to attach that strace log again.
execve(/usr/bin/clang, [clang, test.c], [/* 19 vars */]) = 0
brk(0)  = 0x29fb000
uname({sys=Linux, node=mml-home-nas, ...}) = 0
access(/etc/ld.so.nohwcap, F_OK)  = -1 ENOENT (No such file or directory)
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 
0xb6f4b000
access(/etc/ld.so.preload, R_OK)  = -1 ENOENT (No such file or directory)
open(/etc/ld.so.cache, O_RDONLY)  = 7
fstat64(7, {st_mode=S_IFREG|0644, st_size=24970, ...}) = 0
mmap2(NULL, 24970, PROT_READ, MAP_PRIVATE, 7, 0) = 0xb6f21000
close(7)= 0
access(/etc/ld.so.nohwcap, F_OK)  = -1 ENOENT (No such file or directory)
open(/usr/lib/arm-linux-gnueabi/libLLVM-3.0.so.1, O_RDONLY) = 7
read(7, \177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0(\0\1\0\0\0\260J'\0004\0\0\0..., 
512) = 512
lseek(7, 17737372, SEEK_SET)= 17737372
read(7, \0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0..., 
1080) = 1080
lseek(7, 17737088, SEEK_SET)= 17737088
read(7, A1\0\0\0aeabi\0\1'\0\0\0\5ARM9TDMI\0\6\2\10\1\t\1..., 50) = 50
fstat64(7, {st_mode=S_IFREG|0644, st_size=17738452, ...}) = 0
mmap2(NULL, 17817232, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 7, 0) = 
0xb5e23000
mprotect(0xb6d3b000, 28672, PROT_NONE)  = 0
mmap2(0xb6d42000, 1916928, PROT_READ|PROT_WRITE, 
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 7, 0xf17) = 0xb6d42000
mmap2(0xb6f16000, 44688, PROT_READ|PROT_WRITE, 
MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0xb6f16000
close(7)= 0
access(/etc/ld.so.nohwcap, F_OK)  = -1 ENOENT (No such file or directory)
open(/lib/arm-linux-gnueabi/libpthread.so.0, O_RDONLY) = 7
read(7, \177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0(\0\1\0\0\0DE\0\0004\0\0\0..., 
512) = 512
lseek(7, 86800, SEEK_SET)   = 86800
read(7, \0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0..., 
1400) = 1400
lseek(7, 86404, SEEK_SET)   = 86404
read(7, A)\0\0\0aeabi\0\1\37\0\0\0\0054T\0\6\2\10\1\t\1\22\4\24\1\25\1..., 
42) = 42
fstat64(7, {st_mode=S_IFREG|0755, st_size=119869, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 
0xb6f4a000
mmap2(NULL, 127508, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 7, 0) = 
0xb5e03000
mprotect(0xb5e18000, 28672, PROT_NONE)  = 0
mmap2(0xb5e1f000, 8192, PROT_READ|PROT_WRITE, 
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 7, 0x14) = 0xb5e1f000
mmap2(0xb5e21000, 4628, PROT_READ|PROT_WRITE, 
MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0xb5e21000
close(7)= 0
access(/etc/ld.so.nohwcap, F_OK)  = -1 ENOENT (No such file or directory)
open(/usr/lib/arm-linux-gnueabi/libffi.so.5, O_RDONLY) = 7
read(7, \177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0(\0\1\0\0\0 \25\0\0004\0\0\0..., 
512) = 512
lseek(7, 48784, SEEK_SET)   = 48784
read(7, \0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0..., 
1120) = 1120
lseek(7, 48464, SEEK_SET)   = 48464
read(7, A1\0\0\0aeabi\0\1'\0\0\0\5ARM9TDMI\0\6\2\10\1\t\1..., 50) = 50
fstat64(7, {st_mode=S_IFREG|0644, st_size=49904, ...}) = 0
mmap2(NULL, 81804, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 7, 0) = 
0xb5def000
mprotect(0xb5dfb000, 28672, PROT_NONE)  = 0
mmap2(0xb5e02000, 4096, PROT_READ|PROT_WRITE, 
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 7, 0xb) = 0xb5e02000
close(7)= 0
access(/etc/ld.so.nohwcap, F_OK)  = -1 ENOENT (No such file or directory)
open(/lib/arm-linux-gnueabi/libdl.so.2, O_RDONLY) = 7
read(7, \177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0(\0\1\0\0\0$\t\0\0004\0\0\0..., 
512) = 512
lseek(7, 8644, SEEK_SET)= 8644
read(7, \0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0..., 
1160) = 1160
lseek(7, 8320, SEEK_SET)= 8320
read(7, A+\0\0\0aeabi\0\1!\0\0\0\0054T\0\6\2\10\1\t\1\22\4\24\1\25\1..., 44) 
= 44
fstat64(7, {st_mode=S_IFREG|0644, st_size=9804, ...}) = 0
mmap2(NULL, 41136, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 7, 0) = 
0xb5de4000
mprotect(0xb5de6000, 28672, PROT_NONE)  = 0
mmap2(0xb5ded000, 8192, PROT_READ|PROT_WRITE, 
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 7, 0x1) = 0xb5ded000
close(7)= 0
access(/etc/ld.so.nohwcap, F_OK)  = -1 ENOENT (No such file or directory)
open(/usr/lib/arm-linux-gnueabi/libstdc++.so.6, O_RDONLY) = 7
read(7, 
\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0(\0\1\0\0\0\270\252\4\0004\0\0\0..., 512) 
= 512
lseek(7, 783152, SEEK_SET)  = 783152
read(7, \0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0..., 
1200) = 1200
lseek(7, 782844, SEEK_SET)  = 782844
read(7, A+\0\0\0aeabi\0\1!\0\0\0\0054T\0\6\2\10\1\t\1\22\4\24\1\25\1..., 44) 
= 44
fstat64(7, {st_mode=S_IFREG|0644, st_size=784352, ...}) = 0
mmap2(NULL, 843144, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 7, 0) = 
0xb5d16000

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

2012-01-11 Thread Sylvestre Ledru
Le mercredi 11 janvier 2012 à 02:57 +, peter green a écrit :

 So I tried building a trivial test program (just an empty main function 
 nothing else) with clang on armhf and got the following error
 
 root@debian:/# clang test.c
 clang: warning: unknown platform, assuming -mfloat-abi=soft
 /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@debian:/#
As said in the error message, could you start it again with -v ?

what is the result of
$ dpkg -S crti.o
on your system ?

and
$ dpkg -l|grep llvm

Thanks
Sylvestre





-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



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

2012-01-11 Thread peter green

Sylvestre Ledru wrote:

As said in the error message, could you start it again with -v ?
  

armhf:

root@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@debian:/#

armel:

root@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


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

2012-01-10 Thread peter green

package: clang
severity: grave
x-debbugs-cc: debian-...@lists.debian.org

When trying to build libblocksruntime both locally and on the buildds it 
fails with the following warnings and errors.


make[1]: Entering directory 
`/build/buildd-libblocksruntime_0.1-1-armhf-kukYFg/libblocksruntime-0.1'
clang -c -o runtime.o -DBlocksRuntime_EXPORTS -fPIC -std=c99 -Wall -Wextra -W 
-pedantic -Wno-unused-parameter runtime.c
clang: warning: unknown platform, assuming -mfloat-abi=soft
clang -c -o data.o -DBlocksRuntime_EXPORTS -fPIC -std=c99 -Wall -Wextra -W 
-pedantic -Wno-unused-parameter data.c
clang: warning: unknown platform, assuming -mfloat-abi=soft
clang -shared -Wl,-export-dynamic -Wl,-soname,libBlocksRuntime.so.0 -o libBlocksRuntime.so.0.0  runtime.o data.o 
/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)
make[1]: *** [libBlocksRuntime.so] Error 1

So I tried building a trivial test program (just an empty main function 
nothing else) with clang on armhf and got the following error


root@debian:/# clang test.c
clang: warning: unknown platform, assuming -mfloat-abi=soft
/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@debian:/#

I then tried the same trivial test program on armel and that failed too

root@debian:~# clang test.c
/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@debian:~#

Both the armel and armhf environments were running clang 3.0-5

P.S. can someone fix the failing reason for libblocksruntime to point 
to this bug

rather than the closed bug it points to at the moment.



--
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org