Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 625148 - dev-db/mongodb-3.4.4 against libpcre-8.41 - src/mongo/shell/bench.cpp:677:9: error: 'string' was not declared in this scope
Summary: dev-db/mongodb-3.4.4 against libpcre-8.41 - src/mongo/shell/bench.cpp:677:9: ...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Lujeni
URL:
Whiteboard:
Keywords: InVCS
Depends on:
Blocks:
 
Reported: 2017-07-14 21:38 UTC by Ben Kohler
Modified: 2017-09-21 19:54 UTC (History)
11 users (show)

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


Attachments
build.log (build.log,75.73 KB, text/x-log)
2017-07-14 21:38 UTC, Ben Kohler
Details
Patch to replace string with std::string (fix-strings.patch,12.70 KB, patch)
2017-07-17 13:53 UTC, Steven Green
Details | Diff
emerge-info.txt (emerge-info.txt,17.34 KB, text/plain)
2017-07-31 18:22 UTC, Toralf Förster
Details
dev-db:mongodb-3.4.6:20170731-180609.log (dev-db:mongodb-3.4.6:20170731-180609.log,59.22 KB, text/plain)
2017-07-31 18:22 UTC, Toralf Förster
Details
emerge-history.txt (emerge-history.txt,349.59 KB, text/plain)
2017-07-31 18:22 UTC, Toralf Förster
Details
environment (environment,133.73 KB, text/plain)
2017-07-31 18:22 UTC, Toralf Förster
Details
etc.portage.tbz2 (etc.portage.tbz2,28.30 KB, application/x-bzip)
2017-07-31 18:22 UTC, Toralf Förster
Details
logs.tbz2 (logs.tbz2,4.89 KB, application/x-bzip)
2017-07-31 18:22 UTC, Toralf Förster
Details
temp.tbz2 (temp.tbz2,36.11 KB, application/x-bzip)
2017-07-31 18:22 UTC, Toralf Förster
Details
String patch for mondodb 3.2.16 (string.patch,12.34 KB, patch)
2017-08-01 14:45 UTC, Ivan Iraci
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ben Kohler gentoo-dev 2017-07-14 21:38:46 UTC
Created attachment 484680 [details]
build.log

I cannot build mongo-3.4.4 anymore (but it built ok 12 days ago).  I checked my emerge history and did some testing, it seems to be the bump of libpcre-8.40 to 8.41 that is causing the breakage.

That's all the information I have at this time.

Thanks!
Comment 1 Ben Kohler gentoo-dev 2017-07-15 15:27:00 UTC
FYI I tested 3.4.6 locally and it still has the same problem
Comment 2 Michel Boaventura 2017-07-16 22:27:23 UTC
I'm having the same issue as you, and downgrading libprce from 8.41 to 8.40-r1 fixed the problem!
Comment 3 Steven Green 2017-07-17 09:24:03 UTC
I have filed a bug at https://jira.mongodb.org/browse/SERVER-30166

I have fixed it locally for the trunk branch of MongoDB, and am now just testing a patch against 3.4 which I hope to submit as a Pull Request when it is complete.
Comment 4 Johannes Hirte 2017-07-17 12:24:09 UTC
seems it happens because of this: https://bugs.exim.org/show_bug.cgi?id=2084
Comment 5 Steven Green 2017-07-17 13:53:13 UTC
Created attachment 485252 [details, diff]
Patch to replace string with std::string

Patch for mongo-3.4.4 that fixes 'string' not declared compile errors.

See https://github.com/mongodb/mongo/pull/1166

Copy this into /etc/portage/patches/dev-db/mongodb-3.4/
Comment 6 Ivan Iraci 2017-07-18 09:50:34 UTC
(In reply to Steven Green from comment #5)
> Created attachment 485252 [details, diff] [details, diff]
> Patch to replace string with std::string
> 
> Patch for mongo-3.4.4 that fixes 'string' not declared compile errors.
> 
> See https://github.com/mongodb/mongo/pull/1166
> 
> Copy this into /etc/portage/patches/dev-db/mongodb-3.4/

This patch, with some adaptations, is needed to build mongodb-3.2.13 too.
Comment 7 Tomáš Mózes 2017-07-19 11:40:51 UTC
(In reply to Steven Green from comment #5)
> Patch for mongo-3.4.4 that fixes 'string' not declared compile errors.
> 
> See https://github.com/mongodb/mongo/pull/1166

Thanks, works with mongodb 3.4.6.
Comment 8 Zac Medico gentoo-dev 2017-07-26 22:13:18 UTC
(In reply to Steven Green from comment #5)
> Created attachment 485252 [details, diff] [details, diff]
> Patch to replace string with std::string
> 
> Patch for mongo-3.4.4 that fixes 'string' not declared compile errors.
> 
> See https://github.com/mongodb/mongo/pull/1166
> 
> Copy this into /etc/portage/patches/dev-db/mongodb-3.4/

This hunk appears in the attached patch but not in the referenced pull request. Is it needed?

> diff -ur mongodb-src-r3.4.4/src/mongo/db/fts/unicode/string.cpp /home/steven/src/mongo/src/mongo/db/fts/unicode/string.cpp
> --- mongodb-src-r3.4.4/src/mongo/db/fts/unicode/string.cpp	2017-07-16 00:29:55.089130770 +0100
> +++ /home/steven/src/mongo/src/mongo/db/fts/unicode/string.cpp	2017-07-16 09:35:31.837989128 +0100
> @@ -274,7 +274,7 @@
>  
>      // Case sensitive and diacritic sensitive.
>      return boost::algorithm::boyer_moore_search(
> -               haystack.begin(), haystack.end(), needle.begin(), needle.end()) != std::make_pair(haystack.end(), haystack.end());
> +               haystack.begin(), haystack.end(), needle.begin(), needle.end()) != haystack.end();
>  }
>  
>  }  // namespace unicode
Comment 9 Zac Medico gentoo-dev 2017-07-26 22:53:43 UTC
(In reply to Zac Medico from comment #8)
I see that stray hunk was a revert of this patch:

https://gitweb.gentoo.org/repo/gentoo.git/tree/dev-db/mongodb/files/mongodb-3.2.10-boost-1.62.patch

I've pushed the fix:

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b1c029b6c31036b2b0e360052092b2a6e5464118
Comment 10 Toralf Förster gentoo-dev 2017-07-31 18:22:15 UTC
got at the unstable amd64 chroot image 13.0-desktop-gnome_20170723-192245 this : dev-db/mongodb-3.4.6 : src/.../bench.cpp:677:9: error:  string  was not declared in this scope
Comment 11 Toralf Förster gentoo-dev 2017-07-31 18:22:19 UTC
Created attachment 487484 [details]
emerge-info.txt
Comment 12 Toralf Förster gentoo-dev 2017-07-31 18:22:22 UTC
Created attachment 487486 [details]
dev-db:mongodb-3.4.6:20170731-180609.log
Comment 13 Toralf Förster gentoo-dev 2017-07-31 18:22:25 UTC
Created attachment 487488 [details]
emerge-history.txt
Comment 14 Toralf Förster gentoo-dev 2017-07-31 18:22:28 UTC
Created attachment 487490 [details]
environment
Comment 15 Toralf Förster gentoo-dev 2017-07-31 18:22:32 UTC
Created attachment 487492 [details]
etc.portage.tbz2
Comment 16 Toralf Förster gentoo-dev 2017-07-31 18:22:35 UTC
Created attachment 487494 [details]
logs.tbz2
Comment 17 Toralf Förster gentoo-dev 2017-07-31 18:22:39 UTC
Created attachment 487496 [details]
temp.tbz2
Comment 18 Zac Medico gentoo-dev 2017-07-31 19:03:14 UTC
Added patch to the 3.4.6 ebuild:

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=983dcf2c15e29df5bdde9836b26a384eef1f099f
Comment 19 Ivan Iraci 2017-08-01 14:45:46 UTC
Created attachment 487544 [details, diff]
String patch for mondodb 3.2.16

This patch is needed in order to build mongodb 3.2.16, for the same reasons as for mongodb 3.4.
Comment 20 Tomáš Mózes 2017-08-25 11:27:43 UTC
https://github.com/gentoo/gentoo/pull/5527
Comment 21 Patrice Clement gentoo-dev 2017-09-21 19:54:05 UTC
commit 4fb6b5123a834fbb1d1726aaeebee2ec3ad79fa4 (HEAD -> master, origin/master, origin/HEAD)
Author:     Tomas Mozes <hydrapolic@gmail.com>
AuthorDate: Tue Sep 5 18:09:31 2017 +0200
Commit:     Patrice Clement <monsieurp@gentoo.org>
CommitDate: Thu Sep 21 21:50:01 2017 +0200

dev-db/mongodb: fix building with newer libpcre/glibc.

Gentoo-Bug: https://bugs.gentoo.org/580768
Gentoo-Bug: https://bugs.gentoo.org/625148
Gentoo-Bug: https://bugs.gentoo.org/626342

Package-Manager: Portage-2.3.8, Repoman-2.3.2

...6-Replace-string-with-explicit-std-string.patch | 283 +++++++++++++++++++++
dev-db/mongodb/mongodb-3.2.16.ebuild               |  23 +-
2 files changed, 294 insertions(+), 12 deletions(-)
create mode 100644 dev-db/mongodb/files/mongodb-3.2.16-Replace-string-with-explicit-std-string.patch