8

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

Simson
  • 3,373
  • 2
  • 24
  • 38
Sam
  • 4,521
  • 13
  • 46
  • 81

5 Answers5

23

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

sudo apt-get install gcc-aarch64-linux-gnu
Pang
  • 9,564
  • 146
  • 81
  • 122
user7305360
  • 231
  • 2
  • 2
6

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

talshorer
  • 662
  • 3
  • 9
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.

g00glen00b
  • 41,995
  • 13
  • 95
  • 133
Jonathan
  • 595
  • 5
  • 10
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

GaloisPlusPlus
  • 403
  • 4
  • 20
2

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

Kevin Chou
  • 489
  • 5
  • 8