Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 556272 - dev-db/mongodb-2.6.10 fails to build with dev-libs/boost-1.57.0
Summary: dev-db/mongodb-2.6.10 fails to build with dev-libs/boost-1.57.0
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Development (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Ultrabug
URL:
Whiteboard:
Keywords: PATCH
Depends on:
Blocks: boost-1.57
  Show dependency tree
 
Reported: 2015-07-29 21:44 UTC by Uros
Modified: 2015-08-07 14:08 UTC (History)
3 users (show)

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


Attachments
mongodb swap patch (mongodb-2.6.10-swap.patch,292 bytes, patch)
2015-07-29 21:49 UTC, Uros
Details | Diff
metadata.xml patch. Introduces new flag "system-boost" (metadata.xml.patch,83 bytes, patch)
2015-08-01 11:12 UTC, Vitaly A. Repin
Details | Diff
ebuild patch. Introduces new flag "system-boost" (mongodb-2.6.10.ebuild.patch,255 bytes, patch)
2015-08-01 11:13 UTC, Vitaly A. Repin
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Uros 2015-07-29 21:44:36 UTC
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
Comment 1 Uros 2015-07-29 21:49:05 UTC
Created attachment 407962 [details, diff]
mongodb swap patch

Patch to allow building mongodb-2.6.10 with boost-1.57
Comment 2 Vitaly A. Repin 2015-08-01 11:12:55 UTC
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.
Comment 3 Vitaly A. Repin 2015-08-01 11:13:27 UTC
Created attachment 408098 [details, diff]
ebuild patch. Introduces new flag "system-boost"
Comment 4 Uros 2015-08-01 14:39:57 UTC
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.
Comment 5 Vitaly A. Repin 2015-08-02 07:45:28 UTC
(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.
Comment 6 Uros 2015-08-02 15:15:00 UTC
(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.
Comment 7 Ultrabug gentoo-dev 2015-08-03 09:49:02 UTC
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.
Comment 8 Ultrabug gentoo-dev 2015-08-03 10:31:19 UTC
+  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 !
Comment 9 Yuri Arabadji 2015-08-07 13:11:31 UTC
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
Comment 10 Ultrabug gentoo-dev 2015-08-07 14:08:42 UTC
(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