When building mongodb-2.6.10 with dev-libs/boost-1.57, compilation fails on src/mongo/shell/linenoise_utf8.h. Attached patch should fix that (http://pkgs.fedoraproject.org/cgit/mongodb.git/plain/mongodb-2.6.7-swap.patch, cleaned it up a bit). Reproducible: Always
Created attachment 407962 [details, diff] mongodb swap patch Patch to allow building mongodb-2.6.10 with boost-1.57
Created attachment 408096 [details, diff] metadata.xml patch. Introduces new flag "system-boost" This problem can be also solved by compiling mongodb with boost included in its sources. It looks like this combination is the only one officially supported: https://jira.mongodb.org/browse/SERVER-15940 "The SERVER project is for reporting bugs or feature suggestions for the MongoDB server, and we officially only support building with the vendored boost." Attaching patches to ebuild (2.6.10) and metadata which introduce new flag: "system-boost" which is set to on by default.
Created attachment 408098 [details, diff] ebuild patch. Introduces new flag "system-boost"
Regarding updated ebuild, "system-boost" flag seems to be used when "Use system boost (dev-libs/boost) instead of bundled one", so in this case it should be disabled by default, so that bundeled version is used. That or scons_opts+=" --use-system-boost" line be removed from ebuild completely since it won't build without patch when "system-boost" >=dev-libs/boost-1.57.
(In reply to Uros from comment #4) I enabled system-boost by default in order not to change the behavior of the mongodb build (keep backward compatibility). I hope mongodb will fix this bug in upstream later. Then it will be possible to use system boost again.
(In reply to Vitaly A. Repin from comment #5) Makes perfect sense. Thanks for clarification. I've just built mongo with bundeled boost (your patches) and it works as expected.
Hi, We have indeed a problem with recent boost versions even with more recent mongodb (https://jira.mongodb.org/browse/SERVER-19661). I'm not inclined to add such a USE flag tho, it goes against Gentoo's policy of not using bundled libs. I will add the patch to fix the build and report back here once I've tested everything.
+ 03 Aug 2015; Ultrabug <ultrabug@gentoo.org> mongodb-2.6.10.ebuild, + +files/mongodb-2.6.10-fix-boost-1.57.patch: + fix #556272 build with boost-1.57 thx to Uros + fixed in tree. thanks !
No, it's not fixed. We need a fix to stable, not dev branch. >>> Emerging (1 of 1) dev-db/mongodb-2.6.8 * mongodb-src-r2.6.8.tar.gz SHA256 SHA512 WHIRLPOOL size ;-) ... [ ok ] >>> Unpacking source... >>> Unpacking mongodb-src-r2.6.8.tar.gz to /tmp/portage/dev-db/mongodb-2.6.8/work >>> Source unpacked in /tmp/portage/dev-db/mongodb-2.6.8/work >>> Preparing source in /tmp/portage/dev-db/mongodb-2.6.8/work/mongodb-src-r2.6.8 ... * Applying mongodb-2.6.2-fix-scons.patch ... [ ok ] * Applying mongodb-2.4-fix-v8-pythonpath.patch ... [ ok ] >>> Source prepared. >>> Configuring source in /tmp/portage/dev-db/mongodb-2.6.8/work/mongodb-src-r2.6.8 ... >>> Source configured. >>> Compiling source in /tmp/portage/dev-db/mongodb-2.6.8/work/mongodb-src-r2.6.8 ... scons -j4 --variant-dir=build --cc=x86_64-pc-linux-gnu-gcc --cxx=x86_64-pc-linux-gnu-g++ --disable-warnings-as-errors --use-system-boost --use-system-pcre --use-system-snappy --use-system-stemmer --use-system-tcmalloc --use-system-yaml --usev8 --ssl all .... scons: Building targets ... Target 'build/build/mongo/mongo' depends on the availability of a system provided library for 'boost_program_options', but no suitable library was found during configuration. Target 'build/build/mongo/mongo' depends on the availability of a system provided library for 'boost_program_options', but no suitable library was found during configuration. scons: *** [build/build/mongo/mongo] Error 1
(In reply to Yuri Arabadji from comment #9) > No, it's not fixed. We need a fix to stable, not dev branch. > Ok idd, I've fixed 2.6.8 too but keep in mind that this means you're mixing an unstable boost with a stable mongodb. Cheers