Aarch64 linux android gcc no such file or directory

It’s a blog. Just a blog!

Устраняем ошибку «unable to execute ‘gcc’: No such file or directory»

Данная заметка — одна из цикла мини заметок про возникающие проблемы при работе с Python, pip и другими приложениями, используемые при разработке на языке Python. Описываемые проблемы встречаются в повседней работе системных администраторов, программистов,DevOps’ов. Непосредственно данные ошибки возникали при разработке программного комплекса Barsemon. Данный программный комплекс должен будет использоваться для мониторинга серверов, сетевого оборудования, окончания доменов и SSL сертификатов, и других критически важных объектов, приложений, оборудования. На данный момент проект находится в стадии разработки.

И так, при установке зависимостей Python могут возникать ошибки компилирования пакета(ов). Ниже представлен вывод программы инсталятора и возникающая при установке пакета ошибка.

Стоит обратить внимание, что установка пакетов, именно в этом примере, осуществляется согласно списку пакетов из файла requirements.txt. Ошибка(и) может/могут возникать как при групповой установке пакетов, так и при установке одиночного пакета.

(!)Все установки производятся на dev сервере, работающего на базе Centos 7.x и Python 3.4

Вывод программы инсталятора:

Как мы видим, установка пакетов была прервана из-за ошибки компиляции.

Ошибка говорит о необходимости установки в операционную систему пакета GCC компилятора.

Для установки пакета GCC компилятора необходимо выполнить команду:

После установки GCC пакета, необходимо заново запустить установку пакетов Python.

Установка пакетов должна пройти без каких-либо ошибок.

Источник

Aarch64 linux android gcc no such file or directory

Этот материал не претендует на абсолютную истину, может быть, что-то можно сделать проще и быстрее. Автор как знает, так и делает. Кроме того он не является большим экспертом в области nix-систем. Всё, что написано ниже, найдено на просторах интернета, в большинстве своём на не русскоязычных форумах, систематизировано и изложено на родном для автора языке — русском.

Коллеги, не задавайте мне вопросы по данной теме в личку, уже несколько лет как я забросил Android и не интересуюсь развитием ядер, как впрочем и самого Android-a.

Сообщение отредактировал PaWill — 08.03.16, 14:54

Часть 1. Необходимые инструменты и исходники

Для компиляции ядра нам потребуется nix-подобная операционная система. Я использовал Ubuntu 10.04 LTS — Long-term support 32-bit, которую установил на виртуальную машину VMware Workstation. Где всё это добро скачать/купить, как установить мы здесь обсуждать не будем. Если вы это не смогли сделать самостоятельно или с помощью гугла, то читать эту статью для вас ещё рано (или уже поздно). 🙂
И так, у нас всё установлено и работает. Теперь проверим все ли необходимые компоненты присутствуют в системе, возможно какие то пакеты придётся доустановить.
Запускаем терминал:

В терминале вводим следующую команду [1]:

Судя по последней строке у меня все пакеты на месте:

У вас, вероятней всего, не будет важного пакета — sun-java6-jdk on Ubuntu 10.04 (Lucid). Для его автоматической загрузки нужно в адреса репозитория добавить дополнительные ссылки. Введите в терминале:

После того как всё скачается и установится опять команда [1] пока не будет ошибок. Будем считать что с Ubuntu покончили.

Теперь нам потребуются собственно сами исходники ядра. Их можно найти на http://opensource.samsung.com/. В строке поиска вводим «I9000» и получаем:

Нас интересует JPX GT-I9000_OpenSource_Froyo_update2.zip (211 МБ), делаем как на скрине и жмём «Continue».

Ещё нам потребуется кросс-компилятор, которым будем собирать ядро:
http://www.codesourcery.com/sgpp/lite/arm/. nux-gnu.tar.bz2 (80 МБ)

И последнее что потребуется — это initramfs.cpio. Я выдрал его из JS8. Как это сделать расскажу как-нибудь отдельно.
JS8_initramfs.tar ( 2,64 МБ )

Пока всё, продолжение следует.

Сообщение отредактировал PaWill — 19.03.11, 19:38

Часть 2. Распаковка исходников

Всё что вы скачали будет находится в каталоге /home/имя_пользователя/Загрузки. У меня этот путь выглядит как:

Источник

Aarch64 linux android gcc no such file or directory

Инструкции по сборке Android из исходников

Мануалы в помощь новичку и обсуждение для гуру!
Описание | Старая шапка | Собираем ядро для MTK | Первая помощь | Редактирование системных ресурсов Android | Средство обработки прошивок

Что такое ADB и с чем его едят, читаем тут. Отследить новую версию ADB можно в репо от Google.
ADB для Winodws — Скачать sha1:52b4816990d2d18a34645bbf20a31b38a7859d4c
ADB для Linux — Скачать sha1:31078104e5927d823c28550c01275c437a87def7
ADB для MacOSx — Скачать sha1:1403fa0d1bb57ec31170d7905e8505e3b0ed05ee

Что такое маркет и с чем его едят, читайте в этой теме.

Android 4.1.*: microgapps скачать
Android 4.2.*: microgapps Скачать
Android 4.3.*: microgapps Скачать
Android 4.4 : ART microgapps Скачать
Android 4.4.1: ART microgapps Скачать
Android 4.4.2: ART microgapps Скачать
Android 5.0.2: ART microgapps Скачать
Android 5.0.2: ART microgapps Скачать By Mansi
Android 5.1.0: ART minigapps Скачать faq

microgapps — пакет Google Apps с самым основным, только Google Play и framework. Остальное можно установить из Google Play.
minigapps — Пакет Google Apps с самым основным набором ПО от Google.
ART — совместимы с ART режимом, появился в версиях Android 4.4 KitKat.

FlymeOS 5/6 от rocker123
Скачать Огромная коллекция на XDA 4.x-6.x
Скачать OmniRom + Prebuilts 4.x-6.x От ctavropoholb
Скачать Qualcomm MSM8974 и MSM8939 От acdev
Скачать MIUI PatchRom miui5-7 От ctavropoholb
Скачать CyanogenMod 10.1 — 13 4.х.х-6.х.х От ctavropoholb
Скачать CyanogenMod 12.1 android-5.1.1_r18 От SteelBreaker
Скачать Prebuilts AOSP 5.0.x От assusdan
Скачать MIUI PatchRom KitKat v6 От vgdn1942
Скачать AOSP mirror repo От wladimir_tm
Скачать AOSP, AOKP, CM, MIUI 4.4.4 От vaibhavpandeyvpz
Скачать CyanogenMod 11 4.4.4 От Никита Pro Android
Скачать CyanogenMod 10 4.1 От Scorpio92666
Скачать CyanogenMod 7.2.0 2.3.x От pryanya96
Скачать AOSPA ParanoidAndroid 4.4.4 От mrAlmid
Скачать Ubuntu phablet 4.4.2_r1 От Каточимото
Скачать repo snapshots cm-10.2 — android5.1 От wladimir_tm

После чего, качаем исходники командой repo sync

Источник

[REFERENCE] How to compile an Android kernel

gokart2

Senior Member

SXUsr

Senior Member

I feel as giddy as I did the first time I modified my first apk years ago.

Had a bit of trial and error using the commands in the OP but then decided to use the instructions in the XPERIA.readme that came with the archive, and voila. Next up is trying to upstream.

I do have a couple of questions though.

1. Where can I change the Kernel version name?
Kind of answered above. I assume you just add «=mykernelname»?
2. I’m also going to build the kernel for my tablet because I want to be able to use the Fota Partition for TWRP instead of it being built into the boot.img, but unsure as to how I go about including this — extract_elf_ramdisk

Any help appreciated.

nathanchance

Senior Recognized Developer / Contributor

I feel as giddy as I did the first time I modified my first apk years ago.

Had a bit of trial and error using the commands in the OP but then decided to use the instructions in the XPERIA.readme that came with the archive, and voila. Next up is trying to upstream.

I do have a couple of questions though.

1. Where can I change the Kernel version name?
Kind of answered above. I assume you just add «=mykernelname»?
2. I’m also going to build the kernel for my tablet because I want to be able to use the Fota Partition for TWRP instead of it being built into the boot.img, but unsure as to how I go about including this — extract_elf_ramdisk

Any help appreciated.

For number 1, you can either use the LOCALVERSION environment variable (export LOCALVERSION=-mykernelname) or CONFIG_LOCALVERSION in your defconfig.

For number 2, I have no idea.

ezzony

Senior Member

Hi, total noob to this. First thing I want to do is just compile from source without making any changes. 64 bit architecture device.

error:
line 25: /home/ezzony/mykernel/aarch64-linux-android-4.9/bin/aarch64-linux-android-gcc: No such file or directory

I had no problems creating the .config file. I tried NDK and googlesource.

onliner

Senior Member

Hi, total noob to this. First thing I want to do is just compile from source without making any changes. 64 bit architecture device.

error:
line 25: /home/ezzony/mykernel/aarch64-linux-android-4.9/bin/aarch64-linux-android-gcc: No such file or directory

I had no problems creating the .config file. I tried NDK and googlesource.

The toolchain path (your export CROSS_COMPILE) is wrong, I’m 99.9% sure it’s in the «/home/ezzony/» part.

Pro-tip: use $ instead of /home or

ezzony

Senior Member

The toolchain path (your export CROSS_COMPILE) is wrong, I’m 99.9% sure it’s in the «/home/ezzony/» part.

Pro-tip: use $ instead of /home or

Makes no difference if I use your suggestions and even $(pwd). In any case the error message produces the correct path in all cases i.e /home/ezzony/mykernel/aarch64-linux-android-4.9/bin/aarch64-linux-android-gcc

This is the code my kernel source code readme file says to use but it did not say where to place the files and the path doesn’t make sense to me after the pwd part:
===========================================
a) cd kernel/msm-3.18
b) mkdir -p out
c) make ARCH=arm64 O=./out elsa_nao_us-perf_defconfig
d) make ARCH=arm64 O=./out CROSS_COMPILE=$(pwd)/../../prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9/bin/aarch64-linux-android- KERNEL_COMPRESSION_SUFFIX=gz -j4
==============================================

Is there a chance I’ve done something else wrong that has noting to do with CC path?

AndDiSa

Senior Member

@ezzony I doubt that you have the compiler binaries installed in /home/ezzony/mykernel/aarch64-linux-android-4.9
generally you have the following structure:
— (android-src)
— prebuilts/gcc/.
— .
— kernel/ /msm-3.18
— .
— out/.
.

If you do not follow that structrure, you should define the CROSS_COMPILE environment variable as an absolute path to the compiler binaries, e.g.

but this depends on the location where you put the compiler binaries.

ezzony

Senior Member

Which gives me this path to the files: /home/ezzony/mykernel/aarch64-linux-android-4.9/bin/

I had previously downloaded nkd which gave this path:
/home/ezzony/mykernel/ndk/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/

I got the same error but I noticed this file was missing in the ndk download: aarch64-linux-android-gcc as per the error. That is why i tried gogglesource instead.

I don’t understand the difference between using ndk and googlesource.

Does the structure matter, where you store the files, as long as you give the right path, generally?

If you do not follow that structrure, you should define the CROSS_COMPILE environment variable as an absolute path to the compiler binaries, e.g.

but this depends on the location where you put the compiler binaries.

AndDiSa

Senior Member

@ezzony
if your installation directory is /home/ezzony/mykernel/aarch64-linux-android-4.9 you should set CROSS_COMPILE=/home/ezzony/mykernel/aarch64-linux-android-4.9/bin/aarch64-linux-android-

. but one moment: I just saw «gcc-4.9: remove GCC from Android» on the master branch, you didn’t checkout master, did you? Probably it’s sufficient to checkout «ndk-release-r21» instead of «master» to fix your issues.

ezzony

Senior Member

. but one moment: I just saw «gcc-4.9: remove GCC from Android» on the master branch, you didn’t checkout master, did you? Probably it’s sufficient to checkout «ndk-release-r21» instead of «master» to fix your issues.

expanded
git clone h**ps;//android.googlesource.com/platform/prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9

That is what I input. I don’t know what checkout master is. The download was about 300meg. Are there files missing, is that what your saying?

So I have downloaded 2 things, my phones kernel source code directly from LG and the above.

AndDiSa

Senior Member

you could try to do a

git checkout ndk-release-r21

in the directory where you have cloned the compiler (aarch64-linux-android-4.9)

ezzony

Senior Member

you could try to do a

git checkout ndk-release-r21

in the directory where you have cloned the compiler (aarch64-linux-android-4.9)

Well that changed something but now I’m clueless what’s going on with new errors. Do I have to use git? Can I not just download the files I need locally and leave git out of it all together for the time being. I’ve no idea how it works and I won’t be able to fix problems with it as they arise.

Here is the new output with errors anyways.

make ARCH=arm64 O=./out elsa_nao_us-perf_defconfig
make[1]: Entering directory ‘/home/ezzony/mykernel/kernel/msm-3.18/out’

../arch/arm64/Makefile:136: warning: overriding recipe for target ‘vdso_prepare’
../arch/arm64/Makefile:126: warning: ignoring old recipe for target ‘vdso_prepare’
GEN ./Makefile
#
# arch/arm64/configs/elsa_nao_us-perf_defconfig:1 include file arch/arm64/configs/elsa_nao_us_common
#
#
# arch/arm64/configs/elsa_nao_us_common:1 include file arch/arm64/configs/elsa_common
#
arch/arm64/configs/elsa_common:433:warning: override: reassigning to symbol LG_OIS
#
# arch/arm64/configs/elsa_nao_us-perf_defconfig:2 include file arch/arm64/configs/elsa_common-perf
#
arch/arm64/configs/elsa_common-perf:13:warning: override: reassigning to symbol CC_OPTIMIZE_FOR_SIZE
warning: (LGE_USB_HOST_SUPPORT_LIST_INPUT) selects MOUSE_APPLETOUCH which has unmet direct dependencies (!UML && INPUT && INPUT_MOUSE && USB_ARCH_HAS_HCD)
warning: (LGE_USB_HOST_SUPPORT_LIST_INPUT) selects MOUSE_BCM5974 which has unmet direct dependencies (!UML && INPUT && INPUT_MOUSE && USB_ARCH_HAS_HCD)
warning: (LGE_USB_HOST_SUPPORT_LIST_INPUT) selects MOUSE_SYNAPTICS_USB which has unmet direct dependencies (!UML && INPUT && INPUT_MOUSE && USB_ARCH_HAS_HCD)
warning: (LGE_USB_HOST_SUPPORT_LIST_INPUT) selects MOUSE_APPLETOUCH which has unmet direct dependencies (!UML && INPUT && INPUT_MOUSE && USB_ARCH_HAS_HCD)
warning: (LGE_USB_HOST_SUPPORT_LIST_INPUT) selects MOUSE_BCM5974 which has unmet direct dependencies (!UML && INPUT && INPUT_MOUSE && USB_ARCH_HAS_HCD)
warning: (LGE_USB_HOST_SUPPORT_LIST_INPUT) selects MOUSE_SYNAPTICS_USB which has unmet direct dependencies (!UML && INPUT && INPUT_MOUSE && USB_ARCH_HAS_HCD)
#
# configuration written to .config
#
make[1]: Leaving directory ‘/home/ezzony/mykernel/kernel/msm-3.18/out’
[email protected]:

Источник

Читайте также:  Darktable для windows 10
Оцените статью