Arm none linux gnueabi gcc codesourcery

gcc-arm-linux-gnueabi command not found

I am trying to install the gnu arm toolchain for ubuntu. I first downloaded the tar from CodeSourcery. However when I go into the bin folder, I cannot run any of the binaries. I have tried with ./ and without and putting it in the PATH and it keeps telling me «Command not Found» yet the file is there in the folder right in front of me. Then I tried sudo apt-get install gcc-arm-linux-gnueabi except after it says it has installed successfully, I cannot find it with whereis gcc-arm-linux-gnueabi. Can anyone help?

if you install from source code, you need compile the source and install the bin. However, if you download compiled bin, you can run it. could give more information, after you use apt to install it. try to use sudo find / -name «*gcc-arm*» to find if there are some bin

apt-get install ia32-libs. You are trying to run 32 bit binaries on a 64 bit linux install. Been there, done that.

12 Answers 12

sudo apt-get install gcc-arm* 

Are you compiling on a 64-bit OS? Try:

sudo apt-get install ia32-libs 

I had the same problem when trying to compile the Raspberry Pi kernel. I was cross-compiling on Ubuntu 12.04 64-bit and the toolchain requires ia32-libs to work on on a 64-bit system.

On ubuntu, when i give this command, it throws error — Package ia32-libs is not available, but is referred to by another package.

CodeSourcery convention is to use prefix arm-none-linux-gnueabi- for all executables, not gcc-arm-linux-gnueabi that you mention. So, standard name for CodeSourcery gcc would be arm-none-linux-gnueabi-gcc .

Читайте также:  Удалить пользователя linux debian

After you have installed CodeSourcery G++, you need to add CodeSourcery directory into your PATH .

Typically, I prefer to install CodeSourcery into directory like /opt/arm-2010q1 or something like that. If you don’t know where you have installed it, you can find it using locate arm-none-linux-gnueabi-gcc , however you may need to force to update your locate db using sudo updatedb before locate will work properly.

After you have identified where your CodeSourcery is installed, add it your PATH by editing ~/.bashrc like this:

Also, it is customary and very convenient to define

CROSS_COMPILE=arm-none-linux-gnueabi- 

in your .bashrc , because with CROSS_COMPILE defined, most tools will automatically use proper compiler for ARM compilation without you doing anything.

Источник

Команда gcc-arm-linux-gnueabi не найдена

Я пытаюсь установить набор инструментов gnu arm для Ubuntu. Сначала я скачал tar из CodeSourcery. Однако, когда я захожу в папку bin, я не могу запустить ни один из двоичных файлов. Я попытался с./ и без и поместил его в PATH, и он продолжает говорить мне «Команда не найдена», но файл находится в папке прямо передо мной. Затем я попытался выполнить команду sudo apt-get install gcc-arm-linux-gnueabi, за исключением того, что после успешного завершения установки я не могу найти его с помощью whereis gcc-arm-linux-gnueabi. Кто-нибудь может помочь?

10 ответов

Исправлено с использованием:

sudo apt-get install gcc-arm* 

Компилируете ли вы на 64-битной ОС? Пытаться:

sudo apt-get install ia32-libs 

У меня была такая же проблема при попытке скомпилировать ядро ​​Raspberry Pi. Я выполнял кросс-компиляцию на 64-битной Ubuntu 12.04, а для набора инструментов требуется ia32-libs для работы на 64-битной системе.

Читайте также:  Основные отличия операционной системы linux

Соглашение CodeSourcery заключается в использовании префикса arm-none-linux-gnueabi- для всех исполняемых файлов, а не gcc-arm-linux-gnueabi что вы упоминаете. Итак, стандартное имя для CodeSourcery GCC будет arm-none-linux-gnueabi-gcc ,

После того, как вы установили CodeSourcery G++, вам нужно добавить каталог CodeSourcery в ваш PATH ,

Как правило, я предпочитаю устанавливать CodeSourcery в каталог, как /opt/arm-2010q1 или что-то типа того. Если вы не знаете, где вы его установили, вы можете найти его, используя locate arm-none-linux-gnueabi-gcc , однако вам может потребоваться принудительно обновить вашу базу данных с помощью sudo updatedb до locate будет работать правильно.

После того, как вы определили, где установлен ваш CodeSourcery, добавьте его в PATH, отредактировав ~/.bashrc как это:

Также принято и очень удобно определять

CROSS_COMPILE=arm-none-linux-gnueabi- 

в вашем .bashrc потому что с CROSS_COMPILE Определено, большинство инструментов будет автоматически использовать правильный компилятор для компиляции ARM без каких-либо действий.

Источник

Оцените статью
Adblock
detector