我试图在FreeBSD 10上构建Tokumx,但我遇到了以下错误:
[ 27%] Building CXX object src/third_party/ft-index/portability/CMakeFiles/tokuportability_static_conv.dir/toku_crash.cc.o
/home/tokumx/mongo/src/mongo/platform/backtrace.cpp: In function 'int mongo::pal::{anonymous}::addrtosymstr(void*, char*, int)':
/home/tokumx/mongo/src/mongo/platform/backtrace.cpp:71:9: error: 'Dl_info_t' was not declared in this scope
/home/tokumx/mongo/src/mongo/platform/backtrace.cpp:71:19: error: expected ';' before 'symbolInfo'
/home/tokumx/mongo/src/mongo/platform/backtrace.cpp:72:30: error: 'symbolInfo' was not declared in this scope
/home/tokumx/mongo/src/mongo/platform/backtrace.cpp:75:13: error: 'symbolInfo' was not declared in this scope
/home/tokumx/mongo/src/mongo/platform/backtrace.cpp:87:25: error: 'symbolInfo' was not declared in this scope
/home/tokumx/mongo/src/mongo/platform/backtrace.cpp: In function 'int mongo::pal::backtrace_emulation(void**, int)':
/home/tokumx/mongo/src/mongo/platform/backtrace.cpp:106:57: error: 'walkcontext' was not declared in this scope
/home/tokumx/mongo/src/mongo/platform/backtrace.cpp: In function 'int mongo::pal::{anonymous}::addrtosymstr(void*, char*, int)':
/home/tokumx/mongo/src/mongo/platform/backtrace.cpp:92:5: warning: control reaches end of non-void function [-Wreturn-type]
[ 27%] Building CXX object src/mongo/util/CMakeFiles/stacktrace.dir/stacktrace.cpp.o
[ 27%] Building CXX object src/third_party/ft-index/portability/CMakeFiles/tokuportability_static_conv.dir/toku_path.cc.o
gmake[2]: *** [src/mongo/platform/CMakeFiles/platform.dir/backtrace.cpp.o] Error 1
gmake[1]: *** [src/mongo/platform/CMakeFiles/platform.dir/all] Error 2
gmake[1]: *** Waiting for unfinished jobs....
[ 27%] Building CXX object src/mongo/util/CMakeFiles/stringutils.dir/base64.cpp.o
[ 27%] Building CXX object src/third_party/ft-index/portability/CMakeFiles/tokuportability_static_conv.dir/toku_pthread.cc.o
[ 28%] Building CXX object src/third_party/ft-index/portability/CMakeFiles/tokuportability_static_conv.dir/toku_time.cc.o
Linking CXX static library libtokuportability_static_conv.a
[ 28%] Built target tokuportability_static_conv
Linking CXX static library libstacktrace.a
[ 28%] Built target stacktrace
Linking CXX static library libstringutils.a
[ 28%] Built target stringutils
gmake: *** [all] Error 2
我的cmake电话看起来像这样:
CC=gcc47 CPP=cpp47 CXX=g++47 cmake --disable-warnings-as-errors -D CMAKE_BUILD_TYPE=Release -D TOKU_DEBUG_PARANOID=OFF -D USE_VALGRIND=OFF -D USE_BDB=OFF -D BUILD_TESTING=OFF -D TOKUMX_DISTNAME=1.5.0 ..
选项" - disable-warnings-as-errors"在mongodb问题中提到过,但我不确定cmake电话是否适合放置此选项。
修改
编译Mongodb 2.6.4有效,但令人惊讶的是只有原始源而不是应用了补丁的端口:
Install file: "build/freebsd/normal/mongo/mongod" as "mongod"
scons: done building targets.
[root@testbox /usr/ports/databases/mongodb/work/mongodb-src-r2.6.4]#
修改#2:
与此同时,我取得了一些进展并修补了CMakeLists.txt
并添加了以下编译器标志:
-lexecinfo -lpthread
-lexecinfo修复了src / mongo / platform / backtrace.cpp中缺少的backtrace_symbols_fd问题 -lpthread修复了thrd_party / ft-fix
中的pthread错误现在我遇到了下一个错误:
[ 52%] Building CXX object src/mongo/client/CMakeFiles/mongocommon_client.dir/model.cpp.o
/mnt/qno/mongo/src/mongo/client/model.cpp: In member function 'virtual bool mongo::Model::load(mongo::BSONObj&)':
/mnt/qno/mongo/src/mongo/client/model.cpp:27:17: error: 'getScopedDbConnection' is not a member of 'mongo::ScopedDbConnection'
/mnt/qno/mongo/src/mongo/client/model.cpp: In member function 'virtual void mongo::Model::remove(bool)':
/mnt/qno/mongo/src/mongo/client/model.cpp:44:17: error: 'getScopedDbConnection' is not a member of 'mongo::ScopedDbConnection'
/mnt/qno/mongo/src/mongo/client/model.cpp: In member function 'virtual void mongo::Model::save(bool)':
/mnt/qno/mongo/src/mongo/client/model.cpp:59:17: error: 'getScopedDbConnection' is not a member of 'mongo::ScopedDbConnection'
我无法在谷歌上找到任何相关内容。