移植leveldb到hi3519
来源:互联网 发布:更改windows系统语言 编辑:程序博客网 时间:2024/06/04 18:06
1.编译环境
- Ubuntu16.4 + arm-hisiv500-linux-
- leveldb 下载地址:https://github.com/google/leveldb/releases
2.移植步骤
修改build_detect_platform文件:
- 添加海思编译工具
if test -z "$CC"; then CC=gccfiCXX=arm-hisiv500-linux-g++if test -z "$CXX"; then CXX=g++fi
- 修改db/db_iter.h文件
在#endif前添加如下一行
typedef int ssize_t;
如果不定义会出现如下错误:
arm-hisiv500-linux-g++ -I. -I./include -std=c++0x -fno-builtin-memcmp -lpthread -DOS_LINUX -DLEVELDB_PLATFORM_POSIX -DLEVELDB_ATOMIC_PRESENT -O2 -DNDEBUG -fPIC -c db/db_iter.cc -o out-shared/db/db_iter.odb/db_iter.cc:107:3: error: ‘ssize_t’ does not name a type ssize_t RandomPeriod() { ^db/db_iter.cc:123:3: error: ‘ssize_t’ does not name a type ssize_t bytes_counter_; ^db/db_iter.cc: In constructor ‘leveldb::{anonymous}::DBIter::DBIter(leveldb::DBImpl*, const leveldb::Comparator*, leveldb::Iterator*, leveldb::SequenceNumber, uint32_t)’:db/db_iter.cc:60:9: error: class ‘leveldb::{anonymous}::DBIter’ does not have any field named ‘bytes_counter_’ bytes_counter_(RandomPeriod()) { ^db/db_iter.cc:60:37: error: ‘RandomPeriod’ was not declared in this scope bytes_counter_(RandomPeriod()) { ^db/db_iter.cc: In member function ‘bool leveldb::{anonymous}::DBIter::ParseKey(leveldb::ParsedInternalKey*)’:db/db_iter.cc:132:3: error: ‘ssize_t’ was not declared in this scope ssize_t n = k.size() + iter_->value().size(); ^db/db_iter.cc:133:3: error: ‘bytes_counter_’ was not declared in this scope bytes_counter_ -= n; ^db/db_iter.cc:133:21: error: ‘n’ was not declared in this scope bytes_counter_ -= n; ^db/db_iter.cc:135:36: error: ‘RandomPeriod’ was not declared in this scope bytes_counter_ += RandomPeriod(); ^Makefile:415: recipe for target 'out-shared/db/db_iter.o' failedmake: *** [out-shared/db/db_iter.o] Error 1
- 编译:
make
- 编译后生成的库和头文件在如下目录:
out-shared out-static include
1 0
- 移植leveldb到hi3519
- 移植gflags到hi3519
- 移植lmdb到hi3519
- 移植protobuf到hi3519
- 移植snappy到hi3519
- 移植hdf5到hi3519
- 移植boost到hi3519
- 移植OpenBLAS到hi3519
- 移植caffe到hi3519
- Google NoSql LevelDB .net 移植版
- Python leveldb数据库 把txt的数据存入到leveldb
- LevelDb
- LevelDb
- LevelDb
- leveldb
- leveldb
- leveldb
- leveldb
- 使用mp4v2将H264+AAC合成mp4文件
- R 语言学习笔记(一)
- jsp学习
- linux adb无法连接device
- 关于Python的进程线程协程之thread模块
- 移植leveldb到hi3519
- 关于Vector和Map查找效率的惊人的实际测试结果
- redis命令详解与使用场景举例——Transaction(事务)
- JavaScript 学习随笔(一)
- 如何做一个侧滑菜单
- 收集了RxJava常见的使用场景,例子简洁、经典、易懂...
- C++中用new和不用new定义类的对象的区别解答
- 首次在Linux中安装Locust过程总结
- MyBatis学习笔记(一)——配置文件中的别名以及mapper中的namespace