Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 932251 - dev-db/mongodb-5.0.26 with dev-libs/boost-1.85.0: error: 'directory_iterator' is not a member of 'boost::filesystem'
Summary: dev-db/mongodb-5.0.26 with dev-libs/boost-1.85.0: error: 'directory_iterator'...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Ultrabug
URL:
Whiteboard:
Keywords: PATCH
: 932314 932800 (view as bug list)
Depends on:
Blocks: boost-1.85
  Show dependency tree
 
Reported: 2024-05-20 05:25 UTC by Michał Górny
Modified: 2024-07-15 04:22 UTC (History)
6 users (show)

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


Attachments
/var/log/portage/dev-db:mongodb-5.0.26:20240520-042754.log (dev-db:mongodb-5.0.26:20240520-042754.log,299.57 KB, text/plain)
2024-05-20 05:25 UTC, Michał Górny
Details
boost-1.85 patch (boost-1.85-fix.patch,7.20 KB, patch)
2024-05-21 20:10 UTC, Jura
Details | Diff
mongodb-4.4.29 boost-1.85 patch (mongodb-4.4.29-boost-1.85.patch,6.19 KB, patch)
2024-06-05 08:55 UTC, Gary
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2024-05-20 05:25:09 UTC
Created attachment 893464 [details]
/var/log/portage/dev-db:mongodb-5.0.26:20240520-042754.log

src/mongo/scripting/engine.cpp: In member function 'virtual bool mongo::Scope::execFile(const std::string&, bool, bool, int)':
src/mongo/scripting/engine.cpp:170:28: error: 'directory_iterator' is not a member of 'boost::filesystem'; did you mean 'directory_entr
y'?
  170 |         boost::filesystem::directory_iterator end;
      |                            ^~~~~~~~~~~~~~~~~~
      |                            directory_entry
src/mongo/scripting/engine.cpp:173:33: error: 'directory_iterator' is not a member of 'boost::filesystem'; did you mean 'directory_entr
y'?
  173 |         for (boost::filesystem::directory_iterator it(p); it != end; it++) {
      |                                 ^~~~~~~~~~~~~~~~~~
      |                                 directory_entry
Comment 2 Andreas Sturmlechner gentoo-dev 2024-05-20 17:26:20 UTC
*** Bug 932314 has been marked as a duplicate of this bug. ***
Comment 3 Jura 2024-05-21 20:10:43 UTC
Created attachment 893684 [details, diff]
boost-1.85 patch
Comment 4 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2024-05-26 15:42:11 UTC
*** Bug 932800 has been marked as a duplicate of this bug. ***
Comment 5 Larry the Git Cow gentoo-dev 2024-05-28 01:45:17 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4f2c752ff3afb0952991e09cb7fb4947b57df06f

commit 4f2c752ff3afb0952991e09cb7fb4947b57df06f
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2024-05-28 01:38:59 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2024-05-28 01:38:59 +0000

    dev-db/mongodb: fix build w/ boost-1.85
    
    Closes: https://bugs.gentoo.org/932251
    Thanks-to: Jura <me@slie.ru>
    Signed-off-by: Sam James <sam@gentoo.org>

 .../mongodb/files/mongodb-5.0.26-boost-1.85.patch  | 139 +++++++++++++++++++++
 dev-db/mongodb/mongodb-5.0.26.ebuild               |   1 +
 2 files changed, 140 insertions(+)
Comment 6 Preston Crow 2024-05-29 04:49:58 UTC
Does this also need to be applied to mongodb-4.4.29?
Some systems can't upgrade to 5.0 because that requires a newer CPU (it's incompatible with amd64 chips without avx instruction support (e.g., Haswell Celerons or pre-Haswell chips)

An alternative would be to update that ebuild to explicitly require an older boost version.
Comment 7 Gary 2024-06-05 08:55:46 UTC
Created attachment 895145 [details, diff]
mongodb-4.4.29 boost-1.85 patch

This is the patch for mongodb-4.4.29
Comment 8 François Valenduc 2024-07-13 05:46:11 UTC
This commits change 1580 files. Is it possible to get à patch for 7.0.12 from it and not for so outdated versions?
Comment 9 François Valenduc 2024-07-13 05:49:51 UTC
For information, I proposed an rebuild for 7.0.12 which also compiles with python 3.12 (see https://bugs.gentoo.org/882515). Unfortunately the patch proposed here does not apply.
Comment 10 François Valenduc 2024-07-13 16:16:40 UTC
So I took the patch found here and I adapted it to mongodb 7.0.12 (see https://bugs.gentoo.org/882515)
Can the mongodb ever be bumped to a new version ?
Comment 11 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2024-07-13 16:17:52 UTC
AFAIK bumping mongodb is a massive pain and I won't be doing it as a drive-by, I leave it to its actual maintainer.

What I can do as a drive-by is fix older mongodb for new Boost, so I'll look now.
Comment 12 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2024-07-13 16:18:44 UTC
(Not sure why you're asking about mongodb 7 here though, as the only missing fix is for *older* mongodb here, not mongodb 5 which is already patched, and if you're stuck on mongodb 4, presumably you can't even use 7 if it were in tree.)
Comment 13 François Valenduc 2024-07-13 16:24:42 UTC
I am not stuck with mongodb 4, my laptop is recent enough. Maybe I should have put my comments in the other bug report asking for the bump (#882515). The request was for version 6.0.3 when the bug was reported. Meanwhile, the latest version is 7.0.12. Using patches from archlinux user repository, it was quite easy to make an ebuild for this version. Making changes for boost 1.85.0 was a bit trickier, but I managed to do it using the patch found in this bug report.
A side benefit would be that it can then be build with python 3.12 which is now the default version in Gentoo.
Comment 14 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2024-07-13 18:05:54 UTC
Yes, best to keep commentary on the bump over there. Thanks.
Comment 15 Larry the Git Cow gentoo-dev 2024-07-15 04:22:35 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3ba9ce43db49ab50b10e0d1b1d9b2d83f7cec90e

commit 3ba9ce43db49ab50b10e0d1b1d9b2d83f7cec90e
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2024-07-15 04:09:21 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2024-07-15 04:09:21 +0000

    dev-db/mongodb: backport boost-1.85 fix to 4.4.x
    
    Thanks to Gary.
    
    Closes: https://bugs.gentoo.org/932251
    Signed-off-by: Sam James <sam@gentoo.org>

 .../mongodb/files/mongodb-4.4.29-boost-1.85.patch  | 146 +++++++++++++++++++++
 dev-db/mongodb/mongodb-4.4.29.ebuild               |   1 +
 2 files changed, 147 insertions(+)