Keil Logo

ARMCC: Run Arm Compiler Toolchain in Linux


Information in this knowledgebase article applies to:

  • ARMCC v5.x Compiler Toolchain

SYMPTOM

I have downloaded and installed ARMCC v5.x compiler toolchain from this link on my Ubuntu Linux PC.

But when I run ./armcc directly from my installation folder, it keeps giving error "No such file or directory". I have checked the file permission of all executable files in /installation_folder/bin or /installation_folder/bin64, my user account has execution rights for all these executable files.

How can I resolve this issue?

CAUSE

It is very likely due to the fact that your Ubuntu Linux is a 64-bit OS, and previously you haven't yet installed 32-bit libraries, in order to run 32-bit executables in a 64-bit Linux OS.

The following output from the command uname can confirm your Ubuntu is a 64-bit OS

uname -i
x86_64

If you run the following command and get the output like:

ldd /installation_folder/bin64/armcc
not a dynamic executable

and call the command:

file /installation_folder/bin64/armcc
armcc: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux.so.2, for GNU/Linux 2.6.18, stripped

That means you are trying running armcc, which is a 32-bit executable, in your 64-bit Linux OS, where the necessary 32-bit dynamic libraries are missing.

Note that all executable files except armlink in the directory /installation_folder/bin64/ are still 32-bit executable files.

RESOLUTION

In Ubuntu (note that other Linux variants might have different commands), call this command to install such 32-bit dynamic libraries.

sudo apt-get install lib32z1

Afterwards, calling ldd command might show this output:

ldd /installation_folder/bin64/armcc
linux-gate.so.1 (0xf7f5b000)
libm.so.6 => /lib32/libm.so.6 (0xf7e77000)
libc.so.6 => /lib32/libc.so.6 (0xf7c9e000)
/lib/ld-linux.so.2 (0xf7f5d000)
libdl.so.2 => /lib32/libdl.so.2 (0xf7c99000)
libpthread.so.0 => /lib32/libpthread.so.0 (0xf7c7a000)

It indicates now the necessary 32-bit dynamic libraries are available.

In this case you can call ./armcc directly from your installation folder as a normal executable file, or call it from anywhere, if you add the directory path /installation_folder/bin and /installation_folder/bin64 to your linux PATH system environment variable.

In order to configure your ARM compiler toolchain in Linux to work with a MDK flex license, follow this LICENSE: Using ARM compiler in Linux with MDK flex license.

Last Reviewed: Wednesday, December 19, 2018


Did this article provide the answer you needed?
 
Yes
No
Not Sure
 
  Arm logo
Important information

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.

Change Settings

Privacy Policy Update

Arm’s Privacy Policy has been updated. By continuing to use our site, you consent to Arm’s Privacy Policy. Please review our Privacy Policy to learn more about our collection, use and transfers
of your data.