Hi there, After compiling a file I can attempt to link it while passing a --sysroot argument. With my linaro ld, this works, but not with my debian ld (can not find libc.so.6):
stephen@hal:~/dev/src/playground/cmake/build{master}$ strace -e open /usr/bin/arm-linux-gnueabihf-ld --sysroot=/home/stephen/rpi/rasp-pi-rootfs - export-dynamic -z relro -X --hash-style=gnu --build-id --eh-frame-hdr -m armelf_linux_eabi -dynamic-linker /lib/ld-linux-armhf.so.3 -o foo /home/stephen/rpi/rasp-pi-rootfs/usr/lib/gcc/arm-linux- gnueabihf/4.6/../../../arm-linux-gnueabihf/crt1.o /home/stephen/rpi/rasp-pi- rootfs/usr/lib/gcc/arm-linux-gnueabihf/4.6/../../../arm-linux- gnueabihf/crti.o /home/stephen/rpi/rasp-pi-rootfs/usr/lib/gcc/arm-linux- gnueabihf/4.6/crtbegin.o -L/home/stephen/rpi/rasp-pi-rootfs/usr/lib/gcc/arm- linux-gnueabihf/4.6 -L/home/stephen/rpi/rasp-pi-rootfs/usr/lib/gcc/arm- linux-gnueabihf/4.6/../../../arm-linux-gnueabihf -L/home/stephen/rpi/rasp- pi-rootfs/lib/arm-linux-gnueabihf -L/home/stephen/rpi/rasp-pi- rootfs/usr/lib/arm-linux-gnueabihf -L/home/stephen/rpi/rasp-pi- rootfs/usr/lib/gcc/arm-linux-gnueabihf/4.6/../../.. - L/home/stephen/rpi/rasp-pi-rootfs/lib -L/home/stephen/rpi/rasp-pi- rootfs/usr/lib CMakeFiles/foo.dir/main.cpp.o -lstdc++ -lm -lgcc_s -lgcc -lc -lgcc_s -lgcc /home/stephen/rpi/rasp-pi-rootfs/usr/lib/gcc/arm-linux- gnueabihf/4.6/crtend.o /home/stephen/rpi/rasp-pi-rootfs/usr/lib/gcc/arm- linux-gnueabihf/4.6/../../../arm-linux-gnueabihf/crtn.o 2>&1 | grep libc.so.6 open("/usr/x86_64-linux-gnu/arm-linux-gnueabihf/lib/libc.so.6", O_RDONLY| O_CLOEXEC) = -1 ENOENT (No such file or directory) open("/home/stephen/dev/prefix/qtbase/kde/lib/libc.so.6", O_RDONLY| O_CLOEXEC) = -1 ENOENT (No such file or directory) open("/home/stephen/dev/prefix/qtbase/lib/libc.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory) open("/lib/x86_64-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 3 open("/lib/arm-linux-gnueabihf/libc.so.6", O_RDONLY) = -1 ENOENT (No such file or directory) /usr/bin/arm-linux-gnueabihf-ld: cannot find /lib/arm-linux- gnueabihf/libc.so.6 inside stephen@hal:~/dev/src/playground/cmake/build{master}$ strace -e open /home/stephen/rpi/gcc-4.7-linaro-rpi-gnueabihf/bin/arm-linux-gnueabihf-ld -- sysroot=/home/stephen/rpi/rasp-pi-rootfs -export-dynamic -z relro -X --hash- style=gnu --build-id --eh-frame-hdr -m armelf_linux_eabi -dynamic-linker /lib/ld-linux-armhf.so.3 -o foo /home/stephen/rpi/rasp-pi- rootfs/usr/lib/gcc/arm-linux-gnueabihf/4.6/../../../arm-linux- gnueabihf/crt1.o /home/stephen/rpi/rasp-pi-rootfs/usr/lib/gcc/arm-linux- gnueabihf/4.6/../../../arm-linux-gnueabihf/crti.o /home/stephen/rpi/rasp-pi- rootfs/usr/lib/gcc/arm-linux-gnueabihf/4.6/crtbegin.o - L/home/stephen/rpi/rasp-pi-rootfs/usr/lib/gcc/arm-linux-gnueabihf/4.6 - L/home/stephen/rpi/rasp-pi-rootfs/usr/lib/gcc/arm-linux- gnueabihf/4.6/../../../arm-linux-gnueabihf -L/home/stephen/rpi/rasp-pi- rootfs/lib/arm-linux-gnueabihf -L/home/stephen/rpi/rasp-pi- rootfs/usr/lib/arm-linux-gnueabihf -L/home/stephen/rpi/rasp-pi- rootfs/usr/lib/gcc/arm-linux-gnueabihf/4.6/../../.. - L/home/stephen/rpi/rasp-pi-rootfs/lib -L/home/stephen/rpi/rasp-pi- rootfs/usr/lib CMakeFiles/foo.dir/main.cpp.o -lstdc++ -lm -lgcc_s -lgcc -lc -lgcc_s -lgcc /home/stephen/rpi/rasp-pi-rootfs/usr/lib/gcc/arm-linux- gnueabihf/4.6/crtend.o /home/stephen/rpi/rasp-pi-rootfs/usr/lib/gcc/arm- linux-gnueabihf/4.6/../../../arm-linux-gnueabihf/crtn.o 2>&1 | grep libc.so.6 open("/home/stephen/dev/prefix/qtbase/kde/lib/libc.so.6", O_RDONLY| O_CLOEXEC) = -1 ENOENT (No such file or directory) open("/home/stephen/dev/prefix/qtbase/lib/libc.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory) open("/lib/i386-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 3 open("/home/stephen/rpi/rasp-pi-rootfs/lib/arm-linux-gnueabihf/libc.so.6", O_RDONLY|O_LARGEFILE) = 14 open("/home/stephen/rpi/rasp-pi-rootfs/lib/arm-linux-gnueabihf/libc.so.6", O_RDONLY|O_LARGEFILE) = 14 The debian ld seems to be ignoring the sysroot. I also notice that some x86_64-linux-gnu triples appear in the stract output. This could be related to http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=708744 Any idea how I could further diagnose what's going wrong? Thanks, Steve. -- To UNSUBSCRIBE, email to debian-arm-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/5204f3aa.8050...@gmail.com