我正在尝试通过为 CentOS 6.3调整此处的说明来编译mongo-perf 。我已经在 Ubuntu 上成功地遵循了这些说明。
我成功编译了 MongoDB,但是在运行 scons 编译 mongo-perf 时,我收到有关未定义提升引用的错误。
[davidv@mongodb-test1 mongo-perf]$ scons
scons: Reading SConscript files ...
Checking for C library mongoclient... (cached) yes
Checking for C library boost_thread-mt... (cached) yes
Checking for C library boost_filesystem-mt... (cached) yes
Checking for C library boost_program_options-mt... (cached) yes
Checking for C library boost_system-mt... (cached) yes
scons: done reading SConscript files.
scons: Building targets ...
g++ -o benchmark -pthread -g benchmark.o -Lmongo-cxx-driver -lmongoclient -lboost_thread-mt -lboost_filesystem-mt -lboost_program_options-mt -lboost_system-mt
/usr/local/lib64/libmongoclient.a(dbclient_rs.o): In function `__static_initialization_and_destruction_0':
/home/davidv/mongodb-src-r2.4.3/src/third_party/boost/boost/system/error_code.hpp:214: undefined reference to `boost::system::generic_category()'
/home/davidv/mongodb-src-r2.4.3/src/third_party/boost/boost/system/error_code.hpp:215: undefined reference to `boost::system::generic_category()'
/home/davidv/mongodb-src-r2.4.3/src/third_party/boost/boost/system/error_code.hpp:216: undefined reference to `boost::system::system_category()'
...
如您所见,我确实安装了 boost_system-mt,它在 g++ 命令的末尾被引用。
版本:
- g++ 4.4.7
- ld 2.20.51.0.2-5.34.el6
- scons v2.0.1.r5134
- 升压系统 1.41.0-17.el6_4
我通常不熟悉 SCons 和 Boost 库。我能做些什么来解决这个编译问题?