9

I am trying to build the kernel source on my platform with the following command:

make ARCH=arm CROSS_COMPILE=aarch64-linux-gnu- generic-v8-defconfig

However, the error messages appear as shown in the following:

/bin/sh: 1: aarch64-linux-gnu-gcc: not found

It's obvious I have not this version of gcc installed on my laptop.

I then followed

http://www.howtoinstall.co/en/ubuntu/trusty/main/gcc-4.8-aarch64-linux-gnu/

This to install gcc-4.8-aarch-linux-gnu,

however, I still get the same error message.

Ubuntu version: 14.04

Please let me know if you know how to fix this.

Thanks

1

6 Answers 6

29

Maybe aarch64-linux-gnu-gcc is not installed. Try

sudo apt-get install gcc-aarch64-linux-gnu
2
  • 1
    # pacman -S aarch64-linux-gnu-gcc on arch linux
    – Brad
    Commented Aug 2, 2023 at 16:17
  • dnf install gcc-aarch64-linux-gnu gcc-c++-aarch64-linux-gnu on fedora
    – ioi-xd
    Commented Aug 16 at 23:39
7

looks like a PATH issue. what happens when you just type "aarch64-linux-gnu-gcc "in your shell? does it find the compiler?

3
3

You can use the following commands:

sudo add-apt-repository ppa:linaro-maintainers/toolchain
sudo apt-get update
sudo apt-get install gcc-**version**-aarch64-linux-gnu

Make sure to replace **version** by the correct version.

3

Try it:

debian/ubuntu:

sudo apt-get install gcc-aarch64-linux-gnu # GNU C compiler for the arm64 architecture
sudo apt-get install g++-aarch64-linux-gnu # GNU C++ compiler

2

Use ndk tool to install the arm64 cross compiler:

$NDK_ROOT/build/tools/make-standalone-toolchain.sh --arch=arm64 --install-dir=/opt/android-toolchain export PATH=$PATH:/opt/android-toolchain

0

Do this, it will get solved CROSS_COMPILE=aarch64-linux-gnu- make flash.bin -j $(nproc --all)

1
  • Your answer could be improved with additional supporting information. Please edit to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers in the help center.
    – Community Bot
    Commented Mar 17 at 17:52

Not the answer you're looking for? Browse other questions tagged or ask your own question.