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.

  • Resolved

Error on first compile, cannot locate arm-linux-gnueabihf-gcc

Prodigy 110 points

Replies: 7

Views: 16547

My first compile of uImage is going poorly. I have downloaded ti-sdk-am335x-evm-07.00.00.00.00-Linux-x86-Install" from software-dl-ti-com/sitara_linux/esd/AM335xSDK/latest/index_FDS.html" and successfully installed. The prebuilt images run fine on the BBB. I am following the very simple steps here to build uImage: "processors.wiki.ti.com/index.php/Linux_Kernel_Users_Guide"

The error is this: "make: arm-linux-gnueabihf-gcc: Command not found". This prevents running the final "make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- uImage" from succeeding as well.

Oddly, $PATH appears correct - yet the gcc compiler cannot be found.

Perhaps I am making a very simple, fundamental mistake? Thanks for the help!

David

david@david-VirtualBox:~/ti-sdk-am335x-evm-07.00.00.00/board-support/linux-3.12.10-ti2013.12.01$ echo $PATH
/usr/lib/lightdm/lightdm:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games
david@david-VirtualBox:~/ti-sdk-am335x-evm-07.00.00.00/board-support/linux-3.12.10-ti2013.12.01$ export PATH="/home/david/ti-sdk-am335x-evm-07.00.00.00/linux-devkit/sysroots/i686-arago-linux/usr/bin/":$PATH
david@david-VirtualBox:~/ti-sdk-am335x-evm-07.00.00.00/board-support/linux-3.12.10-ti2013.12.01$ echo $PATH
/home/david/ti-sdk-am335x-evm-07.00.00.00/linux-devkit/sysroots/i686-arago-linux/usr/bin/:/usr/lib/lightdm/lightdm:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games
david@david-VirtualBox:~/ti-sdk-am335x-evm-07.00.00.00/board-support/linux-3.12.10-ti2013.12.01$ make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- mrproper
  CLEAN   .tmp_versions
rm: cannot remove `.tmp_versions': Permission denied
make: *** [clean] Error 1
david@david-VirtualBox:~/ti-sdk-am335x-evm-07.00.00.00/board-support/linux-3.12.10-ti2013.12.01$ sudo make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- mrproper
[sudo] password for david:
make: arm-linux-gnueabihf-gcc: Command not found
  CLEAN   .tmp_versions
  CLEAN   scripts/basic
  CLEAN   scripts/kconfig
  CLEAN   include/config include/generated arch/arm/include/generated
  CLEAN   .config include/generated/uapi/linux/version.h
david@david-VirtualBox:~/ti-sdk-am335x-evm-07.00.00.00/board-support/linux-3.12.10-ti2013.12.01$

  • Hi David,

    Verify that the arm-linux-gnueabihf-gcc file can be found by issuing the following command:

    which arm-linux-gnueabihf-gcc

    If this is found and there is still an error while making the uImage, please try to pass the full path to the cross-compiler toolchain to the CROSS_COMPILE= argument. Example:

    CROSS_COMPILE=/home/david/ti-sdk-am335x-evm-07.00.00.00/linux-devkit/sysroots/i686-arago-linux/usr/bin/arm-linux-gnueabihf-

    Best regards,
    Miroslav


    --------------------------------------------------------------------------------------------------------------------------------
    Note: If this post answers your question, please click the Verify Answer button below. Thank you!
    --------------------------------------------------------------------------------------------------------------------------------
  • In reply to Miroslav Kiradzhiyski XID:

    Apologies - I jumped the gun. I'm afraid the problems persist:

    //Here's me setting the PATH and verifying that "which" finds gcc:

    david@david-VirtualBox:~$ cd /opt/ti-sdk-am335x-evm-07.00.00.00/board-support/linux-3.12.10-ti2013.12.01/
    david@david-VirtualBox:/opt/ti-sdk-am335x-evm-07.00.00.00/board-support/linux-3.12.10-ti2013.12.01$ PATH=/opt/ti-sdk-am335x-evm-07.00.00.00/linux-devkit/sysroots/i686-arago-linux/usr/bin/:$PATH
    david@david-VirtualBox:/opt/ti-sdk-am335x-evm-07.00.00.00/board-support/linux-3.12.10-ti2013.12.01$ which arm-linux-gnueabihf-gcc
    /opt/ti-sdk-am335x-evm-07.00.00.00/linux-devkit/sysroots/i686-arago-linux/usr/bin//arm-linux-gnueabihf-gcc

    //Here's the issue, still present despite a second "which" that still finds it:


    david@david-VirtualBox:/opt/ti-sdk-am335x-evm-07.00.00.00/board-support/linux-3.12.10-ti2013.12.01$ sudo make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- distclean
    [sudo] password for david:
    make: arm-linux-gnueabihf-gcc: Command not found
    david@david-VirtualBox:/opt/ti-sdk-am335x-evm-07.00.00.00/board-support/linux-3.12.10-ti2013.12.01$ which arm-linux-gnueabihf-gcc
    /opt/ti-sdk-am335x-evm-07.00.00.00/linux-devkit/sysroots/i686-arago-linux/usr/bin//arm-linux-gnueabihf-gcc

    //Here's me trying the entire absolute path


    david@david-VirtualBox:/opt/ti-sdk-am335x-evm-07.00.00.00/board-support/linux-3.12.10-ti2013.12.01$ sudo make ARCH=arm CROSS_COMPILE=/opt/ti-sdk-am335x-evm-07.00.00.00/linux-devkit/sysroots/i686-arago-linux/usr/bin/arm-linux-gnueabihf- distclean
    david@david-VirtualBox:/opt/ti-sdk-am335x-evm-07.00.00.00/board-support/linux-3.12.10-ti2013.12.01$ sudo make ARCH=arm CROSS_COMPILE=/opt/ti-sdk-am335x-evm-07.00.00.00/linux-devkit/sysroots/i686-arago-linux/usr/bin/arm-linux-gnueabihf- menuconfig
      HOSTCC  scripts/basic/fixdep
    /bin/sh: 1: gcc: not found
    make[1]: *** [scripts/basic/fixdep] Error 127
    make: *** [scripts_basic] Error 2
    david@david-VirtualBox:/opt/ti-sdk-am335x-evm-07.00.00.00/board-support/linux-3.12.10-ti2013.12.01$ sudo make ARCH=arm CROSS_COMPILE=/opt/ti-sdk-am335x-evm-07.00.00.00/linux-devkit/sysroots/i686-arago-linux/usr/bin/arm-linux-gnueabihf- tisdk_am335x-evm_defconfig
      HOSTCC  scripts/basic/fixdep
    /bin/sh: 1: gcc: not found
    make[1]: *** [scripts/basic/fixdep] Error 127
    make: *** [scripts_basic] Error 2
    david@david-VirtualBox:/opt/ti-sdk-am335x-evm-07.00.00.00/board-support/linux-3.12.10-ti2013.12.01$

    //And I'm afraid that I still get a failure.

    Note that I've completely reinstalled the SDK, and attempted many other fixes. May I trouble you for a second look at this?

    Thanks!

    David

  • In reply to David Bennett:

    This looks like as if your Makefile doesn't receive any value for the CROSS_COMPILE variable.

    This is a bit of a hack, but open the Makefile, locate where the CROSS_COMPILE variable is set and overwrite it with your value.

    Best regards,
    Miroslav


    --------------------------------------------------------------------------------------------------------------------------------
    Note: If this post answers your question, please click the Verify Answer button below. Thank you!
    --------------------------------------------------------------------------------------------------------------------------------
  • Try this way:

    export PATH=/opt/ti-sdk-am335x-evm-07.00.00.00/linux-devkit/sysroots/i686-arago-linux/usr/bin:$PATH

    make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- mrproper

  • In reply to Karolis B.:

    Thanks very much for your reply.

    //Everything goes well through the steps you describe:

    david@david-VirtualBox:~$ cd /opt/ti-sdk-am335x-evm-07.00.00.00/board-support/linux-3.12.10-ti2013.12.01/
    david@david-VirtualBox:/opt/ti-sdk-am335x-evm-07.00.00.00/board-support/linux-3.12.10-ti2013.12.01$ export PATH=/opt/ti-sdk-am335x-evm-07.00.00.00/linux-devkit/sysroots/i686-arago-linux/usr/bin/:$PATH
    david@david-VirtualBox:/opt/ti-sdk-am335x-evm-07.00.00.00/board-support/linux-3.12.10-ti2013.12.01$ echo $PATH
    /opt/ti-sdk-am335x-evm-07.00.00.00/linux-devkit/sysroots/i686-arago-linux/usr/bin/:/usr/lib/lightdm/lightdm:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games
    david@david-VirtualBox:/opt/ti-sdk-am335x-evm-07.00.00.00/board-support/linux-3.12.10-ti2013.12.01$ which arm-linux-gnueabihf-gcc
    /opt/ti-sdk-am335x-evm-07.00.00.00/linux-devkit/sysroots/i686-arago-linux/usr/bin//arm-linux-gnueabihf-gcc
    david@david-VirtualBox:/opt/ti-sdk-am335x-evm-07.00.00.00/board-support/linux-3.12.10-ti2013.12.01$ make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- mrproper

    //This all looks good - no errors yet. It's just the next step when I attempt a configuration that the error persists

    david@david-VirtualBox:/opt/ti-sdk-am335x-evm-07.00.00.00/board-support/linux-3.12.10-ti2013.12.01$ make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- menuconfig
      HOSTCC  scripts/basic/fixdep
    /bin/sh: 1: gcc: not found
    make[1]: *** [scripts/basic/fixdep] Error 127
    make: *** [scripts_basic] Error 2

    //Which boggles me as which still finds gcc


    david@david-VirtualBox:/opt/ti-sdk-am335x-evm-07.00.00.00/board-support/linux-3.12.10-ti2013.12.01$ which arm-linux-gnueabihf-gcc
    /opt/ti-sdk-am335x-evm-07.00.00.00/linux-devkit/sysroots/i686-arago-linux/usr/bin//arm-linux-gnueabihf-gcc

    Any thoughts on this? Thanks!

    David

  • In reply to David Bennett:

    I had exactly the same ‘arm-linux-gnueabihf-gcc command not found’ issue, I remove the 'sudo' when commit the make command, then problem fixed, hope this would help you.

  • In reply to yu min:

    I think I may have been doing several things wrong with permissions. Let me provide the steps that worked. The key for me was that all of these steps should be done WITHOUT sudo privileges.


    1. Download sdk from here: http://www.ti.com/tool/linuxezsdk-sitara

    2. Navigate to ~/Downloads and chmod +x the installer

    3. ./ the installer

    4.Run setup.sh if desired

    5. export PATH=<sdk path>/linux-devkit/sysroots/i686-arago-linux/usr/bin:$PATH

    6. run the make commands as detailed here: http://processors.wiki.ti.com/index.php/Linux_Kernel_Users_Guide

    No SUDOs allowed!

    Thanks to all for your help!

    Dave

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.