mongodb - Undefined Boost reference when compiling mongo-perf on CentOS 6.3 -
i'm attempting compile mongo-perf adapting instructions here centos 6.3. have followed these instructions on ubuntu successfully.
i compiled mongodb, when running scons compile mongo-perf, errors undefined boost references.
[davidv@mongodb-test1 mongo-perf]$ scons scons: reading sconscript files ... checking c library mongoclient... (cached) yes checking c library boost_thread-mt... (cached) yes checking c library boost_filesystem-mt... (cached) yes checking c library boost_program_options-mt... (cached) yes checking 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 `boost::system::generic_category()' /home/davidv/mongodb-src-r2.4.3/src/third_party/boost/boost/system/error_code.hpp:215: undefined reference `boost::system::generic_category()' /home/davidv/mongodb-src-r2.4.3/src/third_party/boost/boost/system/error_code.hpp:216: undefined reference `boost::system::system_category()' ...
as can see, have boost_system-mt installed, , it's referenced @ end of g++ command.
versions:
- g++ 4.4.7
- ld 2.20.51.0.2-5.34.el6
- scons v2.0.1.r5134
- boost-system 1.41.0-17.el6_4
i'm unfamiliar scons , boost libraries. can fix compilation problem?
so when rtfm little closer, turns out correct way compile mongo-perf following:
# compile c++ driver (in mongo-perf) cd mongo-cxx-driver && scons # compile benchmark script cd .. && scons benchmark
not sure why linked instructions worked ok on ubuntu, there have it.
Comments
Post a Comment