Yannick Blondeau Yannick Blondeau - 7 months ago 36
Linux Question

uclinux compilation error

I'm trying to cross-compile uclinux using a toolchain provided by the hardarware manufacturer.

When I run the

command, I get an error that I cannot understand:

yannick@ubuntu:~/uclinux-dist$ make
make -C tools/ucfront
make[1]: Entering directory `/home/yannick/uclinux-dist/tools/ucfront'
make[1]: `ucfront' is up to date.
make[1]: Leaving directory `/home/yannick/uclinux-dist/tools/ucfront'
ln -sf /home/yannick/uclinux-dist/tools/ucfront/ucfront tools/ucfront-gcc
ln -sf /home/yannick/uclinux-dist/tools/ucfront/ucfront tools/ucfront-g++
make ARCH=arm CROSS_COMPILE=arm-uclinux-elf- -C linux-2.6.x || exit 1
make[1]: arm-uclinux-elf-gcc: Command not found
make[1]: Entering directory `/home/yannick/uclinux-dist/linux-2.6.x'
CHK include/linux/version.h
make[2]: `include/asm-arm/mach-types.h' is up to date.
CC arch/arm/kernel/asm-offsets.s
/bin/sh: 1: arm-uclinux-elf-gcc: not found
make[2]: *** [arch/arm/kernel/asm-offsets.s] Error 127
make[1]: *** [prepare0] Error 2
make[1]: Leaving directory `/home/yannick/uclinux-dist/linux-2.6.x'
make: *** [linux] Error 1

yannick@ubuntu:~/uclinux-dist$ locate arm-uclinux-elf-gcc

yannick@ubuntu:~/uclinux-dist$ echo $PATH

yannick@ubuntu:~/uclinux-dist$ ls -l /usr/local/bin
lrwxrwxrwx 1 root root 52 May 20 22:53 arm-uclinux-elf-gcc -> /usr/local/arm-uclinux-tools/bin/arm-uclinux-elf-gcc

yannick@ubuntu:~/uclinux-dist$ ls -l /usr/local/arm-uclinux-tools/bin/
-rwxr-xr-x 1 root root 81832 May 20 19:27 arm-uclinux-elf-gcc


Thanks !!


The value of your path when you run make is not necessarily what it is when your command executes. I would place an echo $PATH in the actual makefile just before you attempt to compile the source file.

That will at least give an indication as to whether something is changing your path during the build process.