Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ld unrecognised emulation mode aarch64linux

Tags:

linker

cmake

ld

When running make in CMake, I only get an error that says /usr/bin/ld unrecognised emulation mode aarch64linux.

Im trying to build DualBootPatcher app for Android, this is the error:

/usr/bin/ld: unrecognised emulation mode: aarch64linux Supported emulations: elf_x86_64 elf32_x86_64 elf_i386 elf_iamcu elf_l1om elf_k1om i386pep i386pe clang: error: linker command failed with exit code 1 (use -v to see invocation) make[5]: *** [misc/CMakeFiles/fsck-wrapper.dir/build.make:76: misc/fsck-wrapper] Error 1 make[4]: *** [CMakeFiles/Makefile2:1786: misc/CMakeFiles/fsck-wrapper.dir/all] Error 2 make[3]: *** [Makefile:163: all] Error 2 make[2]: *** [android/CMakeFiles/android-system_arm64-v8a.dir/build.make:111: android/android-system_arm64-v8a-prefix/src/android-system_arm64-v8a-stamp/android-system_arm64-v8a-build] Error 2 make[1]: *** [CMakeFiles/Makefile2:1868: android/CMakeFiles/android-system_arm64-v8a.dir/all] Error 2 make: *** [Makefile:163: all] Error 2>

Im running latest Cmake and binutils. Also tried reinstalling binutils. Im NOT a developers, so it would be nice if you could explain it^^ Does anyone has a solution?

like image 268
Simon Avatar asked Jan 28 '19 16:01

Simon


Video Answer


1 Answers

The issue is clear from the fact that the output is coming from /usr/bin/ld. This is the system ld, rather than the ld included with the NDK. You should investigate why this ld is being executed instead, for example via strace.

For me it turned out to be a file permissions issue - the NDK zip file had extracted without execute permissions, so the toolchain binaries were silently ignored. A few chmod +x later and all was well.

like image 118
Dark Avatar answered Sep 17 '22 09:09

Dark