Ubuntu 14.x error with U-boot make for ARM10 arm-altera-eabi-gcc: Command not found

I am attempting to compile Uboot and the Uboot DTS for the Arria 10 SoC dev kit. I have successfully generated the BSP using the BSP-editor, and upon running ‘make’ I get this error in the terminal (running from Embedded command shell from my uboot_bsp directory):

make CROSS_COMPILE=arm-altera-eabi- -C uboot-socfpga all
make[1]: Entering directory '/localcad/sf1/ArriaX/a10_soc_1588/a10_soc_devkit_ghrd/software/uboot_bsp/uboot-socfpga’
make[1]: arm-altera-eabi-gcc: Command not found

Any ideas on what the problem is?

Has anyone ever seen this arm-altera-eabi-gcc error? Is there any way to generate a more verbose error report?

Looks like it doesnt find your cross compiler. Is it in the path?

That’s what it looks like, but when I do ‘which arm-altera-eabi-gcc’ it echoes the path as:

localcad/installs/intelFPGA/16.1/embedded/host_tools/mentor/gnu/arm/baremetal/bin/arm-altera-eabi-gcc

I wonder if it’s a permissions thing? I am $USER=root, and I can create/modify everything in the build path except right at the / level? I think someone else made the localcad directory on this Ubuntu machine.

Anyone else know what I could try? I am just trying to run ‘make’ after making a BSP of my own, to make uboot. If I can get more verbose error info even that would help.

Hi jlemon_fs,

I had encountered issues with Quartus’ and Intel’s tools in the recent past whilst running on debian.

For instance, I had to install the following 32-bit libraries in order for the tools to run properly:

sudo apt-get install lib32z1 lib32ncurses5
sudo dpkg --add-architecture i386
sudo apt-get update
sudo apt-get install libX11-6:i386 libext6:i386
sudo apt-get install libxft2:i386
sudo apt-get install libstdc++6:i386

Don’t fully trust the snippet above: try each one to check if this is actually the problem, that your system is missing some of these libraries.

Be aware that when bash says "command not found"it can mean that, but it can also mean that the command executed but something went wrong with it, as explained here:

Hi ptorru,

I am running a 64-bit version of Ubuntu, so maybe I am missing some 32-bit libraries that are required. I think you’re right when it says “command not found” it would seem it’s not the command itself, but something inside is wrong - I just wish more information could be reported! I will try these libraries that you suggest - thanks for the reply!

Hi ptorru,

Before I had a chance to run the commands you provided, and for the sake of still making progress, yesterday I had moved on in the GSRD instructions to building the Linux device tree and Linux itself. The instructions for building Linux included adding/installing some libraries. And it seemingly has fixed my issue and it now builds u-boot with no errors! I’m not certain which one fixed it, but here are the commands, one of which would have fixed it:

sudo apt-get update

sudo apt-get upgrade

sudo apt-get install phablet-tools sed wget cvs subversion git-core coreutils unzip texi2html texinfo libsdl1.2-dev docbook-utils gawk python-pysqlite2 diffstat help2man make gcc build-essential g++ desktop-file-utils chrpath libgl1-mesa-dev libglu1-mesa-dev mercurial autoconf automake groff libtool xterm lib32z1

sudo apt-get install ia32-libs lib32stdc++6

sudo ln -sf bash /bin/sh

… So I’m not sure which would have fixed it - possibly the lib32stdc++6 ?

1 Like

Quite possibly jlemon_fs, thanks for reporting back, it looks like that was actually the problem. I hope this helps others with similar issues!

Indeed it was - thanks for helping!

Hi, I ran into a very similar problem last week when compiling the preloader for a Cyclone V on Ubuntu 17.04. I got “Command not found” for arm-altera-eabi-gcc. The directory to arm-altera-eabi.gcc was in my path, and the file was present. Even when I was in that directory and tried to execute ./arm-atera-eabi-gcc, I received “Command not found”.

With some help, it was determined that the 32 bit loader, ld-linux.so.2 was missing. We figured it out by executing the “ldd” command against the arm-altera-eabi.gcc file (pipe the output to grep, searching for “not found”). Note: I was already in the directory where arm-altera-eabi-gcc was located, but the path can be specified in the command.

ldd arm-altera-eabi-gcc | grep “not found”

The ldd command finds shared libraries required by programs.

Went to the Ubuntu packages search page, searched contents of package for ld-linux.so.2. It is in libc6-i386 - downloaded and installed it with command:

sudo apt-get install libc6-i386

It fixed the problem.

George1024,

I also had an error about a 32-bit loader at one point too. I don’t know what all the abovementioned libraries are off-hand, but would libc6-i386 be the same/similar to libstdc++6:i386 ? All I know is that it was one of the ones listed above…

John

Hi John,
Sorry for the delay in replying. It is possible that those two packages both contain the 32 bit loader that was missing, but when I do the package content search on the Ubuntu website, only the libc6-i386 package comes up, so that is what I used on my Ubuntu 17.04 installation.

If I would guess, the two packages you list would be different one appears to be for C and the other for C++, but I’m not an expert on this…