我想在Ubuntu18.0.4下编译pcl库供安卓使用, 使用的是pcl-for-android这个git提供的方式,用的是ndk25的安卓工具链
。唯一 要求是安卓api level需是32 。 目前在编译中遇到如下错误。
Cross-build from 'Linux:x86_64' to 'Android:armv8'
Installing (downloading, building) binaries...
android-toolchain/r25b@bashbug/stable: Already installed!
lz4/1.9.2@bashbug/stable: Applying build-requirement: android-toolchain/r25b@bashbug/stable
lz4/1.9.2@bashbug/stable: WARN: Build folder is dirty, removing it: /root/.conan/data/lz4/1.9.2/bashbug/stable/build/278fbbfd93b48508f4bb6ebf2f52cc80110f5b26
lz4/1.9.2@bashbug/stable: Copying sources to build folder
lz4/1.9.2@bashbug/stable: Building your package in /root/.conan/data/lz4/1.9.2/bashbug/stable/build/278fbbfd93b48508f4bb6ebf2f52cc80110f5b26
lz4/1.9.2@bashbug/stable: Generator txt created conanbuildinfo.txt
lz4/1.9.2@bashbug/stable: Aggregating env generators
lz4/1.9.2@bashbug/stable: Calling build()
-- The C compiler identification is unknown
-- The CXX compiler identification is unknown
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - failed
-- Check for working C compiler: /root/.conan/data/android-toolchain/r25b/bashbug/stable/package/be241241e9d4718e5bab4eb33935bbb69606bb0c/android-ndk-r25b/toolchains/llvm/prebuilt/linux-x86_64/bin/clang
-- Check for working C compiler: /root/.conan/data/android-toolchain/r25b/bashbug/stable/package/be241241e9d4718e5bab4eb33935bbb69606bb0c/android-ndk-r25b/toolchains/llvm/prebuilt/linux-x86_64/bin/clang - broken
CMake Error at /usr/share/cmake-3.22/Modules/CMakeTestCCompiler.cmake:69 (message):
The C compiler
"/root/.conan/data/android-toolchain/r25b/bashbug/stable/package/be241241e9d4718e5bab4eb33935bbb69606bb0c/android-ndk-r25b/toolchains/llvm/prebuilt/linux-x86_64/bin/clang"
is not able to compile a simple test program.
It fails with the following output:
Change Dir: /root/.conan/data/lz4/1.9.2/bashbug/stable/build/278fbbfd93b48508f4bb6ebf2f52cc80110f5b26/armv8/CMakeFiles/CMakeTmp
Run Build Command(s):/usr/bin/gmake -f Makefile cmTC_19db5/fast && /usr/bin/gmake -f CMakeFiles/cmTC_19db5.dir/build.make CMakeFiles/cmTC_19db5.dir/build
gmake[1]: Entering directory '/root/.conan/data/lz4/1.9.2/bashbug/stable/build/278fbbfd93b48508f4bb6ebf2f52cc80110f5b26/armv8/CMakeFiles/CMakeTmp'
Building C object CMakeFiles/cmTC_19db5.dir/testCCompiler.c.o
/root/.conan/data/android-toolchain/r25b/bashbug/stable/package/be241241e9d4718e5bab4eb33935bbb69606bb0c/android-ndk-r25b/toolchains/llvm/prebuilt/linux-x86_64/bin/clang -g -DANDROID -fdata-sections -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -o CMakeFiles/cmTC_19db5.dir/testCCompiler.c.o -c /root/.conan/data/lz4/1.9.2/bashbug/stable/build/278fbbfd93b48508f4bb6ebf2f52cc80110f5b26/armv8/CMakeFiles/CMakeTmp/testCCompiler.c
clang: error: no input files
gmake[1]: *** [CMakeFiles/cmTC_19db5.dir/build.make:78: CMakeFiles/cmTC_19db5.dir/testCCompiler.c.o] Error 1
gmake[1]: Leaving directory '/root/.conan/data/lz4/1.9.2/bashbug/stable/build/278fbbfd93b48508f4bb6ebf2f52cc80110f5b26/armv8/CMakeFiles/CMakeTmp'
gmake: *** [Makefile:127: cmTC_19db5/fast] Error 2
Checking whether the C compiler is IAR using "" did not match "IAR .+ Compiler":
clang: error: no input files
Checking whether the C compiler is IAR using "" did not match "IAR .+ Compiler":
clang: error: no input files
Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed.
Compiler: /root/.conan/data/android-toolchain/r25b/bashbug/stable/package/be241241e9d4718e5bab4eb33935bbb69606bb0c/android-ndk-r25b/toolchains/llvm/prebuilt/linux-x86_64/bin/clang++
Build flags: -g;-DANDROID;-fdata-sections;-ffunction-sections;-funwind-tables;-fstack-protector-strong;-no-canonical-prefixes;-D_FORTIFY_SOURCE=2;-Wformat;-Werror=format-security;;
Id flags: -c;--target=aarch64-none-linux-android32
The output was:
1
clang: error: no input files
相似问题