在CMake中运行make时,我只得到一个错误,指出/usr/bin/ld无法识别模拟模式aarch64linux。
我正在尝试为安卓构建DualBootPatcher应用,这是错误:
/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>
我正在运行最新的Cmake和binutils。我还尝试了重新安装binutils。我不是开发人员,所以如果你能解释一下就太好了^^有人有解决方案吗?
发布于 2019-11-26 20:56:38
从输出来自/usr/bin/ld
的事实可以清楚地看出这个问题。这是系统ld
,而不是包含在NDK中的ld
。您应该调查为什么要执行这个ld
,例如通过strace
。
对我来说,这是一个文件权限问题- NDK zip文件在没有执行权限的情况下解压,因此工具链二进制文件被默默忽略。几个chmod +x
之后,一切都很好。
https://stackoverflow.com/questions/54406361
复制相似问题