Installing MongoDB C++ Driver on Ubuntu Precise 12.04

1,441 views
Skip to first unread message

bb6xt

unread,
May 28, 2012, 10:20:14 AM5/28/12
to mongodb-user
Hi all,

I am having a hard time compiling/installing the c++ driver for
MongoDB on my Ubuntu 12.04 (Precise Pangolin). Honestly, I am just
beginning c++ from a background of Python where a simple pip install
pymongo will suffice. I have already googled extensively (a couple of
hours I think) without success. I am using this archive
http://downloads.mongodb.org/cxx-driver/mongodb-linux-x86_64-v2.0-latest.tgz
on a 32 bit laptop.

I have installed **ALL** the dependenies indicated on the
documentation yet scons keeps failing. I'll be very elated if you
could give me a simple and straight-forward way of getting the driver
working on my computer.

Thanks in advance.

gregor

unread,
May 28, 2012, 1:59:04 PM5/28/12
to mongod...@googlegroups.com
Can you paste the error you are getting?

bb6xt

unread,
May 30, 2012, 12:02:32 PM5/30/12
to mongod...@googlegroups.com
Sorry for the delay. Find error output below. Thanks in advance.

scons: Reading SConscript files ...Checking for C library boost_thread-mt... noChecking for C library boost_thread... noChecking for C library boost_filesystem-mt... noChecking for C library boost_filesystem... noChecking for C library boost_system-mt... noChecking for C library boost_system... noChecking for C library boost_thread-mt... noChecking for C library boost_thread... noscons: done reading SConscript files.scons: Building targets ...g++ -o client/examples/authTest.o -c -O3 -D_SCONS -DMONGO_EXPOSE_MACROS -Imongo client/examples/authTest.cppg++ -o mongo/buildinfo.o -c -O3 -D_SCONS -DMONGO_EXPOSE_MACROS -Imongo mongo/buildinfo.cppg++ -o mongo/pch.o -c -O3 -D_SCONS -DMONGO_EXPOSE_MACROS -Imongo mongo/pch.cppg++ -o mongo/bson/oid.o -c -O3 -D_SCONS -DMONGO_EXPOSE_MACROS -Imongo mongo/bson/oid.cppg++ -o mongo/client/clientOnly.o -c -O3 -D_SCONS -DMONGO_EXPOSE_MACROS -Imongo mongo/client/clientOnly.cppg++ -o mongo/client/connpool.o -c -O3 -D_SCONS -DMONGO_EXPOSE_MACROS -Imongo mongo/client/connpool.cppg++ -o mongo/client/dbclient.o -c -O3 -D_SCONS -DMONGO_EXPOSE_MACROS -Imongo mongo/client/dbclient.cppg++ -o mongo/client/dbclient_rs.o -c -O3 -D_SCONS -DMONGO_EXPOSE_MACROS -Imongo mongo/client/dbclient_rs.cppg++ -o mongo/client/dbclientcursor.o -c -O3 -D_SCONS -DMONGO_EXPOSE_MACROS -Imongo mongo/client/dbclientcursor.cppg++ -o mongo/client/distlock.o -c -O3 -D_SCONS -DMONGO_EXPOSE_MACROS -Imongo mongo/client/distlock.cppg++ -o mongo/client/gridfs.o -c -O3 -D_SCONS -DMONGO_EXPOSE_MACROS -Imongo mongo/client/gridfs.cppg++ -o mongo/client/model.o -c -O3 -D_SCONS -DMONGO_EXPOSE_MACROS -Imongo mongo/client/model.cppg++ -o mongo/client/syncclusterconnection.o -c -O3 -D_SCONS -DMONGO_EXPOSE_MACROS -Imongo mongo/client/syncclusterconnection.cppg++ -o mongo/s/shardconnection.o -c -O3 -D_SCONS -DMONGO_EXPOSE_MACROS -Imongo mongo/s/shardconnection.cppg++ -o mongo/shell/mongo.o -c -O3 -D_SCONS -DMONGO_EXPOSE_MACROS -Imongo mongo/shell/mongo.cppg++ -o mongo/db/commands.o -c -O3 -D_SCONS -DMONGO_EXPOSE_MACROS -Imongo mongo/db/commands.cppg++ -o mongo/db/indexkey.o -c -O3 -D_SCONS -DMONGO_EXPOSE_MACROS -Imongo mongo/db/indexkey.cppg++ -o mongo/db/jsobj.o -c -O3 -D_SCONS -DMONGO_EXPOSE_MACROS -Imongo mongo/db/jsobj.cppg++ -o mongo/db/json.o -c -O3 -D_SCONS -DMONGO_EXPOSE_MACROS -Imongo mongo/db/json.cppg++ -o mongo/db/lasterror.o -c -O3 -D_SCONS -DMONGO_EXPOSE_MACROS -Imongo mongo/db/lasterror.cppg++ -o mongo/db/nonce.o -c -O3 -D_SCONS -DMONGO_EXPOSE_MACROS -Imongo mongo/db/nonce.cppg++ -o mongo/db/projection.o -c -O3 -D_SCONS -DMONGO_EXPOSE_MACROS -Imongo mongo/db/projection.cppg++ -o mongo/db/querypattern.o -c -O3 -D_SCONS -DMONGO_EXPOSE_MACROS -Imongo mongo/db/querypattern.cppg++ -o mongo/db/queryutil.o -c -O3 -D_SCONS -DMONGO_EXPOSE_MACROS -Imongo mongo/db/queryutil.cppg++ -o mongo/util/assert_util.o -c -O3 -D_SCONS -DMONGO_EXPOSE_MACROS -Imongo mongo/util/assert_util.cppg++ -o mongo/util/background.o -c -O3 -D_SCONS -DMONGO_EXPOSE_MACROS -Imongo mongo/util/background.cppg++ -o mongo/util/base64.o -c -O3 -D_SCONS -DMONGO_EXPOSE_MACROS -Imongo mongo/util/base64.cppg++ -o mongo/util/debug_util.o -c -O3 -D_SCONS -DMONGO_EXPOSE_MACROS -Imongo mongo/util/debug_util.cppg++ -o mongo/util/file_allocator.o -c -O3 -D_SCONS -DMONGO_EXPOSE_MACROS -Imongo mongo/util/file_allocator.cppg++ -o mongo/util/histogram.o -c -O3 -D_SCONS -DMONGO_EXPOSE_MACROS -Imongo mongo/util/histogram.cppg++ -o mongo/util/log.o -c -O3 -D_SCONS -DMONGO_EXPOSE_MACROS -Imongo mongo/util/log.cppg++ -o mongo/util/md5main.o -c -O3 -D_SCONS -DMONGO_EXPOSE_MACROS -Imongo mongo/util/md5main.cppg++ -o mongo/util/password.o -c -O3 -D_SCONS -DMONGO_EXPOSE_MACROS -Imongo mongo/util/password.cppg++ -o mongo/util/ramlog.o -c -O3 -D_SCONS -DMONGO_EXPOSE_MACROS -Imongo mongo/util/ramlog.cppg++ -o mongo/util/signal_handlers.o -c -O3 -D_SCONS -DMONGO_EXPOSE_MACROS -Imongo mongo/util/signal_handlers.cppg++ -o mongo/util/stringutils.o -c -O3 -D_SCONS -DMONGO_EXPOSE_MACROS -Imongo mongo/util/stringutils.cppg++ -o mongo/util/text.o -c -O3 -D_SCONS -DMONGO_EXPOSE_MACROS -Imongo mongo/util/text.cppg++ -o mongo/util/util.o -c -O3 -D_SCONS -DMONGO_EXPOSE_MACROS -Imongo mongo/util/util.cppg++ -o mongo/util/version.o -c -O3 -D_SCONS -DMONGO_EXPOSE_MACROS -Imongo mongo/util/version.cppg++ -o mongo/util/concurrency/spin_lock.o -c -O3 -D_SCONS -DMONGO_EXPOSE_MACROS -Imongo mongo/util/concurrency/spin_lock.cppg++ -o mongo/util/concurrency/synchronization.o -c -O3 -D_SCONS -DMONGO_EXPOSE_MACROS -Imongo mongo/util/concurrency/synchronization.cppg++ -o mongo/util/concurrency/task.o -c -O3 -D_SCONS -DMONGO_EXPOSE_MACROS -Imongo mongo/util/concurrency/task.cppg++ -o mongo/util/concurrency/thread_pool.o -c -O3 -D_SCONS -DMONGO_EXPOSE_MACROS -Imongo mongo/util/concurrency/thread_pool.cppg++ -o mongo/util/concurrency/vars.o -c -O3 -D_SCONS -DMONGO_EXPOSE_MACROS -Imongo mongo/util/concurrency/vars.cppg++ -o mongo/util/net/httpclient.o -c -O3 -D_SCONS -DMONGO_EXPOSE_MACROS -Imongo mongo/util/net/httpclient.cppg++ -o mongo/util/net/listen.o -c -O3 -D_SCONS -DMONGO_EXPOSE_MACROS -Imongo mongo/util/net/listen.cppg++ -o mongo/util/net/message.o -c -O3 -D_SCONS -DMONGO_EXPOSE_MACROS -Imongo mongo/util/net/message.cppg++ -o mongo/util/net/message_port.o -c -O3 -D_SCONS -DMONGO_EXPOSE_MACROS -Imongo mongo/util/net/message_port.cppg++ -o mongo/util/net/sock.o -c -O3 -D_SCONS -DMONGO_EXPOSE_MACROS -Imongo mongo/util/net/sock.cppar rc libmongoclient.a mongo/buildinfo.o mongo/pch.o mongo/bson/oid.o mongo/client/clientOnly.o mongo/client/connpool.o mongo/client/dbclient.o mongo/client/dbclient_rs.o mongo/client/dbclientcursor.o mongo/client/distlock.o mongo/client/gridfs.o mongo/client/model.o mongo/client/syncclusterconnection.o mongo/s/shardconnection.o mongo/shell/mongo.o mongo/db/commands.o mongo/db/indexkey.o mongo/db/jsobj.o mongo/db/json.o mongo/db/lasterror.o mongo/db/nonce.o mongo/db/projection.o mongo/db/querypattern.o mongo/db/queryutil.o mongo/util/assert_util.o mongo/util/background.o mongo/util/base64.o mongo/util/debug_util.o mongo/util/file_allocator.o mongo/util/histogram.o mongo/util/log.o mongo/util/md5main.o mongo/util/password.o mongo/util/ramlog.o mongo/util/signal_handlers.o mongo/util/stringutils.o mongo/util/text.o mongo/util/util.o mongo/util/version.o mongo/util/concurrency/spin_lock.o mongo/util/concurrency/synchronization.o mongo/util/concurrency/task.o mongo/util/concurrency/thread_pool.o mongo/util/concurrency/vars.o mongo/util/net/httpclient.o mongo/util/net/listen.o mongo/util/net/message.o mongo/util/net/message_port.o mongo/util/net/sock.o mongo/util/md5.oranlib libmongoclient.ag++ -o authTest -Wl,--as-needed -Wl,-zdefs client/examples/authTest.o -L. -lmongoclient -lpthreadscons: building terminated because of errors.undefined reference to `boost::detail::get_tss_data(void const*)'clientOnly.cpp:(.text._ZN5mongo9Logstream3getEv[mongo::Logstream::get()]+0xf9): undefined reference to `boost::detail::get_tss_data(void const*)'clientOnly.cpp:(.text._ZN5mongo9Logstream3getEv[mongo::Logstream::get()]+0x13b): undefined reference to `boost::detail::set_tss_data(void const*, boost::shared_ptr<boost::detail::tss_cleanup_function>, void*, bool)'./libmongoclient.a(clientOnly.o): In function `_GLOBAL__sub_I__ZN5mongo7cmdLineE':clientOnly.cpp:(.text.startup+0x2c): undefined reference to `boost::system::generic_category()'clientOnly.cpp:(.text.startup+0x36): undefined reference to `boost::system::generic_category()'clientOnly.cpp:(.text.startup+0x40): undefined reference to `boost::system::system_category()'./libmongoclient.a(dbclient.o): In function `_GLOBAL__sub_I__ZN5mongo16ConnectionString12_fillServersESs':dbclient.cpp:(.text.startup+0x2e): undefined reference to `boost::system::generic_category()'dbclient.cpp:(.text.startup+0x38): undefined reference to `boost::system::generic_category()'dbclient.cpp:(.text.startup+0x42): undefined reference to `boost::system::system_category()'./libmongoclient.a(dbclient_rs.o): In function `_GLOBAL__sub_I__ZN5mongo24replicaSetMonitorWatcherE':dbclient_rs.cpp:(.text.startup+0x2c): undefined reference to `boost::system::generic_category()'dbclient_rs.cpp:(.text.startup+0x36): undefined reference to `boost::system::generic_category()'dbclient_rs.cpp:(.text.startup+0x40): undefined reference to `boost::system::system_category()'./libmongoclient.a(dbclientcursor.o): In function `_GLOBAL__sub_I__ZN5mongo14DBClientCursor13nextBatchSizeEv':dbclientcursor.cpp:(.text.startup+0x2c): undefined reference to `boost::system::generic_category()'dbclientcursor.cpp:(.text.startup+0x36): undefined reference to `boost::system::generic_category()'dbclientcursor.cpp:(.text.startup+0x40): undefined reference to `boost::system::system_category()'./libmongoclient.a(syncclusterconnection.o): In function `_GLOBAL__sub_I__ZN5mongo21SyncClusterConnectionC2ERKSt4listINS_11HostAndPortESaIS2_EEd':syncclusterconnection.cpp:(.text.startup+0x2c): undefined reference to `boost::system::generic_category()'syncclusterconnection.cpp:(.text.startup+0x36): undefined reference to `boost::system::generic_category()'syncclusterconnection.cpp:(.text.startup+0x40): undefined reference to `boost::system::system_category()'./libmongoclient.a(jsobj.o): In function `_GLOBAL__sub_I__ZN5mongo10eooElementE':jsobj.cpp:(.text.startup+0x2c): undefined reference to `boost::system::generic_category()'jsobj.cpp:(.text.startup+0x36): undefined reference to `boost::system::generic_category()'jsobj.cpp:(.text.startup+0x40): undefined reference to `boost::system::system_category()'./libmongoclient.a(json.o): In function `boost::spirit::static_<boost::thread_specific_ptr<boost::weak_ptr<boost::spirit::impl::grammar_helper<boost::spirit::grammar<mongo::JsonGrammar, boost::spirit::parser_context<boost::spirit::nil_t> >, mongo::JsonGrammar, boost::spirit::scanner<char const*, boost::spirit::scanner_policies<boost::spirit::skipper_iteration_policy<boost::spirit::iteration_policy>, boost::spirit::match_policy, boost::spirit::action_policy> > > > >, boost::spirit::impl::get_definition_static_data_tag>::destructor::~destructor()':json.cpp:(.text._ZN5boost6spirit7static_INS_19thread_specific_ptrINS_8weak_ptrINS0_4impl14grammar_helperINS0_7grammarIN5mongo11JsonGrammarENS0_14parser_contextINS0_5nil_tEEEEES8_NS0_7scannerIPKcNS0_16scanner_policiesINS0_24skipper_iteration_policyINS0_16iteration_policyEEENS0_12match_policyENS0_13action_policyEEEEEEEEEEENS4_30get_definition_static_data_tagEE10destructorD2Ev[_ZN5boost6spirit7static_INS_19thread_specific_ptrINS_8weak_ptrINS0_4impl14grammar_helperINS0_7grammarIN5mongo11JsonGrammarENS0_14parser_contextINS0_5nil_tEEEEES8_NS0_7scannerIPKcNS0_16scanner_policiesINS0_24skipper_iteration_policyINS0_16iteration_policyEEENS0_12match_policyENS0_13action_policyEEEEEEEEEEENS4_30get_definition_static_data_tagEE10destructorD5Ev]+0x33): undefined reference to `boost::detail::set_tss_data(void const*, boost::shared_ptr<boost::detail::tss_cleanup_function>, void*, bool)'./libmongoclient.a(json.o): In function `void boost::call_once<void (*)()>(boost::once_flag&, void (*)())':json.cpp:(.text._ZN5boost9call_onceIPFvvEEEvRNS_9once_flagET_[void boost::call_once<void (*)()>(boost::once_flag&, void (*)())]+0x19): undefined reference to `boost::detail::get_once_per_thread_epoch()'json.cpp:(.text._ZN5boost9call_onceIPFvvEEEvRNS_9once_flagET_[void boost::call_once<void (*)()>(boost::once_flag&, void (*)())]+0x29): undefined reference to `boost::detail::once_epoch_mutex'json.cpp:(.text._ZN5boost9call_onceIPFvvEEEvRNS_9once_flagET_[void boost::call_once<void (*)()>(boost::once_flag&, void (*)())]+0x4b): undefined reference to `boost::detail::once_global_epoch'json.cpp:(.text._ZN5boost9call_onceIPFvvEEEvRNS_9once_flagET_[void boost::call_once<void (*)()>(boost::once_flag&, void (*)())]+0x51): undefined reference to `boost::detail::once_global_epoch'json.cpp:(.text._ZN5boost9call_onceIPFvvEEEvRNS_9once_flagET_[void boost::call_once<void (*)()>(boost::once_flag&, void (*)())]+0x5d): undefined reference to `boost::detail::once_epoch_mutex'json.cpp:(.text._ZN5boost9call_onceIPFvvEEEvRNS_9once_flagET_[void boost::call_once<void (*)()>(boost::once_flag&, void (*)())]+0xaa): undefined reference to `boost::detail::once_epoch_mutex'json.cpp:(.text._ZN5boost9call_onceIPFvvEEEvRNS_9once_flagET_[void boost::call_once<void (*)()>(boost::once_flag&, void (*)())]+0xb1): undefined reference to `boost::detail::once_epoch_cv'json.cpp:(.text._ZN5boost9call_onceIPFvvEEEvRNS_9once_flagET_[void boost::call_once<void (*)()>(boost::once_flag&, void (*)())]+0xf2): undefined reference to `boost::detail::once_epoch_mutex'json.cpp:(.text._ZN5boost9call_onceIPFvvEEEvRNS_9once_flagET_[void boost::call_once<void (*)()>(boost::once_flag&, void (*)())]+0x108): undefined reference to `boost::detail::once_epoch_mutex'json.cpp:(.text._ZN5boost9call_onceIPFvvEEEvRNS_9once_flagET_[void boost::call_once<void (*)()>(boost::once_flag&, void (*)())]+0x11a): undefined reference to `boost::detail::once_global_epoch'json.cpp:(.text._ZN5boost9call_onceIPFvvEEEvRNS_9once_flagET_[void boost::call_once<void (*)()>(boost::once_flag&, void (*)())]+0x120): undefined reference to `boost::detail::once_global_epoch'json.cpp:(.text._ZN5boost9call_onceIPFvvEEEvRNS_9once_flagET_[void boost::call_once<void (*)()>(boost::once_flag&, void (*)())]+0x12b): undefined reference to `boost::detail::once_global_epoch'json.cpp:(.text._ZN5boost9call_onceIPFvvEEEvRNS_9once_flagET_[void boost::call_once<void (*)()>(boost::once_flag&, void (*)())]+0x131): undefined reference to `boost::detail::once_global_epoch'json.cpp:(.text._ZN5boost9call_onceIPFvvEEEvRNS_9once_flagET_[void boost::call_once<void (*)()>(boost::once_flag&, void (*)())]+0x13d): undefined reference to `boost::detail::once_epoch_cv'json.cpp:(.text._ZN5boost9call_onceIPFvvEEEvRNS_9once_flagET_[void boost::call_once<void (*)()>(boost::once_flag&, void (*)())]+0x177): undefined reference to `boost::detail::once_epoch_mutex'json.cpp:(.text._ZN5boost9call_onceIPFvvEEEvRNS_9once_flagET_[void boost::call_once<void (*)()>(boost::once_flag&, void (*)())]+0x1b9): undefined reference to `boost::detail::once_epoch_mutex'json.cpp:(.text._ZN5boost9call_onceIPFvvEEEvRNS_9once_flagET_[void boost::call_once<void (*)()>(boost::once_flag&, void (*)())]+0x1de): undefined reference to `boost::detail::once_epoch_cv'./libmongoclient.a(json.o): In function `mongo::JsonGrammar::definition<boost::spirit::scanner<char const*, boost::spirit::scanner_policies<boost::spirit::skipper_iteration_policy<boost::spirit::iteration_policy>, boost::spirit::match_policy, boost::spirit::action_policy> > >& boost::spirit::impl::get_definition<mongo::JsonGrammar, boost::spirit::parser_context<boost::spirit::nil_t>, boost::spirit::scanner<char const*, boost::spirit::scanner_policies<boost::spirit::skipper_iteration_policy<boost::spirit::iteration_policy>, boost::spirit::match_policy, boost::spirit::action_policy> > >(boost::spirit::grammar<mongo::JsonGrammar, boost::spirit::parser_context<boost::spirit::nil_t> > const*)':json.cpp:(.text._ZN5boost6spirit4impl14get_definitionIN5mongo11JsonGrammarENS0_14parser_contextINS0_5nil_tEEENS0_7scannerIPKcNS0_16scanner_policiesINS0_24skipper_iteration_policyINS0_16iteration_policyEEENS0_12match_policyENS0_13action_policyEEEEEEERNT_10definitionIT1_EEPKNS0_7grammarISJ_T0_EE[mongo::JsonGrammar::definition<boost::spirit::scanner<char const*, boost::spirit::scanner_policies<boost::spirit::skipper_iteration_policy<boost::spirit::iteration_policy>, boost::spirit::match_policy, boost::spirit::action_policy> > >& boost::spirit::impl::get_definition<mongo::JsonGrammar, boost::spirit::parser_context<boost::spirit::nil_t>, boost::spirit::scanner<char const*, boost::spirit::scanner_policies<boost::spirit::skipper_iteration_policy<boost::spirit::iteration_policy>, boost::spirit::match_policy, boost::spirit::action_policy> > >(boost::spirit::grammar<mongo::JsonGrammar, boost::spirit::parser_context<boost::spirit::nil_t> > const*)]+0x27): undefined reference to `boost::detail::get_tss_data(void const*)'json.cpp:(.text._ZN5boost6spirit4impl14get_definitionIN5mongo11JsonGrammarENS0_14parser_contextINS0_5nil_tEEENS0_7scannerIPKcNS0_16scanner_policiesINS0_24skipper_iteration_policyINS0_16iteration_policyEEENS0_12match_policyENS0_13action_policyEEEEEEERNT_10definitionIT1_EEPKNS0_7grammarISJ_T0_EE[mongo::JsonGrammar::definition<boost::spirit::scanner<char const*, boost::spirit::scanner_policies<boost::spirit::skipper_iteration_policy<boost::spirit::iteration_policy>, boost::spirit::match_policy, boost::spirit::action_policy> > >& boost::spirit::impl::get_definition<mongo::JsonGrammar, boost::spirit::parser_context<boost::spirit::nil_t>, boost::spirit::scanner<char const*, boost::spirit::scanner_policies<boost::spirit::skipper_iteration_policy<boost::spirit::iteration_policy>, boost::spirit::match_policy, boost::spirit::action_policy> > >(boost::spirit::grammar<mongo::JsonGrammar, boost::spirit::parser_context<boost::spirit::nil_t> > const*)]+0x3b): undefined reference to `boost::detail::get_tss_data(void const*)'json.cpp:(.text._ZN5boost6spirit4impl14get_definitionIN5mongo11JsonGrammarENS0_14parser_contextINS0_5nil_tEEENS0_7scannerIPKcNS0_16scanner_policiesINS0_24skipper_iteration_policyINS0_16iteration_policyEEENS0_12match_policyENS0_13action_policyEEEEEEERNT_10definitionIT1_EEPKNS0_7grammarISJ_T0_EE[mongo::JsonGrammar::definition<boost::spirit::scanner<char const*, boost::spirit::scanner_policies<boost::spirit::skipper_iteration_policy<boost::spirit::iteration_policy>, boost::spirit::match_policy, boost::spirit::action_policy> > >& boost::spirit::impl::get_definition<mongo::JsonGrammar, boost::spirit::parser_context<boost::spirit::nil_t>, boost::spirit::scanner<char const*, boost::spirit::scanner_policies<boost::spirit::skipper_iteration_policy<boost::spirit::iteration_policy>, boost::spirit::match_policy, boost::spirit::action_policy> > >(boost::spirit::grammar<mongo::JsonGrammar, boost::spirit::parser_context<boost::spirit::nil_t> > const*)]+0x273): undefined reference to `boost::detail::get_tss_data(void const*)'json.cpp:(.text._ZN5boost6spirit4impl14get_definitionIN5mongo11JsonGrammarENS0_14parser_contextINS0_5nil_tEEENS0_7scannerIPKcNS0_16scanner_policiesINS0_24skipper_iteration_policyINS0_16iteration_policyEEENS0_12match_policyENS0_13action_policyEEEEEEERNT_10definitionIT1_EEPKNS0_7grammarISJ_T0_EE[mongo::JsonGrammar::definition<boost::spirit::scanner<char const*, boost::spirit::scanner_policies<boost::spirit::skipper_iteration_policy<boost::spirit::iteration_policy>, boost::spirit::match_policy, boost::spirit::action_policy> > >& boost::spirit::impl::get_definition<mongo::JsonGrammar, boost::spirit::parser_context<boost::spirit::nil_t>, boost::spirit::scanner<char const*, boost::spirit::scanner_policies<boost::spirit::skipper_iteration_policy<boost::spirit::iteration_policy>, boost::spirit::match_policy, boost::spirit::action_policy> > >(boost::spirit::grammar<mongo::JsonGrammar, boost::spirit::parser_context<boost::spirit::nil_t> > const*)]+0x2b5): undefined reference to `boost::detail::set_tss_data(void const*, boost::shared_ptr<boost::detail::tss_cleanup_function>, void*, bool)'./libmongoclient.a(json.o): In function `_GLOBAL__sub_I__ZN5mongo11stringToOidEPKc':json.cpp:(.text.startup+0x2c): undefined reference to `boost::system::generic_category()'json.cpp:(.text.startup+0x36): undefined reference to `boost::system::generic_category()'json.cpp:(.text.startup+0x40): undefined reference to `boost::system::system_category()'./libmongoclient.a(background.o): In function `mongo::BackgroundJob::wait(unsigned int)':background.cpp:(.text+0x1214): undefined reference to `boost::detail::get_current_thread_data()'background.cpp:(.text+0x1300): undefined reference to `boost::this_thread::interruption_point()'background.cpp:(.text+0x16b2): undefined reference to `boost::detail::get_current_thread_data()'background.cpp:(.text+0x17a9): undefined reference to `boost::this_thread::interruption_point()'./libmongoclient.a(background.o): In function `mongo::BackgroundJob::go()':background.cpp:(.text+0x2588): undefined reference to `boost::thread::start_thread()'background.cpp:(.text+0x25c2): undefined reference to `boost::thread::~thread()'background.cpp:(.text+0x26c0): undefined reference to `boost::thread::~thread()'background.cpp:(.text+0x26d0): undefined reference to `boost::thread::~thread()'./libmongoclient.a(background.o): In function `boost::detail::thread_data<boost::_bi::bind_t<void, boost::_mfi::mf1<void, mongo::BackgroundJob, boost::shared_ptr<mongo::BackgroundJob::JobStatus> >, boost::_bi::list2<boost::_bi::value<mongo::BackgroundJob*>, boost::_bi::value<boost::shared_ptr<mongo::BackgroundJob::JobStatus> > > > >::~thread_data()':background.cpp:(.text._ZN5boost6detail11thread_dataINS_3_bi6bind_tIvNS_4_mfi3mf1IvN5mongo13BackgroundJobENS_10shared_ptrINS7_9JobStatusEEEEENS2_5list2INS2_5valueIPS7_EENSD_ISA_EEEEEEED2Ev[_ZN5boost6detail11thread_dataINS_3_bi6bind_tIvNS_4_mfi3mf1IvN5mongo13BackgroundJobENS_10shared_ptrINS7_9JobStatusEEEEENS2_5list2INS2_5valueIPS7_EENSD_ISA_EEEEEEED5Ev]+0x6f): undefined reference to `boost::detail::thread_data_base::~thread_data_base()'background.cpp:(.text._ZN5boost6detail11thread_dataINS_3_bi6bind_tIvNS_4_mfi3mf1IvN5mongo13BackgroundJobENS_10shared_ptrINS7_9JobStatusEEEEENS2_5list2INS2_5valueIPS7_EENSD_ISA_EEEEEEED2Ev[_ZN5boost6detail11thread_dataINS_3_bi6bind_tIvNS_4_mfi3mf1IvN5mongo13BackgroundJobENS_10shared_ptrINS7_9JobStatusEEEEENS2_5list2INS2_5valueIPS7_EENSD_ISA_EEEEEEED5Ev]+0x3e): undefined reference to `boost::detail::thread_data_base::~thread_data_base()'./libmongoclient.a(background.o): In function `boost::detail::thread_data<boost::_bi::bind_t<void, boost::_mfi::mf1<void, mongo::BackgroundJob, boost::shared_ptr<mongo::BackgroundJob::JobStatus> >, boost::_bi::list2<boost::_bi::value<mongo::BackgroundJob*>, boost::_bi::value<boost::shared_ptr<mongo::BackgroundJob::JobStatus> > > > >::~thread_data()':background.cpp:(.text._ZN5boost6detail11thread_dataINS_3_bi6bind_tIvNS_4_mfi3mf1IvN5mongo13BackgroundJobENS_10shared_ptrINS7_9JobStatusEEEEENS2_5list2INS2_5valueIPS7_EENSD_ISA_EEEEEEED0Ev[_ZN5boost6detail11thread_dataINS_3_bi6bind_tIvNS_4_mfi3mf1IvN5mongo13BackgroundJobENS_10shared_ptrINS7_9JobStatusEEEEENS2_5list2INS2_5valueIPS7_EENSD_ISA_EEEEEEED5Ev]+0x32): undefined reference to `boost::detail::thread_data_base::~thread_data_base()'background.cpp:(.text._ZN5boost6detail11thread_dataINS_3_bi6bind_tIvNS_4_mfi3mf1IvN5mongo13BackgroundJobENS_10shared_ptrINS7_9JobStatusEEEEENS2_5list2INS2_5valueIPS7_EENSD_ISA_EEEEEEED0Ev[_ZN5boost6detail11thread_dataINS_3_bi6bind_tIvNS_4_mfi3mf1IvN5mongo13BackgroundJobENS_10shared_ptrINS7_9JobStatusEEEEENS2_5list2INS2_5valueIPS7_EENSD_ISA_EEEEEEED5Ev]+0x77): undefined reference to `boost::detail::thread_data_base::~thread_data_base()'./libmongoclient.a(background.o): In function `boost::detail::thread_data<boost::_bi::bind_t<void, boost::_mfi::mf1<void, mongo::BackgroundJob, boost::shared_ptr<mongo::BackgroundJob::JobStatus> >, boost::_bi::list2<boost::_bi::value<mongo::BackgroundJob*>, boost::_bi::value<boost::shared_ptr<mongo::BackgroundJob::JobStatus> > > > >* boost::detail::heap_new_impl<boost::detail::thread_data<boost::_bi::bind_t<void, boost::_mfi::mf1<void, mongo::BackgroundJob, boost::shared_ptr<mongo::BackgroundJob::JobStatus> >, boost::_bi::list2<boost::_bi::value<mongo::BackgroundJob*>, boost::_bi::value<boost::shared_ptr<mongo::BackgroundJob::JobStatus> > > > >, boost::_bi::bind_t<void, boost::_mfi::mf1<void, mongo::BackgroundJob, boost::shared_ptr<mongo::BackgroundJob::JobStatus> >, boost::_bi::list2<boost::_bi::value<mongo::BackgroundJob*>, boost::_bi::value<boost::shared_ptr<mongo::BackgroundJob::JobStatus> > > >&>(boost::_bi::bind_t<void, boost::_mfi::mf1<void, mongo::BackgroundJob, boost::shared_ptr<mongo::BackgroundJob::JobStatus> >, boost::_bi::list2<boost::_bi::value<mongo::BackgroundJob*>, boost::_bi::value<boost::shared_ptr<mongo::BackgroundJob::JobStatus> > > >&)':background.cpp:(.text._ZN5boost6detail13heap_new_implINS0_11thread_dataINS_3_bi6bind_tIvNS_4_mfi3mf1IvN5mongo13BackgroundJobENS_10shared_ptrINS8_9JobStatusEEEEENS3_5list2INS3_5valueIPS8_EENSE_ISB_EEEEEEEERSJ_EEPT_T0_[boost::detail::thread_data<boost::_bi::bind_t<void, boost::_mfi::mf1<void, mongo::BackgroundJob, boost::shared_ptr<mongo::BackgroundJob::JobStatus> >, boost::_bi::list2<boost::_bi::value<mongo::BackgroundJob*>, boost::_bi::value<boost::shared_ptr<mongo::BackgroundJob::JobStatus> > > > >* boost::detail::heap_new_impl<boost::detail::thread_data<boost::_bi::bind_t<void, boost::_mfi::mf1<void, mongo::BackgroundJob, boost::shared_ptr<mongo::BackgroundJob::JobStatus> >, boost::_bi::list2<boost::_bi::value<mongo::BackgroundJob*>, boost::_bi::value<boost::shared_ptr<mongo::BackgroundJob::JobStatus> > > > >, boost::_bi::bind_t<void, boost::_mfi::mf1<void, mongo::BackgroundJob, boost::shared_ptr<mongo::BackgroundJob::JobStatus> >, boost::_bi::list2<boost::_bi::value<mongo::BackgroundJob*>, boost::_bi::value<boost::shared_ptr<mongo::BackgroundJob::JobStatus> > > >&>(boost::_bi::bind_t<void, boost::_mfi::mf1<void, mongo::BackgroundJob, boost::shared_ptr<mongo::BackgroundJob::JobStatus> >, boost::_bi::list2<boost::_bi::value<mongo::BackgroundJob*>, boost::_bi::value<boost::shared_ptr<mongo::BackgroundJob::JobStatus> > > >&)]+0x59): undefined reference to `vtable for boost::detail::thread_data_base'./libmongoclient.a(background.o): In function `_GLOBAL__sub_I__ZN5mongo13BackgroundJobC2Eb':background.cpp:(.text.startup+0x2c): undefined reference to `boost::system::generic_category()'background.cpp:(.text.startup+0x36): undefined reference to `boost::system::generic_category()'background.cpp:(.text.startup+0x40): undefined reference to `boost::system::system_category()'./libmongoclient.a(background.o):(.rodata._ZTIN5boost6detail11thread_dataINS_3_bi6bind_tIvNS_4_mfi3mf1IvN5mongo13BackgroundJobENS_10shared_ptrINS7_9JobStatusEEEEENS2_5list2INS2_5valueIPS7_EENSD_ISA_EEEEEEEE[typeinfo for boost::detail::thread_data<boost::_bi::bind_t<void, boost::_mfi::mf1<void, mongo::BackgroundJob, boost::shared_ptr<mongo::BackgroundJob::JobStatus> >, boost::_bi::list2<boost::_bi::value<mongo::BackgroundJob*>, boost::_bi::value<boost::shared_ptr<mongo::BackgroundJob::JobStatus> > > > >]+0x8): undefined reference to `typeinfo for boost::detail::thread_data_base'./libmongoclient.a(base64.o): In function `_GLOBAL__sub_I__ZN5mongo6base648alphabetE':base64.cpp:(.text.startup+0x2c): undefined reference to `boost::system::generic_category()'base64.cpp:(.text.startup+0x36): undefined reference to `boost::system::generic_category()'base64.cpp:(.text.startup+0x40): undefined reference to `boost::system::system_category()'./libmongoclient.a(log.o): In function `mongo::initLogging(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, bool)':log.cpp:(.text+0xb1f): undefined reference to `boost::system::system_category()'log.cpp:(.text+0xb84): undefined reference to `boost::filesystem2::detail::status_api(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, boost::system::error_code&)'log.cpp:(.text+0xd2f): undefined reference to `boost::system::system_category()'log.cpp:(.text+0xd8d): undefined reference to `boost::filesystem2::detail::status_api(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, boost::system::error_code&)'./libmongoclient.a(log.o): In function `boost::thread_specific_ptr<mongo::Logstream>::~thread_specific_ptr()':log.cpp:(.text._ZN5boost19thread_specific_ptrIN5mongo9LogstreamEED2Ev[_ZN5boost19thread_specific_ptrIN5mongo9LogstreamEED5Ev]+0x35): undefined reference to `boost::detail::set_tss_data(void const*, boost::shared_ptr<boost::detail::tss_cleanup_function>, void*, bool)'./libmongoclient.a(log.o): In function `_GLOBAL__sub_I__ZN5mongo10nullstreamE':log.cpp:(.text.startup+0x2c): undefined reference to `boost::system::generic_category()'log.cpp:(.text.startup+0x36): undefined reference to `boost::system::generic_category()'log.cpp:(.text.startup+0x40): undefined reference to `boost::system::system_category()'./libmongoclient.a(message_port.o): In function `_GLOBAL__sub_I__ZN5mongo5portsE':message_port.cpp:(.text.startup+0x2f): undefined reference to `boost::system::generic_category()'message_port.cpp:(.text.startup+0x39): undefined reference to `boost::system::generic_category()'message_port.cpp:(.text.startup+0x43): undefined reference to `boost::system::system_category()'./libmongoclient.a(sock.o): In function `_GLOBAL__sub_I__ZN5mongo10enableIPv6Eb':sock.cpp:(.text.startup+0x2c): undefined reference to `boost::system::generic_category()'sock.cpp:(.text.startup+0x36): undefined reference to `boost::system::generic_category()'sock.cpp:(.text.startup+0x40): undefined reference to `boost::system::system_category()'./libmongoclient.a(connpool.o): In function `_GLOBAL__sub_I__ZN5mongo11PoolForHostD2Ev':connpool.cpp:(.text.startup+0x2c): undefined reference to `boost::system::generic_category()'connpool.cpp:(.text.startup+0x36): undefined reference to `boost::system::generic_category()'connpool.cpp:(.text.startup+0x40): undefined reference to `boost::system::system_category()'./libmongoclient.a(commands.o): In function `_GLOBAL__sub_I__ZN5mongo7Command19_commandsByBestNameE':commands.cpp:(.text.startup+0x34): undefined reference to `boost::system::generic_category()'commands.cpp:(.text.startup+0x3e): undefined reference to `boost::system::generic_category()'commands.cpp:(.text.startup+0x48): undefined reference to `boost::system::system_category()'./libmongoclient.a(assert_util.o): In function `mongo::problem(int) [clone .part.93]':assert_util.cpp:(.text+0x170): undefined reference to `boost::detail::get_tss_data(void const*)'assert_util.cpp:(.text+0x2f2): undefined reference to `boost::detail::get_tss_data(void const*)'assert_util.cpp:(.text+0x334): undefined reference to `boost::detail::set_tss_data(void const*, boost::shared_ptr<boost::detail::tss_cleanup_function>, void*, bool)'./libmongoclient.a(assert_util.o): In function `_GLOBAL__sub_I__ZN5mongo14assertionCountE':assert_util.cpp:(.text.startup+0x2c): undefined reference to `boost::system::generic_category()'assert_util.cpp:(.text.startup+0x36): undefined reference to `boost::system::generic_category()'assert_util.cpp:(.text.startup+0x40): undefined reference to `boost::system::system_category()'./libmongoclient.a(util.o): In function `mongo::getThreadName()':util.cpp:(.text+0x190): undefined reference to `boost::detail::get_tss_data(void const*)'./libmongoclient.a(util.o): In function `mongo::sayDbContext(char const*)':util.cpp:(.text+0x2bc): undefined reference to `boost::detail::get_tss_data(void const*)'util.cpp:(.text+0x5fd): undefined reference to `boost::detail::get_tss_data(void const*)'util.cpp:(.text+0x63f): undefined reference to `boost::detail::set_tss_data(void const*, boost::shared_ptr<boost::detail::tss_cleanup_function>, void*, bool)'./libmongoclient.a(util.o): In function `mongo::_setThreadName(char const*)':util.cpp:(.text+0x10b5): undefined reference to `boost::detail::get_tss_data(void const*)'util.cpp:(.text+0x13eb): undefined reference to `boost::detail::get_tss_data(void const*)'util.cpp:(.text+0x1436): undefined reference to `boost::detail::set_tss_data(void const*, boost::shared_ptr<boost::detail::tss_cleanup_function>, void*, bool)'util.cpp:(.text+0x154a): undefined reference to `boost::detail::get_tss_data(void const*)'util.cpp:(.text+0x1595): undefined reference to `boost::detail::set_tss_data(void const*, boost::shared_ptr<boost::detail::tss_cleanup_function>, void*, bool)'./libmongoclient.a(util.o): In function `boost::thread_specific_ptr<std::basic_string<char, std::char_traits<char>, std::allocator<char> > >::~thread_specific_ptr()':util.cpp:(.text._ZN5boost19thread_specific_ptrISsED2Ev[_ZN5boost19thread_specific_ptrISsED5Ev]+0x35): undefined reference to `boost::detail::set_tss_data(void const*, boost::shared_ptr<boost::detail::tss_cleanup_function>, void*, bool)'./libmongoclient.a(util.o): In function `_GLOBAL__sub_I__ZN5mongo7hexdumpEPKcj':util.cpp:(.text.startup+0x2e): undefined reference to `boost::system::generic_category()'util.cpp:(.text.startup+0x38): undefined reference to `boost::system::generic_category()'util.cpp:(.text.startup+0x42): undefined reference to `boost::system::system_category()'./libmongoclient.a(spin_lock.o): In function `_GLOBAL__sub_I__ZN5mongo8SpinLockD2Ev':spin_lock.cpp:(.text.startup+0x2c): undefined reference to `boost::system::generic_category()'spin_lock.cpp:(.text.startup+0x36): undefined reference to `boost::system::generic_category()'spin_lock.cpp:(.text.startup+0x40): undefined reference to `boost::system::system_category()'./libmongoclient.a(oid.o): In function `_GLOBAL__sub_I__ZN5mongo3OID10ourMachineE':oid.cpp:(.text.startup+0x30): undefined reference to `boost::system::generic_category()'oid.cpp:(.text.startup+0x3a): undefined reference to `boost::system::generic_category()'oid.cpp:(.text.startup+0x44): undefined reference to `boost::system::system_category()'./libmongoclient.a(lasterror.o): In function `mongo::LastErrorHolder::~LastErrorHolder()':lasterror.cpp:(.text+0x105): undefined reference to `boost::detail::set_tss_data(void const*, boost::shared_ptr<boost::detail::tss_cleanup_function>, void*, bool)'./libmongoclient.a(lasterror.o): In function `mongo::raiseError(int, char const*)':lasterror.cpp:(.text+0x1cb): undefined reference to `boost::detail::get_tss_data(void const*)'./libmongoclient.a(lasterror.o): In function `mongo::LastErrorHolder::disableForCommand()':lasterror.cpp:(.text+0x29b): undefined reference to `boost::detail::get_tss_data(void const*)'./libmongoclient.a(lasterror.o): In function `mongo::LastErrorHolder::get(bool)':lasterror.cpp:(.text+0x2ec): undefined reference to `boost::detail::get_tss_data(void const*)'lasterror.cpp:(.text+0x3d9): undefined reference to `boost::detail::get_tss_data(void const*)'lasterror.cpp:(.text+0x412): undefined reference to `boost::detail::set_tss_data(void const*, boost::shared_ptr<boost::detail::tss_cleanup_function>, void*, bool)'./libmongoclient.a(lasterror.o): In function `mongo::LastErrorHolder::_get(bool)':lasterror.cpp:(.text+0x4ac): undefined reference to `boost::detail::get_tss_data(void const*)'lasterror.cpp:(.text+0x589): undefined reference to `boost::detail::get_tss_data(void const*)'lasterror.cpp:(.text+0x5c2): undefined reference to `boost::detail::set_tss_data(void const*, boost::shared_ptr<boost::detail::tss_cleanup_function>, void*, bool)'./libmongoclient.a(lasterror.o): In function `mongo::LastErrorHolder::release()':lasterror.cpp:(.text+0x653): undefined reference to `boost::detail::get_tss_data(void const*)'lasterror.cpp:(.text+0x683): undefined reference to `boost::detail::set_tss_data(void const*, boost::shared_ptr<boost::detail::tss_cleanup_function>, void*, bool)'./libmongoclient.a(lasterror.o): In function `mongo::LastErrorHolder::initThread()':lasterror.cpp:(.text+0x707): undefined reference to `boost::detail::get_tss_data(void const*)'lasterror.cpp:(.text+0x7db): undefined reference to `boost::detail::get_tss_data(void const*)'lasterror.cpp:(.text+0x814): undefined reference to `boost::detail::set_tss_data(void const*, boost::shared_ptr<boost::detail::tss_cleanup_function>, void*, bool)'./libmongoclient.a(lasterror.o): In function `mongo::LastErrorHolder::reset(mongo::LastError*)':lasterror.cpp:(.text+0x8a1): undefined reference to `boost::detail::get_tss_data(void const*)'lasterror.cpp:(.text+0x8d6): undefined reference to `boost::detail::set_tss_data(void const*, boost::shared_ptr<boost::detail::tss_cleanup_function>, void*, bool)'./libmongoclient.a(lasterror.o): In function `_GLOBAL__sub_I__ZN5mongo9LastError7noErrorE':lasterror.cpp:(.text.startup+0x2c): undefined reference to `boost::system::generic_category()'lasterror.cpp:(.text.startup+0x36): undefined reference to `boost::system::generic_category()'lasterror.cpp:(.text.startup+0x40): undefined reference to `boost::system::system_category()'./libmongoclient.a(nonce.o): In function `_GLOBAL__sub_I__ZN5mongo8SecurityC2Ev':nonce.cpp:(.text.startup+0x2c): undefined reference to `boost::system::generic_category()'nonce.cpp:(.text.startup+0x36): undefined reference to `boost::system::generic_category()'nonce.cpp:(.text.startup+0x40): undefined reference to `boost::system::system_category()'./libmongoclient.a(md5main.o): In function `_GLOBAL__sub_I__Z11do_md5_testv':md5main.cpp:(.text.startup+0x2c): undefined reference to `boost::system::generic_category()'md5main.cpp:(.text.startup+0x36): undefined reference to `boost::system::generic_category()'md5main.cpp:(.text.startup+0x40): undefined reference to `boost::system::system_category()'./libmongoclient.a(message.o): In function `_GLOBAL__sub_I__ZN5mongo7Message4sendERNS_13MessagingPortEPKc':message.cpp:(.text.startup+0x2c): undefined reference to `boost::system::generic_category()'message.cpp:(.text.startup+0x36): undefined reference to `boost::system::generic_category()'message.cpp:(.text.startup+0x40): undefined reference to `boost::system::system_category()'collect2: ld returned 1 exit statusscons: *** [authTest] Error 1

PS:
abraham@ubuntu:~$ sudo apt-get install libboost-all-dev libpcre++-devReading package lists... DoneBuilding dependency tree Reading state information... Donelibboost-all-dev is already the newest version.libpcre++-dev is already the newest version.0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

gregor

unread,
May 30, 2012, 12:24:28 PM5/30/12
to mongod...@googlegroups.com
Can you try installing each  individual libboost instead of libboost-all-dev?

libboost-dev libboost-program-options-dev libboost-thread-dev libboost-filesystem-dev

bb6xt

unread,
May 31, 2012, 3:14:45 PM5/31/12
to mongod...@googlegroups.com
I have done the following:

$ sudo apt-get purge libboost-all-dev
$ sudo apt-get autoremove
$ sudo apt-get install libboost-dev libboost-program-options-dev libboost-thread-dev libboost-filesystem-dev

yet scons is still failling. Is there anything am doing wrong here? Thanks, always!

Waitman Gobble

unread,
May 31, 2012, 4:04:17 PM5/31/12
to mongod...@googlegroups.com

--
You received this message because you are subscribed to the Google
Groups "mongodb-user" group.
To post to this group, send email to mongod...@googlegroups.com
To unsubscribe from this group, send email to
mongodb-user...@googlegroups.com
See also the IRC channel -- freenode.net#mongodb
 
 
Your error messages suggest it is not finding/linking to boost thread library. I think it's telling you that at the beginning. "Checking for C library boost_thread... no"
 
You *may* need to update your copy of SConstruct file.
You can also look at the SConstruct file in the MongoDB distribution for help/example.
 
FYI The SConstruct file for nightly C++ Driver is here:
 

Waitman Gobble
San Jose California USA
 
 

creatiwit

unread,
May 31, 2012, 4:58:57 PM5/31/12
to mongod...@googlegroups.com
Can you post your SConstruct, I am guessing you are not providing all the libraries. I am using the C++ driver on 12.04 but using automake, it works fine.

bb6xt

unread,
Jun 1, 2012, 5:26:18 PM6/1/12
to mongod...@googlegroups.com
Hello,

I am using the default SConstruct file that came with the downloaded driver ( viz http://downloads.mongodb.org/cxx-driver/mongodb-linux-x86_64-v2.0-latest.tgz). Here is the content of the file:

[code]
# scons file for MongoDB c++ client library and examples

import os

# options
AddOption( "--extrapath",
dest="extrapath",
type="string",
nargs=1,
action="store",
help="comma separated list of add'l paths (--extrapath /opt/foo/,/foo) static linking" )

AddOption( "--prefix",
dest="prefix",
type="string",
nargs=1,
action="store",
default="/usr/local",
help="installation root" )


env = Environment( MSVS_ARCH=None )

def addExtraLibs( s ):
for x in s.split(","):
if os.path.exists( x ):
env.Append( CPPPATH=[ x + "/include" ] )
env.Append( LIBPATH=[ x + "/lib" ] )
env.Append( LIBPATH=[ x + "/lib64" ] )

if GetOption( "extrapath" ) is not None:
addExtraLibs( GetOption( "extrapath" ) )

env.Append( CPPPATH=[ "mongo/" ] )

env.Append( CPPDEFINES=[ "_SCONS" , "MONGO_EXPOSE_MACROS" ] )

nix = False
linux = False

if "darwin" == os.sys.platform:
addExtraLibs( "/opt/local/" )
nix = True
elif "linux2" == os.sys.platform or "linux3" == os.sys.platform:
nix = True
linux = True

if nix:
env.Append( CPPFLAGS=" -O3" )
env.Append( LIBS=["pthread"] )
if linux:
env.Append( LINKFLAGS=" -Wl,--as-needed -Wl,-zdefs " )

boostLibs = [ "thread" , "filesystem" , "system", "thread" ]
conf = Configure(env)
for lib in boostLibs:
if not conf.CheckLib("boost_%s-mt" % lib):
conf.CheckLib("boost_%s" % lib)

dirs = [ "" , "bson/" , "bson/util/" ,
"client/" , "s/" , "shell/" ,
"db/" ,
"scripting/" ,
"util/" , "util/concurrency/" , "util/mongoutils/" , "util/net/" ]

allClientFiles = []
for x in dirs:
allClientFiles += Glob( "mongo/" + x + "*.cpp" )
allClientFiles += Glob( "mongo/util/*.c" )

libs = []
libs += env.SharedLibrary( "mongoclient" , allClientFiles )
libs += env.Library( "mongoclient" , allClientFiles )

# install

prefix = GetOption( "prefix" )

for x in libs:
env.Install( prefix + "/lib/" , str(x) )

for x in dirs:
x = "mongo/" + x
env.Install( prefix + "/include/" + x , Glob( x + "*.h" ) )

env.Alias( "install" , prefix )


# example setup

clientTests = []
clientEnv = env.Clone();
clientEnv.Prepend( LIBS=["libmongoclient.a"])
clientEnv.Prepend( LIBPATH=["."] )

# examples

clientTests += [ clientEnv.Program( "firstExample" , [ "client/examples/first.cpp" ] ) ]
clientTests += [ clientEnv.Program( "secondExample" , [ "client/examples/second.cpp" ] ) ]
clientTests += [ clientEnv.Program( "whereExample" , [ "client/examples/whereExample.cpp" ] ) ]
clientTests += [ clientEnv.Program( "authTest" , [ "client/examples/authTest.cpp" ] ) ]
clientTests += [ clientEnv.Program( "httpClientTest" , [ "client/examples/httpClientTest.cpp" ] ) ]
clientTests += [ clientEnv.Program( "clientTest" , [ "client/examples/clientTest.cpp" ] ) ]
clientEnv.Alias("clientTests", clientTests, [])
[/code]

creatiwit

unread,
Jun 1, 2012, 10:19:01 PM6/1/12
to mongod...@googlegroups.com
Do you have pch installed ?

bb6xt

unread,
Jun 3, 2012, 10:28:27 AM6/3/12
to mongodb-user
To be honest I didn't know what pch meant till I googled around (pre-
compiled headers). Now I run locate and here is what I found:
******************************************************************************************
abraham@ubuntu:~$ locate pch
/lib/modules/3.2.0-23-generic-pae/kernel/drivers/dma/pch_dma.ko
/lib/modules/3.2.0-23-generic-pae/kernel/drivers/gpio/gpio-pch.ko
/lib/modules/3.2.0-23-generic-pae/kernel/drivers/misc/pch_phub.ko
/lib/modules/3.2.0-23-generic-pae/kernel/drivers/net/can/pch_can.ko
/lib/modules/3.2.0-23-generic-pae/kernel/drivers/net/ethernet/oki-semi/
pch_gbe
/lib/modules/3.2.0-23-generic-pae/kernel/drivers/net/ethernet/oki-semi/
pch_gbe/pch_gbe.ko
/lib/modules/3.2.0-23-generic-pae/kernel/drivers/pci/hotplug/shpchp.ko
/lib/modules/3.2.0-23-generic-pae/kernel/drivers/spi/spi-topcliff-
pch.ko
/lib/modules/3.2.0-23-generic-pae/kernel/drivers/tty/serial/
pch_uart.ko
/lib/modules/3.2.0-23-generic-pae/kernel/drivers/usb/gadget/pch_udc.ko
/lib/modules/3.2.0-24-generic-pae/kernel/drivers/dma/pch_dma.ko
/lib/modules/3.2.0-24-generic-pae/kernel/drivers/gpio/gpio-pch.ko
/lib/modules/3.2.0-24-generic-pae/kernel/drivers/misc/pch_phub.ko
/lib/modules/3.2.0-24-generic-pae/kernel/drivers/net/can/pch_can.ko
/lib/modules/3.2.0-24-generic-pae/kernel/drivers/net/ethernet/oki-semi/
pch_gbe
/lib/modules/3.2.0-24-generic-pae/kernel/drivers/net/ethernet/oki-semi/
pch_gbe/pch_gbe.ko
/lib/modules/3.2.0-24-generic-pae/kernel/drivers/pci/hotplug/shpchp.ko
/lib/modules/3.2.0-24-generic-pae/kernel/drivers/spi/spi-topcliff-
pch.ko
/lib/modules/3.2.0-24-generic-pae/kernel/drivers/tty/serial/
pch_uart.ko
/lib/modules/3.2.0-24-generic-pae/kernel/drivers/usb/gadget/pch_udc.ko
/opt/android-sdk-linux/tools/lib/chimpchat.jar
/usr/include/qt4/Qt/qcopchannel_qws.h
/usr/include/qt4/QtGui/qcopchannel_qws.h
/usr/lib/libreoffice/program/libucpchelp1.so
/usr/lib/qt4/examples/animation/appchooser
/usr/lib/qt4/examples/animation/appchooser/accessories-dictionary.png
/usr/lib/qt4/examples/animation/appchooser/akregator.png
/usr/lib/qt4/examples/animation/appchooser/appchooser
/usr/lib/qt4/examples/animation/appchooser/appchooser.pro
/usr/lib/qt4/examples/animation/appchooser/appchooser.qrc
/usr/lib/qt4/examples/animation/appchooser/digikam.png
/usr/lib/qt4/examples/animation/appchooser/k3b.png
/usr/lib/qt4/examples/animation/appchooser/main.cpp
/usr/local/include/mongo/pch.h
/usr/local/include/mongo/util/heapcheck.h
/usr/share/app-install/desktop/gopchop:gopchop.desktop
/usr/share/app-install/icons/gopchop.png
/usr/share/boost-build/tools/pch.jam
/usr/share/boost-build/tools/pch.py
/usr/share/doc/blt/html/stripchart.html
/usr/share/ghostscript/9.05/lib/pcharstr.ps
/usr/share/man/man3/stripchart.3blt.gz
/usr/share/perl/5.14.2/unicore/lib/Blk/Lepcha.pl
/usr/share/qt4/doc/src/images/appchooser-example.png
/usr/share/qtcreator/qml/qmlpuppet/commands/pixmapchangedcommand.cpp
/usr/share/qtcreator/qml/qmlpuppet/commands/pixmapchangedcommand.h
/usr/src/linux-headers-3.2.0-23/drivers/net/ethernet/oki-semi/pch_gbe
/usr/src/linux-headers-3.2.0-23/drivers/net/ethernet/oki-semi/pch_gbe/
Kconfig
/usr/src/linux-headers-3.2.0-23/drivers/net/ethernet/oki-semi/pch_gbe/
Makefile
/usr/src/linux-headers-3.2.0-23/include/linux/pch_dma.h
/usr/src/linux-headers-3.2.0-23-generic-pae/include/config/pch
/usr/src/linux-headers-3.2.0-23-generic-pae/include/config/gpio/pch.h
/usr/src/linux-headers-3.2.0-23-generic-pae/include/config/pch/can.h
/usr/src/linux-headers-3.2.0-23-generic-pae/include/config/pch/dma.h
/usr/src/linux-headers-3.2.0-23-generic-pae/include/config/pch/gbe.h
/usr/src/linux-headers-3.2.0-23-generic-pae/include/config/pch/phub.h
/usr/src/linux-headers-3.2.0-23-generic-pae/include/config/serial/pch
/usr/src/linux-headers-3.2.0-23-generic-pae/include/config/serial/pch/
uart.h
/usr/src/linux-headers-3.2.0-23-generic-pae/include/config/spi/
topcliff/pch.h
/usr/src/linux-headers-3.2.0-23-generic-pae/include/linux/pch_dma.h
/usr/src/linux-headers-3.2.0-24/drivers/net/ethernet/oki-semi/pch_gbe
/usr/src/linux-headers-3.2.0-24/drivers/net/ethernet/oki-semi/pch_gbe/
Kconfig
/usr/src/linux-headers-3.2.0-24/drivers/net/ethernet/oki-semi/pch_gbe/
Makefile
/usr/src/linux-headers-3.2.0-24/include/linux/pch_dma.h
/usr/src/linux-headers-3.2.0-24-generic-pae/include/config/pch
/usr/src/linux-headers-3.2.0-24-generic-pae/include/config/gpio/pch.h
/usr/src/linux-headers-3.2.0-24-generic-pae/include/config/pch/can.h
/usr/src/linux-headers-3.2.0-24-generic-pae/include/config/pch/dma.h
/usr/src/linux-headers-3.2.0-24-generic-pae/include/config/pch/gbe.h
/usr/src/linux-headers-3.2.0-24-generic-pae/include/config/pch/phub.h
/usr/src/linux-headers-3.2.0-24-generic-pae/include/config/serial/pch
/usr/src/linux-headers-3.2.0-24-generic-pae/include/config/serial/pch/
uart.h
/usr/src/linux-headers-3.2.0-24-generic-pae/include/config/spi/
topcliff/pch.h
/usr/src/linux-headers-3.2.0-24-generic-pae/include/linux/pch_dma.h
*************************************************************************************************************
does this mean I have it installed? Thanks to everyone for their
patience, am really new to c++. In Nigeria most colleges don't teach
enough c/c++ to make you a pro, just enough to make a grade. I already
self-taught me Python/VB.NET and c++ looks like the next upgrade plus
I've loved working on MongoDB with pymongo hence my posts. Once again,
thanks in advance!

Waitman Gobble

unread,
Jun 3, 2012, 11:53:04 AM6/3/12
to mongod...@googlegroups.com
--
You received this message because you are subscribed to the Google
Groups "mongodb-user" group.
To post to this group, send email to mongod...@googlegroups.com
To unsubscribe from this group, send email to
mongodb-user...@googlegroups.com
See also the IRC channel -- freenode.net#mongodb




a thought, do you have to install "both" the libboost-thread1.48 and libboost-thread1.48-dev ?

ie,


in your previous post you stated that you had installed all the -dev packages, which would normally be the headers, but i'm not sure if the package system on ubuntu would automatically install the libraries. (?) Something to check out.

gregor

unread,
Jun 4, 2012, 2:03:39 AM6/4/12
to mongod...@googlegroups.com
Or are you getting any errors when you are installing the boost packages?

See also the IRC channel -- freenode.net#mongodb

bb6xt

unread,
Jun 4, 2012, 2:58:46 AM6/4/12
to mongodb-user
I wish to thank everyone who has contributed to this thread. You guys
were a tremendous help. Now I have a shiny, newly installed c++
driver. However, when I try to compile the tutorial I still get some
errors, but I guess that is for another thread! Well, here is the
error message anyway should anyone like to reply to it in this thread:

abraham@ubuntu:~/Desktop$ sudo g++ tutorial.cpp -lmongoclient -
lboost_thread-mt -lboost_filesystem-mt -lboost_program_options-mt -
lboost_system
/usr/bin/ld: i386:x86-64 architecture of input file `/usr/local/lib/
libmongoclient.a(md5.o)' is incompatible with i386 output
collect2: ld returned 1 exit status

PS: I use sudo because I get a "Permission Denied" otherwise. Thanks
again.

gregor

unread,
Jun 4, 2012, 3:14:20 AM6/4/12
to mongod...@googlegroups.com
That doesn't look good - that suggests that the compilation of mongoclient is messed up and somehow you have a libmongoclient that is incompatible with your system. 
Personally I'd probably want to get a clean build together to satisfy myself I had a clean starting point - install a quick clean vm ubuntu and compile on that clean system. Then once that's done go back and try to unpick your errors with your original compile. The compilation should "just work" and the errors you are seeing suggest something is messed up. 

Waitman Gobble

unread,
Jun 5, 2012, 6:11:28 AM6/5/12
to mongod...@googlegroups.com

--
You received this message because you are subscribed to the Google
Groups "mongodb-user" group.
To post to this group, send email to mongod...@googlegroups.com
To unsubscribe from this group, send email to

See also the IRC channel -- freenode.net#mongodb




Hi,

I think the answer to the original question is:
$ sudo ldconfig


I just installed Ubuntu on an Eeek PC, installed mongodb, boost, and then the nightly driver.

A couple of points:
mongodb seems to pull in a downgraded gcc (4.4) and boost 1.46.1

When I installed boost I noticed the message about ldconfig deferred - I wonder if that's why the build wasn't finding your boost libs. (?)


Anyway here's /a/ process.



$ cat /etc/issue
Ubuntu 12.04 LTS \n \l

$ uname -a
Linux waitman-1005HA 3.2.0-24-generic-pae #39-Ubuntu SMP Mon May 21 18:54:21 UTC 2012 i686 i686 i386 GNU/Linux

$ sudo apt-get install mongodb

(Note: this also installs  g++-4.4 gcc-4.4 boost 1.46.1)


$ mongo
MongoDB shell version: 2.0.4
connecting to: test
> show dbs
local    (empty)
test    (empty)
>

$ wget http://downloads.mongodb.org/cxx-driver/mongodb-linux-x86_64-2.1.1.tgz

$ tar xzvf mongodb-linux-x86_64-2.1.1.tgz

$ cd mongo-cxx-driver-nightly


$ sudo apt-get install libboost-dev libboost-program-options-dev libboost-thread-dev libboost-filesystem-dev

(Note: this installs 1.48 and finished on my machine with the following message)
...

"ldconfig deferred processing now taking place"



$ sudo ldconfig
(sync ld)

$ scons

(....) hey, if that doesn't do the trick, try altering SConstruct per
https://github.com/mongodb/mongo/pull/230

ie,

$ scons --cxx=g++-4.4 --ldflags=/usr/lib
...
Reply all
Reply to author
Forward
0 new messages