leveldb armlinx交叉编译

发布时间 2023-05-05 18:11:16作者: zhaogaojian

首先安装所有依赖,在linux下可以直接编译成功,在armlinux低版本编译器(由于系统限制,只能使用这个版本)下有点问题。
1、在CMakeLists.txt中增加
set (CMAKE_C_COMPILER "/xxxxxx/arm-linux-gnueabihf-gcc")
set (CMAKE_CXX_COMPILER "/xxxxxx/arm-linux-gnueabihf-g++")
2、编译报错
CMake Error at third_party/benchmark/CMakeLists.txt:229 (message):
Failed to determine the source files for the regular expression backend
打开third_party/benchmark/CMakeLists.txt做了如下修改,然后继续执行cmake
image
3、执行make,报了一堆错误,去LevelDB\CMakeFiles下makefile2删除benchmark,test相关语句
即可编译成功,怀疑低版本不支持。