This is the mail archive of the crossgcc@sourceware.org mailing list for the crossgcc project.

See the CrossGCC FAQ for lots more information.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Toolchain has UID dependency


HI all.

I have built a toolchain using CT-NG 1.4.2. I used that version because I need to target a system using an older kernel & glibc, and because I was following a recipe that I found online. Also CT-NG 1.7.0 failed to build a toolchain (but that's a different problem). The toolchain seemed to build successfully on the Debian 5 build host. I tarred up the result, and unpacked it on a RHEL4 host, but at a different location in the filesystem (which I don't think should matter). Gcc seems to work there, but only if run by the UID that built the toolchain on the Debian host, or as user 'root'.

I have tried changing ownership of all files in the toolchain to another user. All users that I need to be able to use the toolchain have a primary group that matches the group owner of everything in the toolchain. All user permissions are the same as the group permissions for every file in the toolchain (I found one that differed, changed it to match, but it had no effect).

Compiling a 'helloWorld.c' by any user that is not the toolchain builder UID gives:

$ /usr1/local/support/Xtools/arm-unknown-linux-gnu/bin/arm-unknown-linux-gnu-gcc -c helloWorld.c

cc1: error: /home/bomr/x-tools/arm-unknown-linux-gnu/lib/gcc/arm-unknown-linux-gnu/4.1.2/include: Permission denied
cc1: error: /home/bomr/x-tools/arm-unknown-linux-gnu/arm-unknown-linux-gnu/include: Permission denied

Performing the exact same operation by the builder UID works perfectly well.

It is worth observing that the directory mentioned in the error message only ever existed on the build host; never on the filesystem now hosting the toolchain.


$ /usr1/local/epics/support/Xtools/arm-unknown-linux-gnu/bin/arm-unknown-linux-gnu-gcc --verbose


Using built-in specs.
Target: arm-unknown-linux-gnu
Configured with: /home/bomr/Projects/CrossDevel/crosstool/crosstool-ng-1.4.2/targets/src/gcc-4.1.2/configure --build=i486-build_pc-linux-gnu --host=i486-build_pc-linux-gnu --target=arm-unknown-linux-gnu --prefix=/home/bomr/x-tools/arm-unknown-linux-gnu --with-sysroot=/home/bomr/x-tools/arm-unknown-linux-gnu/arm-unknown-linux-gnu//sys-root --enable-languages=c,c++ --disable-multilib --with-arch=armv4t --with-gmp=/home/bomr/x-tools/arm-unknown-linux-gnu --with-mpfr=/home/bomr/x-tools/arm-unknown-linux-gnu --enable-__cxa_atexit --with-local-prefix=/home/bomr/x-tools/arm-unknown-linux-gnu/arm-unknown-linux-gnu//sys-root --disable-nls --enable-threads=posix --enable-symvers=gnu --enable-c99 --enable-long-long --enable-target-optspace
Thread model: posix
gcc version 4.1.2


I cannot find anything that links the executable binaries of the toolchain to a UID or GID, and yet the problem occurs. Looking for any advice to help shed light on this problem.
Thanks for listening.
--- rod.




--
For unsubscribe information see http://sourceware.org/lists.html#faq


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]