Build Failure

I’m trying to build the CoreElec image for my Odroid-N2 board - I checked out the Github repository here on my Linux build host running Ubuntu 18.04 and built it using the following invocation:

PROJECT=Amlogic ARCH=aarch64 make image

It keeps failing however with the following error:

    make[2]: Entering directory '/home/johnsj/work/CoreELEC/build.CoreELEC-Amlogic.aarch64-9.2-devel/openssl-1.1.1d/.x86_64-linux-gnu'
make[2]: Leaving directory '/home/johnsj/work/CoreELEC/build.CoreELEC-Amlogic.aarch64-9.2-devel/openssl-1.1.1d/.x86_64-linux-gnu'
make[2]: Entering directory '/home/johnsj/work/CoreELEC/build.CoreELEC-Amlogic.aarch64-9.2-devel/openssl-1.1.1d/.x86_64-linux-gnu'
aarch64-linux-gnu-/home/johnsj/work/CoreELEC/build.CoreELEC-Amlogic.aarch64-9.2-devel/toolchain/bin/host-gcc  -I. -Iinclude -fPIC -pthread -m64 -march=native -O2 -Wall -pipe -I/home/johnsj/work/CoreELEC/build.CoreELEC-Amlogic.aarch64-9.2-devel/toolchain/include -Wno-format-security -march=native -O2 -Wall -pipe -Wno-format-security -DOPENSSL_USE_NODELETE -DL_ENDIAN -DOPENSSL_PIC -DOPENSSL_CPUID_OBJ -DOPENSSL_IA32_SSE2 -DOPENSSL_BN_ASM_MONT -DOPENSSL_BN_ASM_MONT5 -DOPENSSL_BN_ASM_GF2m -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -DKECCAK1600_ASM -DRC4_ASM -DMD5_ASM -DVPAES_ASM -DGHASH_ASM -DECP_NISTZ256_ASM -DX25519_ASM -DPOLY1305_ASM -DOPENSSLDIR="\"/home/johnsj/work/CoreELEC/build.CoreELEC-Amlogic.aarch64-9.2-devel/toolchain/etc/ssl\"" -DENGINESDIR="\"/home/johnsj/work/CoreELEC/build.CoreELEC-Amlogic.aarch64-9.2-devel/toolchain/lib/engines-1.1\"" -DNDEBUG -I/home/johnsj/work/CoreELEC/build.CoreELEC-Amlogic.aarch64-9.2-devel/toolchain/include  -c -o apps/app_rand.o apps/app_rand.c
/bin/sh: 1: aarch64-linux-gnu-/home/johnsj/work/CoreELEC/build.CoreELEC-Amlogic.aarch64-9.2-devel/toolchain/bin/host-gcc: not found
make[2]: *** [Makefile:700: apps/app_rand.o] Error 127
make[2]: Leaving directory '/home/johnsj/work/CoreELEC/build.CoreELEC-Amlogic.aarch64-9.2-devel/openssl-1.1.1d/.x86_64-linux-gnu'
make[1]: *** [Makefile:172: all] Error 2
make[1]: Leaving directory '/home/johnsj/work/CoreELEC/build.CoreELEC-Amlogic.aarch64-9.2-devel/openssl-1.1.1d/.x86_64-linux-gnu'
FAILURE: scripts/build openssl:host has failed!
[014/281] [FAIL] build   openssl:host

The following logs for this failure are available:
  stdout: /home/johnsj/work/CoreELEC/build.CoreELEC-Amlogic.aarch64-9.2-devel/.threads/logs/17/stdout
  stderr: /home/johnsj/work/CoreELEC/build.CoreELEC-Amlogic.aarch64-9.2-devel/.threads/logs/17/stderr

parallel: This job failed:
package_worker 2 17 281 'build openssl:host'
Parallel build failure - see log for details. Time of failure: Sun Dec  1 10:33:02 EST 2019
Makefile:12: recipe for target 'image' failed
make: *** [image] Error 1

Any ideas why?

PROJECT=Amlogic-ng ARCH=arm make image

Still same issue:

/bin/sh: 1: aarch64-linux-gnu-/home/johnsj/work/CoreELEC/build.CoreELEC-Amlogic-ng.aarch64-9.2-devel/toolchain/bin/host-gcc: not found
make[2]: *** [Makefile:700: apps/app_rand.o] Error 127
make[2]: Leaving directory '/home/johnsj/work/CoreELEC/build.CoreELEC-Amlogic-ng.aarch64-9.2-devel/openssl-1.1.1d/.x86_64-linux-gnu'
make[1]: *** [Makefile:172: all] Error 2
make[1]: Leaving directory '/home/johnsj/work/CoreELEC/build.CoreELEC-Amlogic-ng.aarch64-9.2-devel/openssl-1.1.1d/.x86_64-linux-gnu'
FAILURE: scripts/build openssl:host has failed!
parallel: This job failed:
package_worker 4 17 267 'build openssl:host'
Parallel build failure - see log for details. Time of failure: Sun Dec  1 12:08:58 EST 2019
make: *** [image] Error 1
Makefile:12: recipe for target 'image' failed

ARCH is arm and not aarch64.

Doh! Thanks for the that tip - nonetheless, I still get the same error:

/bin/sh: 1: aarch64-linux-gnu-/home/johnsj/work/CoreELEC/build.CoreELEC-Amlogic-ng.arm-9.2-devel/toolchain/bin/host-gcc: not found
make[2]: *** [Makefile:700: apps/app_rand.o] Error 127
make[2]: Leaving directory '/home/johnsj/work/CoreELEC/build.CoreELEC-Amlogic-ng.arm-9.2-devel/openssl-1.1.1d/.x86_64-linux-gnu'
make[1]: *** [Makefile:172: all] Error 2
make[1]: Leaving directory '/home/johnsj/work/CoreELEC/build.CoreELEC-Amlogic-ng.arm-9.2-devel/openssl-1.1.1d/.x86_64-linux-gnu'
FAILURE: scripts/build openssl:host has failed!

Check your bash environment variables, do you have CROSS_COMPILE specified somewhere?