This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Building a new Linux Kernel - "make" error

I am following the GSG:_DVSDK_2.0_Software_Setup_In_Ubuntu guide & on running the following:

sudo make ARCH=arm CROSS_COMPILE=arm_v5t_le- uImage

in order to attempt to compile the Kernel I receive the following error:

make: arm_v5t_le-gcc: Command not found
CHK include/linux/version.h
make[1]: 'include/asm-arm/mach-types.h' is up to date.
CHK include/linux/utsrelease.h
CC arch/arm/kernel/asm-offsets.s
/bin/sh arm_v5t_le-gcc: not found
make[1]: *** [arch/arm/kernel/arm-offsets.s] Error 127
make: *** [prepare0] Error 2

I have added the relevant paths which I confirmed by running:

echo $PATH

which correctly has the montavista/pro/devkit/arm/v5t_le/bin ; montavista/pro/bin & montavista/common/bin paths included

I can also confirm that I am able to run arm_v5t_le-gcc from this location.

What am I missing? Where can I find information on "Error 127"?

  • NickAllen said:

    I am following the GSG:_DVSDK_2.0_Software_Setup_In_Ubuntu guide & on running the following:

    sudo make ARCH=arm CROSS_COMPILE=arm_v5t_le- uImage

    I am curious why you are running the make command with sudo, as this should not be necessary for the kernel build? I believe this is your problem, as the root account (even though it is through sudo) does not share the same path as the user, so if you modify your path in ~/.bashrc it will only work for commands your un as yourself.

    As a quick test run these two commands:

    arm_v5t_le-gcc -v
    sudo arm_v5t_le-gcc -v

    If your Ubuntu box is configured like mine you should get a bunch of text and version information from the fist command and a command not found error for the second command, in which case it explains why make cannot find the compiler when run as sudo.

  • 100% spot on!

    Running it as sudo was pulling in roots PATH which did not have the additional path. I have picked up a bad habit is using sudo for most things I run in the console to avoid any permission denieds etc. I guess I need to rather chown -R all my required dir's...

    Thanks a mill.