[CXX-373] libmongoclient.so not generated when compling lateset c++ driver Created: 11/Oct/14  Updated: 11/Sep/19  Resolved: 14/Oct/14

Status: Closed
Project: C++ Driver
Component/s: Build
Affects Version/s: legacy-0.0-26compat-2.6.4, legacy-0.0-26compat-2.6.5
Fix Version/s: None

Type: Task Priority: Major - P3
Reporter: heihei1018 Assignee: Unassigned
Resolution: Done Votes: 0
Labels: driver, legacy-cxx
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

centos6.4
gcc 4.8.2
scons 2.3.3
python 2.7.7
boost 1.56



 Description   

I am trying to compile the latest stable c++ driver(26compact branch), https://github.com/mongodb/mongo-cxx-driver
I have built boost from source as:
$ ./bootstrap.sh --help
$ ./bootstrap.sh
$ ./b2 install
and the c++ driver as:
$ scons --use-system-boost --sharedclient --full install-mongoclient
Finally libmongoclient.a has been generated, but when generating libmongclient.so I get something like this:

build/linux2/use-system-boost/mongo/bson/bson_validate.os: In function `__static_initialization_and_destruction_0':
/usr/local/include/boost/system/error_code.hpp:221: undefined reference to `boost::system::generic_category()'
/usr/local/include/boost/system/error_code.hpp:222: undefined reference to `boost::system::generic_category()'
/usr/local/include/boost/system/error_code.hpp:223: undefined reference to `boost::system::system_category()'
build/linux2/use-system-boost/mongo/bson/oid.os: In function `__static_initialization_and_destruction_0':
/usr/local/include/boost/system/error_code.hpp:221: undefined reference to `boost::system::generic_category()'
/usr/local/include/boost/system/error_code.hpp:222: undefined reference to `boost::system::generic_category()'
/usr/local/include/boost/system/error_code.hpp:223: undefined reference to `boost::system::system_category()'
build/linux2/use-system-boost/mongo/bson/optime.os: In function `__static_initialization_and_destruction_0':
/usr/local/include/boost/system/error_code.hpp:221: undefined reference to `boost::system::generic_category()'
/usr/local/include/boost/system/error_code.hpp:222: undefined reference to `boost::system::generic_category()'
/usr/local/include/boost/system/error_code.hpp:223: undefined reference to `boost::system::system_category()'
build/linux2/use-system-boost/mongo/bson/optime.os: In function `thread_exception':
/usr/local/include/boost/thread/exceptions.hpp:51: undefined reference to `boost::system::system_category()'
/usr/local/include/boost/thread/exceptions.hpp:51: undefined reference to `boost::system::system_category()'
build/linux2/use-system-boost/mongo/bson/optime.os: In function `condition_error':
/usr/local/include/boost/thread/exceptions.hpp:84: undefined reference to `boost::system::system_category()'
build/linux2/use-system-boost/mongo/bson/util/bson_extract.os: In function `__static_initialization_and_destruction_0':
/usr/local/include/boost/system/error_code.hpp:221: undefined reference to `boost::system::generic_category()'
/usr/local/include/boost/system/error_code.hpp:222: undefined reference to `boost::system::generic_category()'
/usr/local/include/boost/system/error_code.hpp:223: undefined reference to `boost::system::system_category()'
build/linux2/use-system-boost/mongo/client/clientAndShell.os: In function `__static_initialization_and_destruction_0':
/usr/local/include/boost/system/error_code.hpp:221: undefined reference to `boost::system::generic_category()'
/usr/local/include/boost/system/error_code.hpp:222: undefined reference to `boost::system::generic_category()'
/usr/local/include/boost/system/error_code.hpp:223: undefined reference to `boost::system::system_category()'
build/linux2/use-system-boost/mongo/client/clientAndShell.os: In function `thread_exception':
/usr/local/include/boost/thread/exceptions.hpp:51: undefined reference to `boost::system::system_category()'
/usr/local/include/boost/thread/exceptions.hpp:51: undefined reference to `boost::system::system_category()'
build/linux2/use-system-boost/mongo/client/clientOnly.os: In function `__static_initialization_and_destruction_0':
/usr/local/include/boost/system/error_code.hpp:221: undefined reference to `boost::system::generic_category()'
/usr/local/include/boost/system/error_code.hpp:222: undefined reference to `boost::system::generic_category()'
/usr/local/include/boost/system/error_code.hpp:223: undefined reference to `boost::system::system_category()'
build/linux2/use-system-boost/mongo/client/connpool.os: In function `__static_initialization_and_destruction_0':
/usr/local/include/boost/system/error_code.hpp:221: undefined reference to `boost::system::generic_category()'
/usr/local/include/boost/system/error_code.hpp:222: undefined reference to `boost::system::generic_category()'
/usr/local/include/boost/system/error_code.hpp:223: undefined reference to `boost::system::system_category()'
build/linux2/use-system-boost/mongo/client/dbclient.os: In function `__static_initialization_and_destruction_0':
/usr/local/include/boost/system/error_code.hpp:221: undefined reference to `boost::system::generic_category()'
/usr/local/include/boost/system/error_code.hpp:222: undefined reference to `boost::system::generic_category()'
/usr/local/include/boost/system/error_code.hpp:223: undefined reference to `boost::system::system_category()'
build/linux2/use-system-boost/mongo/client/dbclient_rs.os: In function `__static_initialization_and_destruction_0':
/usr/local/include/boost/system/error_code.hpp:221: undefined reference to `boost::system::generic_category()'
/usr/local/include/boost/system/error_code.hpp:222: undefined reference to `boost::system::generic_category()'
/usr/local/include/boost/system/error_code.hpp:223: undefined reference to `boost::system::system_category()'
build/linux2/use-system-boost/mongo/client/replica_set_monitor.os: In function `boost::thread::start_thread()':
/usr/local/include/boost/thread/detail/thread.hpp:178: undefined reference to `boost::thread::start_thread_noexcept()'
build/linux2/use-system-boost/mongo/client/replica_set_monitor.os: In function `__static_initialization_and_destruction_0':
/usr/local/include/boost/system/error_code.hpp:221: undefined reference to `boost::system::generic_category()'
/usr/local/include/boost/system/error_code.hpp:222: undefined reference to `boost::system::generic_category()'
/usr/local/include/boost/system/error_code.hpp:223: undefined reference to `boost::system::system_category()'
build/linux2/use-system-boost/mongo/client/replica_set_monitor.os: In function `condition_error':
/usr/local/include/boost/thread/exceptions.hpp:84: undefined reference to `boost::system::system_category()'
/usr/local/include/boost/thread/exceptions.hpp:84: undefined reference to `boost::system::system_category()'
build/linux2/use-system-boost/mongo/client/replica_set_monitor.os: In function `thread_exception':
/usr/local/include/boost/thread/exceptions.hpp:51: undefined reference to `boost::system::system_category()'
/usr/local/include/boost/thread/exceptions.hpp:51: undefined reference to `boost::system::system_category()'
build/linux2/use-system-boost/mongo/client/dbclientcursor.os: In function `__static_initialization_and_destruction_0':
/usr/local/include/boost/system/error_code.hpp:221: undefined reference to `boost::system::generic_category()'
/usr/local/include/boost/system/error_code.hpp:222: undefined reference to `boost::system::generic_category()'
/usr/local/include/boost/system/error_code.hpp:223: undefined reference to `boost::system::system_category()'
build/linux2/use-system-boost/mongo/client/gridfs.os: In function `__static_initialization_and_destruction_0':
/usr/local/include/boost/system/error_code.hpp:221: undefined reference to `boost::system::generic_category()'
/usr/local/include/boost/system/error_code.hpp:222: undefined reference to `boost::system::generic_category()'
/usr/local/include/boost/system/error_code.hpp:223: undefined reference to `boost::system::system_category()'
build/linux2/use-system-boost/mongo/client/gridfs.os: In function `exists':
/usr/local/include/boost/filesystem/operations.hpp:400: undefined reference to `boost::filesystem::detail::status(boost::filesystem::path const&, boost::system::error_code*)'
build/linux2/use-system-boost/mongo/client/init.os: In function `__static_initialization_and_destruction_0':
/usr/local/include/boost/system/error_code.hpp:221: undefined reference to `boost::system::generic_category()'
/usr/local/include/boost/system/error_code.hpp:222: undefined reference to `boost::system::generic_category()'
/usr/local/include/boost/system/error_code.hpp:223: undefined reference to `boost::system::system_category()'
build/linux2/use-system-boost/mongo/client/sasl_client_authenticate.os: In function `__static_initialization_and_destruction_0':
/usr/local/include/boost/system/error_code.hpp:221: undefined reference to `boost::system::generic_category()'
/usr/local/include/boost/system/error_code.hpp:222: undefined reference to `boost::system::generic_category()'
/usr/local/include/boost/system/error_code.hpp:223: undefined reference to `boost::system::system_category()'
build/linux2/use-system-boost/mongo/client/syncclusterconnection.os: In function `__static_initialization_and_destruction_0':
/usr/local/include/boost/system/error_code.hpp:221: undefined reference to `boost::system::generic_category()'
/usr/local/include/boost/system/error_code.hpp:222: undefined reference to `boost::system::generic_category()'
/usr/local/include/boost/system/error_code.hpp:223: undefined reference to `boost::system::system_category()'
build/linux2/use-system-boost/mongo/db/jsobj.os: In function `__static_initialization_and_destruction_0':
/usr/local/include/boost/system/error_code.hpp:221: undefined reference to `boost::system::generic_category()'
/usr/local/include/boost/system/error_code.hpp:222: undefined reference to `boost::system::generic_category()'
/usr/local/include/boost/system/error_code.hpp:223: undefined reference to `boost::system::system_category()'
build/linux2/use-system-boost/mongo/db/json.os: In function `__static_initialization_and_destruction_0':
/usr/local/include/boost/system/error_code.hpp:221: undefined reference to `boost::system::generic_category()'
/usr/local/include/boost/system/error_code.hpp:222: undefined reference to `boost::system::generic_category()'
/usr/local/include/boost/system/error_code.hpp:223: undefined reference to `boost::system::system_category()'
build/linux2/use-system-boost/mongo/db/lasterror.os: In function `__static_initialization_and_destruction_0':
/usr/local/include/boost/system/error_code.hpp:221: undefined reference to `boost::system::generic_category()'
/usr/local/include/boost/system/error_code.hpp:222: undefined reference to `boost::system::generic_category()'
/usr/local/include/boost/system/error_code.hpp:223: undefined reference to `boost::system::system_category()'
build/linux2/use-system-boost/mongo/db/dbmessage.os: In function `__static_initialization_and_destruction_0':
/usr/local/include/boost/system/error_code.hpp:221: undefined reference to `boost::system::generic_category()'
/usr/local/include/boost/system/error_code.hpp:222: undefined reference to `boost::system::generic_category()'
/usr/local/include/boost/system/error_code.hpp:223: undefined reference to `boost::system::system_category()'
build/linux2/use-system-boost/mongo/db/server_options.os: In function `__static_initialization_and_destruction_0':
/usr/local/include/boost/system/error_code.hpp:221: undefined reference to `boost::system::generic_category()'
/usr/local/include/boost/system/error_code.hpp:222: undefined reference to `boost::system::generic_category()'
/usr/local/include/boost/system/error_code.hpp:223: undefined reference to `boost::system::system_category()'
build/linux2/use-system-boost/mongo/logger/console.os: In function `__static_initialization_and_destruction_0':
/usr/local/include/boost/system/error_code.hpp:221: undefined reference to `boost::system::generic_category()'
/usr/local/include/boost/system/error_code.hpp:222: undefined reference to `boost::system::generic_category()'
/usr/local/include/boost/system/error_code.hpp:223: undefined reference to `boost::system::system_category()'
build/linux2/use-system-boost/mongo/logger/console.os: In function `thread_exception':
/usr/local/include/boost/thread/exceptions.hpp:51: undefined reference to `boost::system::system_category()'
build/linux2/use-system-boost/mongo/logger/log_manager.os: In function `__static_initialization_and_destruction_0':
/usr/local/include/boost/system/error_code.hpp:221: undefined reference to `boost::system::generic_category()'
/usr/local/include/boost/system/error_code.hpp:222: undefined reference to `boost::system::generic_category()'
/usr/local/include/boost/system/error_code.hpp:223: undefined reference to `boost::system::system_category()'
build/linux2/use-system-boost/mongo/logger/log_manager.os: In function `thread_exception':
/usr/local/include/boost/thread/exceptions.hpp:51: undefined reference to `boost::system::system_category()'
build/linux2/use-system-boost/mongo/logger/logger.os: In function `__static_initialization_and_destruction_0':
/usr/local/include/boost/system/error_code.hpp:221: undefined reference to `boost::system::generic_category()'
/usr/local/include/boost/system/error_code.hpp:222: undefined reference to `boost::system::generic_category()'
/usr/local/include/boost/system/error_code.hpp:223: undefined reference to `boost::system::system_category()'
build/linux2/use-system-boost/mongo/logger/ramlog.os: In function `__static_initialization_and_destruction_0':
/usr/local/include/boost/system/error_code.hpp:221: undefined reference to `boost::system::generic_category()'
/usr/local/include/boost/system/error_code.hpp:222: undefined reference to `boost::system::generic_category()'
/usr/local/include/boost/system/error_code.hpp:223: undefined reference to `boost::system::system_category()'
build/linux2/use-system-boost/mongo/logger/rotatable_file_manager.os: In function `__static_initialization_and_destruction_0':
/usr/local/include/boost/system/error_code.hpp:221: undefined reference to `boost::system::generic_category()'
/usr/local/include/boost/system/error_code.hpp:222: undefined reference to `boost::system::generic_category()'
/usr/local/include/boost/system/error_code.hpp:223: undefined reference to `boost::system::system_category()'
build/linux2/use-system-boost/mongo/logger/rotatable_file_manager.os: In function `thread_exception':
/usr/local/include/boost/thread/exceptions.hpp:51: undefined reference to `boost::system::system_category()'
build/linux2/use-system-boost/mongo/logger/rotatable_file_writer.os: In function `__static_initialization_and_destruction_0':
/usr/local/include/boost/system/error_code.hpp:221: undefined reference to `boost::system::generic_category()'
/usr/local/include/boost/system/error_code.hpp:222: undefined reference to `boost::system::generic_category()'
/usr/local/include/boost/system/error_code.hpp:223: undefined reference to `boost::system::system_category()'
build/linux2/use-system-boost/mongo/logger/rotatable_file_writer.os: In function `thread_exception':
/usr/local/include/boost/thread/exceptions.hpp:51: undefined reference to `boost::system::system_category()'
build/linux2/use-system-boost/mongo/logger/rotatable_file_writer.os: In function `exists':
/usr/local/include/boost/filesystem/operations.hpp:400: undefined reference to `boost::filesystem::detail::status(boost::filesystem::path const&, boost::system::error_code*)'
build/linux2/use-system-boost/mongo/pch.os: In function `__static_initialization_and_destruction_0':
/usr/local/include/boost/system/error_code.hpp:221: undefined reference to `boost::system::generic_category()'
/usr/local/include/boost/system/error_code.hpp:222: undefined reference to `boost::system::generic_category()'
/usr/local/include/boost/system/error_code.hpp:223: undefined reference to `boost::system::system_category()'
build/linux2/use-system-boost/mongo/util/assert_util.os: In function `__static_initialization_and_destruction_0':
/usr/local/include/boost/system/error_code.hpp:221: undefined reference to `boost::system::generic_category()'
/usr/local/include/boost/system/error_code.hpp:222: undefined reference to `boost::system::generic_category()'
/usr/local/include/boost/system/error_code.hpp:223: undefined reference to `boost::system::system_category()'
build/linux2/use-system-boost/mongo/util/background.os: In function `__static_initialization_and_destruction_0':
/usr/local/include/boost/system/error_code.hpp:221: undefined reference to `boost::system::generic_category()'
/usr/local/include/boost/system/error_code.hpp:222: undefined reference to `boost::system::generic_category()'
/usr/local/include/boost/system/error_code.hpp:223: undefined reference to `boost::system::system_category()'
build/linux2/use-system-boost/mongo/util/background.os: In function `boost::thread::start_thread()':
/usr/local/include/boost/thread/detail/thread.hpp:178: undefined reference to `boost::thread::start_thread_noexcept()'
build/linux2/use-system-boost/mongo/util/background.os: In function `condition_error':
/usr/local/include/boost/thread/exceptions.hpp:84: undefined reference to `boost::system::system_category()'
build/linux2/use-system-boost/mongo/util/base64.os: In function `__static_initialization_and_destruction_0':
/usr/local/include/boost/system/error_code.hpp:221: undefined reference to `boost::system::generic_category()'
/usr/local/include/boost/system/error_code.hpp:222: undefined reference to `boost::system::generic_category()'
/usr/local/include/boost/system/error_code.hpp:223: undefined reference to `boost::system::system_category()'
build/linux2/use-system-boost/mongo/util/concurrency/spin_lock.os: In function `__static_initialization_and_destruction_0':
/usr/local/include/boost/system/error_code.hpp:221: undefined reference to `boost::system::generic_category()'
/usr/local/include/boost/system/error_code.hpp:222: undefined reference to `boost::system::generic_category()'
/usr/local/include/boost/system/error_code.hpp:223: undefined reference to `boost::system::system_category()'
build/linux2/use-system-boost/mongo/util/concurrency/synchronization.os: In function `__static_initialization_and_destruction_0':
/usr/local/include/boost/system/error_code.hpp:221: undefined reference to `boost::system::generic_category()'
/usr/local/include/boost/system/error_code.hpp:222: undefined reference to `boost::system::generic_category()'
/usr/local/include/boost/system/error_code.hpp:223: undefined reference to `boost::system::system_category()'
build/linux2/use-system-boost/mongo/util/concurrency/synchronization.os: In function `thread_exception':
/usr/local/include/boost/thread/exceptions.hpp:51: undefined reference to `boost::system::system_category()'
/usr/local/include/boost/thread/exceptions.hpp:51: undefined reference to `boost::system::system_category()'
/usr/local/include/boost/thread/exceptions.hpp:51: undefined reference to `boost::system::system_category()'
/usr/local/include/boost/thread/exceptions.hpp:51: undefined reference to `boost::system::system_category()'
build/linux2/use-system-boost/mongo/util/concurrency/synchronization.os:/usr/local/include/boost/thread/exceptions.hpp:51: more undefined references to `boost::system::system_category()' follow
build/linux2/use-system-boost/mongo/util/concurrency/mutexdebugger.os: In function `__static_initialization_and_destruction_0':
/usr/local/include/boost/system/error_code.hpp:221: undefined reference to `boost::system::generic_category()'
/usr/local/include/boost/system/error_code.hpp:222: undefined reference to `boost::system::generic_category()'
/usr/local/include/boost/system/error_code.hpp:223: undefined reference to `boost::system::system_category()'
build/linux2/use-system-boost/mongo/util/debug_util.os: In function `__static_initialization_and_destruction_0':
/usr/local/include/boost/system/error_code.hpp:221: undefined reference to `boost::system::generic_category()'
/usr/local/include/boost/system/error_code.hpp:222: undefined reference to `boost::system::generic_category()'
/usr/local/include/boost/system/error_code.hpp:223: undefined reference to `boost::system::system_category()'
build/linux2/use-system-boost/mongo/util/stacktrace.os: In function `__static_initialization_and_destruction_0':
/usr/local/include/boost/system/error_code.hpp:221: undefined reference to `boost::system::generic_category()'
/usr/local/include/boost/system/error_code.hpp:222: undefined reference to `boost::system::generic_category()'
/usr/local/include/boost/system/error_code.hpp:223: undefined reference to `boost::system::system_category()'
build/linux2/use-system-boost/mongo/util/fail_point.os: In function `__static_initialization_and_destruction_0':
/usr/local/include/boost/system/error_code.hpp:221: undefined reference to `boost::system::generic_category()'
/usr/local/include/boost/system/error_code.hpp:222: undefined reference to `boost::system::generic_category()'
/usr/local/include/boost/system/error_code.hpp:223: undefined reference to `boost::system::system_category()'
build/linux2/use-system-boost/mongo/util/fail_point_registry.os: In function `__static_initialization_and_destruction_0':
/usr/local/include/boost/system/error_code.hpp:221: undefined reference to `boost::system::generic_category()'
/usr/local/include/boost/system/error_code.hpp:222: undefined reference to `boost::system::generic_category()'
/usr/local/include/boost/system/error_code.hpp:223: undefined reference to `boost::system::system_category()'
build/linux2/use-system-boost/mongo/util/fail_point_service.os: In function `__static_initialization_and_destruction_0':
/usr/local/include/boost/system/error_code.hpp:221: undefined reference to `boost::system::generic_category()'
/usr/local/include/boost/system/error_code.hpp:222: undefined reference to `boost::system::generic_category()'
/usr/local/include/boost/system/error_code.hpp:223: undefined reference to `boost::system::system_category()'
build/linux2/use-system-boost/mongo/util/log.os: In function `__static_initialization_and_destruction_0':
/usr/local/include/boost/system/error_code.hpp:221: undefined reference to `boost::system::generic_category()'
/usr/local/include/boost/system/error_code.hpp:222: undefined reference to `boost::system::generic_category()'
/usr/local/include/boost/system/error_code.hpp:223: undefined reference to `boost::system::system_category()'
build/linux2/use-system-boost/mongo/util/net/httpclient.os: In function `__static_initialization_and_destruction_0':
/usr/local/include/boost/system/error_code.hpp:221: undefined reference to `boost::system::generic_category()'
/usr/local/include/boost/system/error_code.hpp:222: undefined reference to `boost::system::generic_category()'
/usr/local/include/boost/system/error_code.hpp:223: undefined reference to `boost::system::system_category()'
build/linux2/use-system-boost/mongo/util/net/listen.os: In function `__static_initialization_and_destruction_0':
/usr/local/include/boost/system/error_code.hpp:221: undefined reference to `boost::system::generic_category()'
/usr/local/include/boost/system/error_code.hpp:222: undefined reference to `boost::system::generic_category()'
/usr/local/include/boost/system/error_code.hpp:223: undefined reference to `boost::system::system_category()'
build/linux2/use-system-boost/mongo/util/net/message.os: In function `__static_initialization_and_destruction_0':
/usr/local/include/boost/system/error_code.hpp:221: undefined reference to `boost::system::generic_category()'
/usr/local/include/boost/system/error_code.hpp:222: undefined reference to `boost::system::generic_category()'
/usr/local/include/boost/system/error_code.hpp:223: undefined reference to `boost::system::system_category()'
build/linux2/use-system-boost/mongo/util/net/message_port.os: In function `__static_initialization_and_destruction_0':
/usr/local/include/boost/system/error_code.hpp:221: undefined reference to `boost::system::generic_category()'
/usr/local/include/boost/system/error_code.hpp:222: undefined reference to `boost::system::generic_category()'
/usr/local/include/boost/system/error_code.hpp:223: undefined reference to `boost::system::system_category()'
build/linux2/use-system-boost/mongo/util/net/sock.os: In function `__static_initialization_and_destruction_0':
/usr/local/include/boost/system/error_code.hpp:221: undefined reference to `boost::system::generic_category()'
/usr/local/include/boost/system/error_code.hpp:222: undefined reference to `boost::system::generic_category()'
/usr/local/include/boost/system/error_code.hpp:223: undefined reference to `boost::system::system_category()'
build/linux2/use-system-boost/mongo/util/net/ssl_manager.os: In function `__static_initialization_and_destruction_0':
/usr/local/include/boost/system/error_code.hpp:221: undefined reference to `boost::system::generic_category()'
/usr/local/include/boost/system/error_code.hpp:222: undefined reference to `boost::system::generic_category()'
/usr/local/include/boost/system/error_code.hpp:223: undefined reference to `boost::system::system_category()'
build/linux2/use-system-boost/mongo/util/stringutils.os: In function `__static_initialization_and_destruction_0':
/usr/local/include/boost/system/error_code.hpp:221: undefined reference to `boost::system::generic_category()'
/usr/local/include/boost/system/error_code.hpp:222: undefined reference to `boost::system::generic_category()'
/usr/local/include/boost/system/error_code.hpp:223: undefined reference to `boost::system::system_category()'
build/linux2/use-system-boost/mongo/util/time_support.os: In function `__static_initialization_and_destruction_0':
/usr/local/include/boost/system/error_code.hpp:221: undefined reference to `boost::system::generic_category()'
/usr/local/include/boost/system/error_code.hpp:222: undefined reference to `boost::system::generic_category()'
/usr/local/include/boost/system/error_code.hpp:223: undefined reference to `boost::system::system_category()'
build/linux2/use-system-boost/mongo/util/util.os: In function `__static_initialization_and_destruction_0':
/usr/local/include/boost/system/error_code.hpp:221: undefined reference to `boost::system::generic_category()'
/usr/local/include/boost/system/error_code.hpp:222: undefined reference to `boost::system::generic_category()'
/usr/local/include/boost/system/error_code.hpp:223: undefined reference to `boost::system::system_category()'
build/linux2/use-system-boost/mongo/util/version.os: In function `__static_initialization_and_destruction_0':
/usr/local/include/boost/system/error_code.hpp:221: undefined reference to `boost::system::generic_category()'
/usr/local/include/boost/system/error_code.hpp:222: undefined reference to `boost::system::generic_category()'
/usr/local/include/boost/system/error_code.hpp:223: undefined reference to `boost::system::system_category()'
collect2: ld returned 1 exit status
scons: *** [build/linux2/use-system-boost/libmongoclient.so] Error 1
scons: building terminated because of errors.

How can I fix this problem?

Thanks!



 Comments   
Comment by Andrew Morrow (Inactive) [ 14/Oct/14 ]

I'm closing this ticket since we have not heard back. Feel free to ask us to re-open if you are still having problems.

Comment by Andrew Morrow (Inactive) [ 11/Oct/14 ]

Without the configuration output of your build it is hard to see exactly what is going wrong. However, it is currently challenging to build against your own compiled version of boost when boost is also installed on the system. You must ensure that the driver is both including the headers from your custom boost build, and linking against the libraries in your custom boost build. This can be tricky to ensure, as the driver configuration step may look for a library by name that does not exist in your build, but does exist in the system install. In such a case you will end up building against your custom boost headers but attempting to link against the system boost library.

You must either uninstall the system boost libraries, or ensure that your configuration of boost results in boost headers and libraries that exactly and completely shadow the names of the system headers and libraries.

It might be helpful if you provided the following:

  • The output of the configure step of the build
  • The list of libraries in your default linker search path that have 'boost_system' in the name.
  • The list of libraries in your boost installation library directory which have 'boost_system' in the name.
Comment by heihei1018 [ 11/Oct/14 ]

Hello Andrew:
I add '--cpppath=/usr/include/boost --extrapath=/usr/local', and build again. The resulte has no difference.
But when I delete '/usr/local/include/boost', which the boost version is 1.56. I execute '$ scons --use-system-boost --sharedclient --full install-mongoclient', it succeed unexpectedly. Now the boost version is 1.41 which centos6.4 has itself. The boost path is '/usr/include/boost'.
When I build boost , how can i figure the path to overwrite the older version?
Anyway, Thank you very much ,Andrew! This error has troubled me for two days. It pushed me to the edge.
Thank you!

Comment by Andrew Morrow (Inactive) [ 11/Oct/14 ]

Can you please include the output of the configure checks? Also, I'm a little puzzled by the relationship between your build output and your scons invocation. You are building boost from source, but then you are passing --use-system-boost, which would suggest that you want the boost from /usr/include and /usr/lib, rather than the one from your boost install. Also, I see that the build is referencing headers from /usr/local, but by default the build should not be searching there, unless you have used the --cpppath or --extrapath arguments to your scons invocation.

Can you double check that the scons invocation you have provided is complete?

Generated at Wed Feb 07 21:59:01 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.