Dear all
I hope this is the correct place to write for my problem.
After loosing 2 hours figuring out why my distcc didn't want to run cross compiling gcc for armv7, I finally found the issue.
The toolchain I used is the one from this topic :
https://archlinuxarm.org/wiki/Distcc_Cross-Compiling
And this one for my pi 2 : https://archlinuxarm.org/builder/xtools ... s7h.tar.xz
After a long struggle here is the sump up :
- I created a simple hello world program, named taist.c
Running this, works fine :
PATH=/opt/x-tools7h/arm-unknown-linux-gnueabihf/bin:/usr/bin armv7l-unknown-linux-gnueabihf-gcc -c taist.c -Wall
No error, generated taist.o is correct.
Howere running the same line on a preprocessed file (like distcc do), lead to an error :
PATH=/opt/x-tools7h/arm-unknown-linux-gnueabihf/bin:/usr/bin armv7l-unknown-linux-gnueabihf-gcc -c taist.i -Wall
cc1: error: /home/leming/x-tools7h-new/arm-unknown-linux-gnueabihf/arm-unknown-linux-gnueabihf/sysroot/home/leming/x-tools7h-new/arm-unknown-linux-gnueabihf/arm-unknown-linux-gnueabihf/sysroot/include: Permission denied
cc1: error: /home/leming/x-tools7h-new/arm-unknown-linux-gnueabihf/arm-unknown-linux-gnueabihf/sysroot/usr/include: Permission denied
(taist.i is only the output of armv7l-unknown-linux-gnueabihf-gcc -E)
If I do the same thing with the native gcc of my x86-64 (archlinux) no error at all.
This issue on my system is that /home is not accessible to some users (for example user nobody run by distcc), /home is an NFS mount.
But what is not an issue for the x86-64 gcc is an issue for the cross compilation gcc.
gcc from archlinux seems to have been built from a /build directory :
# strings /usr/bin/gcc | grep configure | grep prefix
/build/gcc/src/gcc/configure [...] blabla
the cross compilation gcc seems to have been built from a /home/leming directory :
strings /opt/x-tools7h/arm-unknown-linux-gnueabihf/bin/gcc | grep configure | grep prefix
/home/leming/cross/bin/.build/arm-unknown-linux-gnueabihf/src/gcc/configure [...] blabla
If I umount my /home directory, the cross compilation gcc works fine, and doing an ls on :
/home/leming/x-tools7h-new/arm-unknown-linux-gnueabihf/arm-unknown-linux-gnueabihf/sysroot/home/leming/x-tools7h-new/arm-unknown-linux-gnueabihf/arm-unknown-linux-gnueabihf/sysroot/include
returns File Not Found instead of Permission denied
File Not Found is ok for gcc, but if it get an Permission Denied it simply stops.
So, I don't know if the issue is at gcc side, or if the x-tools from archlinux arm should be built from a non existing directory (like /build from standard archlinux gcc), but I just wanted to write this post to avoid someone else to loose 2 hours of his time
Thank you for reading