首页
学习
活动
专区
工具
TVP
发布
社区首页 >问答首页 >pcl如何编译成供安卓使用的共享库文件 (有偿解决问题)?

pcl如何编译成供安卓使用的共享库文件 (有偿解决问题)?

提问于 2022-11-13 01:59:32
回答 0关注 0查看 142

我想在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

回答

和开发者交流更多问题细节吧,去 写回答
相关文章

相似问题

相关问答用户
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档