I develop a application using mongoclient and got link error against symbols from the mongo:: namespace, when I use the libmongoclient.so. When I set -sharedclient everthing links correctlty I think the mongodb scons script is broken and does not include all required objects into the shared library The missing symbols are: /usr/lib/gcc/x86_64-pc-linux-gnu/4.6.3/../../../../lib64/libmongoclient.so: undefined reference to `mongo::LocksType::why' /usr/lib/gcc/x86_64-pc-linux-gnu/4.6.3/../../../../lib64/libmongoclient.so: undefined reference to `mongo::LockpingsType::ConfigNS' /usr/lib/gcc/x86_64-pc-linux-gnu/4.6.3/../../../../lib64/libmongoclient.so: undefined reference to `mongo::LocksType::name' /usr/lib/gcc/x86_64-pc-linux-gnu/4.6.3/../../../../lib64/libmongoclient.so: undefined reference to `mongo::LockpingsType::ping' /usr/lib/gcc/x86_64-pc-linux-gnu/4.6.3/../../../../lib64/libmongoclient.so: undefined reference to `mongo::LocksType::lockID' /usr/lib/gcc/x86_64-pc-linux-gnu/4.6.3/../../../../lib64/libmongoclient.so: undefined reference to `mongo::ProcessInfo::blockCheckSupported()' /usr/lib/gcc/x86_64-pc-linux-gnu/4.6.3/../../../../lib64/libmongoclient.so: undefined reference to `mongo::LocksType::ConfigNS' /usr/lib/gcc/x86_64-pc-linux-gnu/4.6.3/../../../../lib64/libmongoclient.so: undefined reference to `mongo::LocksType::state' /usr/lib/gcc/x86_64-pc-linux-gnu/4.6.3/../../../../lib64/libmongoclient.so: undefined reference to `mongo::LockpingsType::process' /usr/lib/gcc/x86_64-pc-linux-gnu/4.6.3/../../../../lib64/libmongoclient.so: undefined reference to `mongo::LocksType::process' /usr/lib/gcc/x86_64-pc-linux-gnu/4.6.3/../../../../lib64/libmongoclient.so: undefined reference to `mongo::LocksType::who' My mongodb useflags are: sharedclient ssl -kerberos -mms-agent -spidermonkey -static-libs Reproducible: Always
Created attachment 344952 [details] emerge --info
Should it be installed at all when USE=-sharedclient?
sorry, seem that my description was not clear: The linking errors occur only, when I USE=sharedclient. With USE=-sharedclient everything works fine.
Created attachment 345454 [details, diff] fixing scons scripts to build a working libmongoclient.so
Created attachment 345456 [details] ebuild using the new patch I worked a bit with the mongo workflow and I think the attached ebuild and the patch should fix the build of libmongoclient.so. Note that the static libmongoclient.a ist only installed, when the static-libs is set.
Created attachment 345466 [details] fixing scons scripts to build a working libmongoclient.so
Created attachment 345496 [details, diff] fixing scons scripts to build a working libmongoclient.so
Sorry for the delay mate, I'll be checking and testing your patch this week, expect a resolution soon. Thanks
(In reply to comment #7) > Created attachment 345496 [details, diff] [details, diff] > fixing scons scripts to build a working libmongoclient.so Christoph, is this the final working patch and the only one that should be applied to fix your problem ? Did you submit it upstream please ? I'm not using the shared lib so I'm kinda blind on applying this patch tbh.
K I tested and looked okay, thanks Chrisoph ! +*mongodb-2.4.2 (18 Apr 2013) + + 18 Apr 2013; Ultrabug <ultrabug@gentoo.org> -mongodb-2.2.3-r1.ebuild, + +mongodb-2.4.2.ebuild, +files/mongodb-2.4-fix-sharedclient.patch: + Version bump, fix #465242 thx to Christoph Koke, drop old +
great, thanks