nebula1.2.1源码编译报错

在使用nebula1.2.1版本,进行源码编译的时候失败

我的系统版本是以下:
其中,g++cmake因为系统自带的版本过低,是我自己下载安装的

uname -r
3.10.0-693.21.1.el7.x86_64
ldd --version
ldd (GNU libc) 2.17
Copyright (C) 2012 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Written by Roland McGrath and Ulrich Drepper.
g++ --version
g++ (GCC) 8.3.1 20190311 (Red Hat 8.3.1-3)
Copyright (C) 2018 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 cmake --version
cmake version 3.13.4

CMake suite maintained and supported by Kitware (kitware.com/cmake).

执行的命令是:

make -j4
sudo make install

报错详情如下:

[ 96%] Linking CXX executable ../../bin/nebula-storaged
../storage/CMakeFiles/storage_http_handler.dir/http/StorageHttpStatsHandler.cpp.o: In function `nebula::storage::StorageHttpStatsHandler::getStats() const':
StorageHttpStatsHandler.cpp:(.text+0x397): undefined reference to `rocksdb::HistogramsNameMap'
StorageHttpStatsHandler.cpp:(.text+0x39e): undefined reference to `rocksdb::HistogramsNameMap'
StorageHttpStatsHandler.cpp:(.text+0x501): undefined reference to `rocksdb::HistogramsNameMap'
../kvstore/CMakeFiles/kvstore_obj.dir/RocksEngine.cpp.o: In function `nebula::kvstore::RocksEngine::flush()':
RocksEngine.cpp:(.text+0x51e): undefined reference to `rocksdb::Status::ToString() const'
../kvstore/CMakeFiles/kvstore_obj.dir/RocksEngine.cpp.o: In function `nebula::kvstore::RocksEngine::compact()':
RocksEngine.cpp:(.text+0x6ce): undefined reference to `rocksdb::Status::ToString() const'
../kvstore/CMakeFiles/kvstore_obj.dir/RocksEngine.cpp.o: In function `nebula::kvstore::RocksEngine::commitBatchWrite(std::unique_ptr<nebula::kvstore::WriteBatch, std::default_delete<nebula::kvstore::WriteBatch> >, bool, bool)':
RocksEngine.cpp:(.text+0x83f): undefined reference to `rocksdb::Status::ToString() const'
../kvstore/CMakeFiles/kvstore_obj.dir/RocksEngine.cpp.o: In function `nebula::kvstore::RocksEngine::ingest(std::vector<std::string, std::allocator<std::string> > const&)':
RocksEngine.cpp:(.text+0x9be): undefined reference to `rocksdb::Status::ToString() const'
../kvstore/CMakeFiles/kvstore_obj.dir/RocksEngine.cpp.o: In function `nebula::kvstore::RocksEngine::remove(std::string const&)':
RocksEngine.cpp:(.text+0xbc2): undefined reference to `rocksdb::Status::ToString() const'
../kvstore/CMakeFiles/kvstore_obj.dir/RocksEngine.cpp.o:RocksEngine.cpp:(.text+0xdf1): more undefined references to `rocksdb::Status::ToString() const' follow
../kvstore/CMakeFiles/kvstore_obj.dir/RocksEngine.cpp.o: In function `nebula::kvstore::RocksEngine::RocksEngine(int, std::string const&, std::shared_ptr<rocksdb::MergeOperator>, std::shared_ptr<rocksdb::CompactionFilterFactory>)':
RocksEngine.cpp:(.text+0x2f74): undefined reference to `rocksdb::DB::Open(rocksdb::Options const&, std::string const&, rocksdb::DB**)'
RocksEngine.cpp:(.text+0x3627): undefined reference to `rocksdb::DB::Open(rocksdb::Options const&, std::string const&, rocksdb::DB**)'
RocksEngine.cpp:(.text+0x36e2): undefined reference to `rocksdb::Status::ToString() const'
RocksEngine.cpp:(.text+0x3911): undefined reference to `rocksdb::Status::ToString() const'
RocksEngine.cpp:(.text+0x3eab): undefined reference to `rocksdb::Status::ToString() const'
RocksEngine.cpp:(.text+0x3ef0): undefined reference to `rocksdb::RepairDB(std::string const&, rocksdb::Options const&)'
RocksEngine.cpp:(.text+0x3eff): undefined reference to `rocksdb::Status::ToString() const'
RocksEngine.cpp:(.text+0x3fc1): undefined reference to `rocksdb::Status::ToString() const'
../kvstore/CMakeFiles/kvstore_obj.dir/RocksEngine.cpp.o: In function `nebula::kvstore::RocksEngine::multiRemove(std::vector<std::string, std::allocator<std::string> >)':
RocksEngine.cpp:(.text+0x4b01): undefined reference to `rocksdb::Status::ToString() const'
../kvstore/CMakeFiles/kvstore_obj.dir/RocksEngine.cpp.o: In function `nebula::kvstore::RocksEngine::multiPut(std::vector<std::pair<std::string, std::string>, std::allocator<std::pair<std::string, std::string> > >)':
RocksEngine.cpp:(.text+0x4df9): undefined reference to `rocksdb::Status::ToString() const'
../kvstore/CMakeFiles/kvstore_obj.dir/RocksEngineConfig.cpp.o: In function `nebula::kvstore::initRocksdbOptions(rocksdb::Options&)':
RocksEngineConfig.cpp:(.text+0xcba): undefined reference to `rocksdb::GetDBOptionsFromMap(rocksdb::DBOptions const&, std::unordered_map<std::string, std::string, std::hash<std::string>, std::equal_to<std::string>, std::allocator<std::pair<std::string const, std::string> > > const&, rocksdb::DBOptions*, bool, bool)'
RocksEngineConfig.cpp:(.text+0xf0a): undefined reference to `rocksdb::GetColumnFamilyOptionsFromMap(rocksdb::ColumnFamilyOptions const&, std::unordered_map<std::string, std::string, std::hash<std::string>, std::equal_to<std::string>, std::allocator<std::pair<std::string const, std::string> > > const&, rocksdb::ColumnFamilyOptions*, bool, bool)'
RocksEngineConfig.cpp:(.text+0x24f3): undefined reference to `rocksdb::GetBlockBasedTableOptionsFromMap(rocksdb::BlockBasedTableOptions const&, std::unordered_map<std::string, std::string, std::hash<std::string>, std::equal_to<std::string>, std::allocator<std::pair<std::string const, std::string> > > const&, rocksdb::BlockBasedTableOptions*, bool, bool)'
RocksEngineConfig.cpp:(.text+0x2b4f): undefined reference to `rocksdb::NewConcurrentTaskLimiter(std::string const&, int)'
../kvstore/CMakeFiles/kvstore_obj.dir/RocksEngineConfig.cpp.o: In function `nebula::kvstore::EventListener::OnExternalFileIngested(rocksdb::DB*, rocksdb::ExternalFileIngestionInfo const&)':
RocksEngineConfig.cpp:(.text._ZN6nebula7kvstore13EventListener22OnExternalFileIngestedEPN7rocksdb2DBERKNS2_25ExternalFileIngestionInfoE[_ZN6nebula7kvstore13EventListener22OnExternalFileIngestedEPN7rocksdb2DBERKNS2_25ExternalFileIngestionInfoE]+0xf5): undefined reference to `rocksdb::TableProperties::ToString(std::string const&, std::string const&) const'
../kvstore/CMakeFiles/kvstore_obj.dir/RocksEngineConfig.cpp.o: In function `nebula::kvstore::EventListener::OnCompactionCompleted(rocksdb::DB*, rocksdb::CompactionJobInfo const&)':
RocksEngineConfig.cpp:(.text._ZN6nebula7kvstore13EventListener21OnCompactionCompletedEPN7rocksdb2DBERKNS2_17CompactionJobInfoE[_ZN6nebula7kvstore13EventListener21OnCompactionCompletedEPN7rocksdb2DBERKNS2_17CompactionJobInfoE]+0xb2): undefined reference to `rocksdb::Status::ToString() const'
../kvstore/CMakeFiles/kvstore_obj.dir/RocksEngineConfig.cpp.o: In function `nebula::kvstore::EventListener::OnCompactionBegin(rocksdb::DB*, rocksdb::CompactionJobInfo const&)':
RocksEngineConfig.cpp:(.text._ZN6nebula7kvstore13EventListener17OnCompactionBeginEPN7rocksdb2DBERKNS2_17CompactionJobInfoE[_ZN6nebula7kvstore13EventListener17OnCompactionBeginEPN7rocksdb2DBERKNS2_17CompactionJobInfoE]+0xb2): undefined reference to `rocksdb::Status::ToString() const'
../kvstore/CMakeFiles/kvstore_obj.dir/RocksEngineConfig.cpp.o: In function `nebula::kvstore::EventListener::OnFlushBegin(rocksdb::DB*, rocksdb::FlushJobInfo const&)':
RocksEngineConfig.cpp:(.text._ZN6nebula7kvstore13EventListener12OnFlushBeginEPN7rocksdb2DBERKNS2_12FlushJobInfoE[_ZN6nebula7kvstore13EventListener12OnFlushBeginEPN7rocksdb2DBERKNS2_12FlushJobInfoE]+0x1cc): undefined reference to `rocksdb::TableProperties::ToString(std::string const&, std::string const&) const'
../kvstore/CMakeFiles/kvstore_obj.dir/RocksEngineConfig.cpp.o: In function `nebula::kvstore::EventListener::OnFlushCompleted(rocksdb::DB*, rocksdb::FlushJobInfo const&)':
RocksEngineConfig.cpp:(.text._ZN6nebula7kvstore13EventListener16OnFlushCompletedEPN7rocksdb2DBERKNS2_12FlushJobInfoE[_ZN6nebula7kvstore13EventListener16OnFlushCompletedEPN7rocksdb2DBERKNS2_12FlushJobInfoE]+0x1cc): undefined reference to `rocksdb::TableProperties::ToString(std::string const&, std::string const&) const'
collect2: error: ld returned 1 exit status
make[2]: *** [bin/nebula-storaged] Error 1
make[1]: *** [src/daemons/CMakeFiles/nebula-storaged.dir/all] Error 2
make: *** [all] Error 2

第一次接触,不吝赐教,谢谢!

请参考手册,错误原因是没安装 vesoft-third-party :
https://docs.nebula-graph.io/1.2.0/manual-EN/3.build-develop-and-administration/1.build/1.build-source-code/

1赞

我按照参考手册,安装了vesoft-third-party,重新尝试,还是同样的问题.
后来,我按照参考手册上给出的gcc,cmake,vesoft-third-party安装方式,删除build目录,重新编译了一遍,问题解决了,十分感谢!

1赞

该主题在最后一个回复创建后7天后自动关闭。不再允许新的回复。

浙ICP备20010487号