GCC Search Directory Problem -- crosstool-ng-1.4.0

Ben Atkinson bwa4992@yahoo.com
Fri May 1 17:53:00 GMT 2009


Hello,

I am using crosstool-ng-1.4.0 to build a cross compiler in the following
context:

build  = i486-linux-gnu (Ubuntu 8.10)
host   = i486-linux-gnu (same)
target = arm-unknown-linux-gnueabi (TS-7370 SBC)

As a preliminary test, I started with the arm-unknown-linux-gnueabi
sample .config file and tried it "as-is".

The build completed successfully, but I get different results depending
on whether I execute gcc or arm-unknown-linux-gnueabi-gcc.

In the first case:

$ /home/batkinson/x-tools/arm-unknown-linux-gnueabi/arm-unknown-linux-gnueabi/bin/gcc -o Hello Hello.c
gcc: error trying to exec 'cc1': execvp: No such file or directory

The gcc produced by crosstool-ng searches the following directories -- I
split the names up to make them easier to read:

$ /home/batkinson/x-tools/arm-unknown-linux-gnueabi/arm-unknown-linux-gnueabi/bin/gcc -print-search-dirs
install: /home/batkinson/x-tools/arm-unknown-linux-gnueabi/arm-unknown-linux-gnueabi/bin/../lib/gcc/arm-unknown-linux-gnueabi/4.3.2/

programs: =/home/batkinson/x-tools/arm-unknown-linux-gnueabi/arm-unknown-linux-gnueabi/bin/../libexec/gcc/arm-unknown-linux-gnueabi/4.3.2/
            /home/batkinson/x-tools/arm-unknown-linux-gnueabi/arm-unknown-linux-gnueabi/bin/../libexec/gcc/
            /home/batkinson/x-tools/arm-unknown-linux-gnueabi/arm-unknown-linux-gnueabi/bin/../lib/gcc/arm-unknown-linux-gnueabi/4.3.2/../../../../arm-unknown-linux-gnueabi/bin/arm-unknown-linux-gnueabi/4.3.2/
            /home/batkinson/x-tools/arm-unknown-linux-gnueabi/arm-unknown-linux-gnueabi/bin/../lib/gcc/arm-unknown-linux-gnueabi/4.3.2/../../../../arm-unknown-linux-gnueabi/bin/

libraries: =/home/batkinson/x-tools/arm-unknown-linux-gnueabi/arm-unknown-linux-gnueabi/bin/../lib/gcc/arm-unknown-linux-gnueabi/4.3.2/
            /home/batkinson/x-tools/arm-unknown-linux-gnueabi/arm-unknown-linux-gnueabi/bin/../lib/gcc/
            /home/batkinson/x-tools/arm-unknown-linux-gnueabi/arm-unknown-linux-gnueabi/bin/../lib/gcc/arm-unknown-linux-gnueabi/4.3.2/../../../../arm-unknown-linux-gnueabi/lib/arm-unknown-linux-gnueabi/4.3.2/
            /home/batkinson/x-tools/arm-unknown-linux-gnueabi/arm-unknown-linux-gnueabi/bin/../lib/gcc/arm-unknown-linux-gnueabi/4.3.2/../../../../arm-unknown-linux-gnueabi/lib/
            /home/batkinson/x-tools/arm-unknown-linux-gnueabi/arm-unknown-linux-gnueabi//sys-root/lib/arm-unknown-linux-gnueabi/4.3.2/
            /home/batkinson/x-tools/arm-unknown-linux-gnueabi/arm-unknown-linux-gnueabi//sys-root/lib/
            /home/batkinson/x-tools/arm-unknown-linux-gnueabi/arm-unknown-linux-gnueabi//sys-root/usr/lib/arm-unknown-linux-gnueabi/4.3.2/
            /home/batkinson/x-tools/arm-unknown-linux-gnueabi/arm-unknown-linux-gnueabi//sys-root/usr/lib/

Of particular interest to the location of the cc1 program is:
/home/batkinson/x-tools/arm-unknown-linux-gnueabi/arm-unknown-linux-gnueabi/bin/../libexec/gcc/arm-unknown-linux-gnueabi/4.3.2/

The cc1 program actually resides in:
/home/batkinson/x-tools/arm-unknown-linux-gnueabi/libexec/gcc/arm-unknown-linux-gnueabi/4.3.2/cc1

In the "bin-based" format used by gcc search paths, it should be:
/home/batkinson/x-tools/arm-unknown-linux-gnueabi/arm-unknown-linux-gnueabi/bin/../../libexec/gcc/arm-unknown-linux-gnueabi/4.3.2/

Notice the extra set of ".." in the middle.  I searched this mailing
list and Google for this error, but I couldn't find anything that
applies to crosstool-ng.

If I execute the "full name" version of gcc, everything works fine:
$ /home/batkinson/x-tools/arm-unknown-linux-gnueabi/bin/arm-unknown-linux-gnueabi-gcc -o Hello Hello.c

Shouldn't both instances of gcc work equally well?  Am I missing something?

Thank you for any help,

Ben


      


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



More information about the crossgcc mailing list