Open tcwangbuaa opened 2 years ago
While build on macOS with target=android-aarch64,
[INFO] build protobuf in /Users/blank/Desktop/bolt-master/third_party/android-aarch64/protobuf... CMake Error at /Applications/CMake.app/Contents/share/cmake-3.22/Modules/CMakeTestCCompiler.cmake:69 (message): The C compiler
"/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang"
is not able to compile a simple test program.
It fails with the following output:
Change Dir: /Users/blank/Desktop/bolt-master/third_party/android-aarch64/protobuf/protobuf-3.14.0/build/CMakeFiles/CMakeTmp
Run Build Command(s):/usr/bin/make -f Makefile cmTC_9c965/fast && make -f CMakeFiles/cmTC_9c965.dir/build.make CMakeFiles/cmTC_9c965.dir/build
Building C object CMakeFiles/cmTC_9c965.dir/testCCompiler.c.o
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang --target=aarch64-linux-android21 --target=aarch64-linux-android21 --target=aarch64-linux-android21 -MD -MT CMakeFiles/cmTC_9c965.dir/testCCompiler.c.o -MF CMakeFiles/cmTC_9c965.dir/testCCompiler.c.o.d -o CMakeFiles/cmTC_9c965.dir/testCCompiler.c.o -c /Users/blank/Desktop/bolt-master/third_party/android-aarch64/protobuf/protobuf-3.14.0/build/CMakeFiles/CMakeTmp/testCCompiler.c
Linking C executable cmTC_9c965
/Applications/CMake.app/Contents/bin/cmake -E cmake_link_script CMakeFiles/cmTC_9c965.dir/link.txt --verbose=1
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang --target=aarch64-linux-android21 --target=aarch64-linux-android21 --target=aarch64-linux-android21 -rdynamic CMakeFiles/cmTC_9c965.dir/testCCompiler.c.o -o cmTC_9c965
ld: unknown option: -z
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[1]: *** [cmTC_9c965] Error 1
make: *** [cmTC_9c965/fast] Error 2
CMake will not be able to correctly generate this project. Call Stack (most recent call first): CMakeLists.txt:20 (project)
when build for android using android-aarch64 target, you need to set ANDROID_NDK_ROOT shell environment to find ndk toolchains in ${ANDROID_NDK_ROOT}/toolchains/llvm/prebuilt/darwin-x86_64/bin
Can you give more information for windows build? you can refer bolt windows workflow in https://github.com/huawei-noah/bolt/blob/master/.github/workflows/windows-x86-avx2.yml
you can use --converter=off to close converter build.
CMake Error at C:/Program Files/CMake/share/cmake-3.22/Modules/CMakeTestCCompiler.cmake:69 (message): The C compiler
is not able to compile a simple test program.
It fails with the following output: