Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 465242 - dev-db/mongodb-2.4.1 USE=sharedclient - linking against libmongoclient.so fails with undefined symbols from mongo::
Summary: dev-db/mongodb-2.4.1 USE=sharedclient - linking against libmongoclient.so fai...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: Normal normal (vote)
Assignee: Ultrabug
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-04-09 11:44 UTC by Christoph Koke
Modified: 2013-04-19 12:11 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
emerge --info (emerge.info,18.53 KB, text/plain)
2013-04-09 11:45 UTC, Christoph Koke
Details
fixing scons scripts to build a working libmongoclient.so (mongodb-2.4.1-fix-sharedclient.patch,4.70 KB, patch)
2013-04-13 10:25 UTC, Christoph Koke
Details | Diff
ebuild using the new patch (mongodb-2.4.1-r1.ebuild,3.30 KB, text/plain)
2013-04-13 10:28 UTC, Christoph Koke
Details
fixing scons scripts to build a working libmongoclient.so (mongodb-2.4.1-fix-sharedclient.patch,4.42 KB, text/plain)
2013-04-13 11:39 UTC, Christoph Koke
Details
fixing scons scripts to build a working libmongoclient.so (mongodb-2.4.1-fix-sharedclient.patch,3.99 KB, patch)
2013-04-13 18:22 UTC, Christoph Koke
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Christoph Koke 2013-04-09 11:44:47 UTC
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
Comment 1 Christoph Koke 2013-04-09 11:45:17 UTC
Created attachment 344952 [details]
emerge --info
Comment 2 Jeroen Roovers (RETIRED) gentoo-dev 2013-04-09 14:34:42 UTC
Should it be installed at all when USE=-sharedclient?
Comment 3 Christoph Koke 2013-04-09 14:44:23 UTC
sorry, seem that my description was not clear:

The linking errors occur only, when I USE=sharedclient. With USE=-sharedclient everything works fine.
Comment 4 Christoph Koke 2013-04-13 10:25:44 UTC
Created attachment 345454 [details, diff]
fixing scons scripts to build a working libmongoclient.so
Comment 5 Christoph Koke 2013-04-13 10:28:15 UTC
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.
Comment 6 Christoph Koke 2013-04-13 11:39:44 UTC
Created attachment 345466 [details]
fixing scons scripts to build a working libmongoclient.so
Comment 7 Christoph Koke 2013-04-13 18:22:37 UTC
Created attachment 345496 [details, diff]
fixing scons scripts to build a working libmongoclient.so
Comment 8 Ultrabug gentoo-dev 2013-04-16 12:38:46 UTC
Sorry for the delay mate, I'll be checking and testing your patch this week, expect a resolution soon.

Thanks
Comment 9 Ultrabug gentoo-dev 2013-04-16 12:54:00 UTC
(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.
Comment 10 Ultrabug gentoo-dev 2013-04-18 10:47:40 UTC
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
+
Comment 11 Christoph Koke 2013-04-19 12:11:52 UTC
great, thanks