[CXX-92] Shared client compiler switch "--as-needed" giving compiler errors Created: 31/Oct/11  Updated: 10/Apr/14  Resolved: 17/Mar/14

Status: Closed
Project: C++ Driver
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Minor - P4
Reporter: Douglas Hubler Assignee: Andrew Morrow (Inactive)
Resolution: Done Votes: 0
Labels: compile, cxxmove, legacy-cxx
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Fedora 14 64 but
git sha b2910bcc5e55ee7d29f83476db0fd1c577690b71


Attachments: File 0002-SERVER-4181-as-needed-compiler-switch-otherwise-mong.patch     File mongo-sharedclient-no-as-needed.log    

 Description   

switch "--as-needed" is leaving a lot of undefined references when building mongoclient.so. See log for details. Removing switch then everything links. Will attach patch momentarily....

Here are some of the link error message, full log is attached.
./libmongotestfiles.a(cmdline.o): In function `mongo::CmdLine::addGlobalOptions(boost::program_options::options_description&, boost::program_options::options_description&)':
/home/dhubler/temp/mongodb-src-r2.0.0/db/cmdline.cpp:47: undefined reference to `boost::program_options::options_description::add_options()'
/home/dhubler/temp/mongodb-src-r2.0.0/db/cmdline.cpp:47: undefined reference to `boost::program_options::options_description_easy_init::operator()(char const*, char const*)'
/home/dhubler/temp/mongodb-src-r2.0.0/db/cmdline.cpp:51: undefined reference to `boost::program_options::options_description::add_options()'
/home/dhubler/temp/mongodb-src-r2.0.0/db/cmdline.cpp:51: undefined reference to `boost::program_options::options_description_easy_init::operator()(char const*, char const*)'
/home/dhubler/temp/mongodb-src-r2.0.0/db/cmdline.cpp:52: undefined reference to `boost::program_options::options_description_easy_init::operator()(char const*, char const*)'
/home/dhubler/temp/mongodb-src-r2.0.0/db/cmdline.cpp:53: undefined reference to `boost::program_options::options_description_easy_init::operator()(char const*,



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

I'm closing this, but please feel free to re-open if this is still an issue.

Comment by Andrew Morrow (Inactive) [ 12/Mar/14 ]

Hi dhubler -

This ticket is quite old. Would you be able to try this with the latest release candidate from the legacy branch of the now independent C++ driver repo and see whether the issue is resolved?

http://blog.mongodb.org/post/78478565493/upcoming-changes-to-the-mongodb-cpp-driver
https://github.com/mongodb/mongo-cxx-driver

Thanks,
Andrew

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