[SERVER-30166] Use of string instead of std::string in some source files prevents compilation Created: 17/Jul/17 Updated: 30/Oct/23 Resolved: 22/Aug/17 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Build |
| Affects Version/s: | None |
| Fix Version/s: | 3.2.18, 3.4.10, 3.5.13 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Steven Green | Assignee: | Mark Benvenuto |
| Resolution: | Fixed | Votes: | 1 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||||||
| Operating System: | ALL | ||||||||||||
| Backport Requested: |
v3.4, v3.2, v3.0
|
||||||||||||
| Steps To Reproduce: | python2 buildscripts/scons.py -j4 --use-system-pcre --disable-warnings-as-errors core tools (With libpcre-8.41 installed) |
||||||||||||
| Sprint: | Platforms 2017-08-21, Platforms 2017-09-11 | ||||||||||||
| Participants: | |||||||||||||
| Description |
|
If you build with --use-system-pcre with version 8.41 of pcre MongoDB fails to build because string is undefined. Replacing string with std::string in those files allows it to build again. This is preventing it building on gentoo linux. |
| Comments |
| Comment by Githook User [ 19/Oct/17 ] |
|
Author: {'email': 'mark.benvenuto@mongodb.com', 'name': 'Mark Benvenuto', 'username': 'markbenvenuto'}Message: |
| Comment by Githook User [ 16/Oct/17 ] |
|
Author: {'email': 'steven@greenius.co.uk', 'name': 'Steven Green'}Message: Closes #1167 Signed-off-by: Mark Benvenuto <mark.benvenuto@mongodb.com> |
| Comment by Githook User [ 02/Oct/17 ] |
|
Author: {'email': 'steven@greenius.co.uk', 'name': 'Steven Green'}Message: Closes #1167 Signed-off-by: Mark Benvenuto <mark.benvenuto@mongodb.com> |
| Comment by Githook User [ 02/Oct/17 ] |
|
Author: {'email': 'steven@greenius.co.uk', 'name': 'Steven Green'}Message: Closes #1167 Signed-off-by: Mark Benvenuto <mark.benvenuto@mongodb.com> |
| Comment by Andrew Morrow (Inactive) [ 22/Sep/17 ] |
|
Hi hydrapolic - The ticket is marked for backport so unless something changes or there are problems doing so, this issue will eventually be backported to 3.4 and most likely 3.2. |
| Comment by hydrapolic [ 22/Sep/17 ] |
|
Can you please backport to 3.2/3.4? |
| Comment by Ramon Fernandez Marina [ 15/Sep/17 ] |
|
Author: {'username': u'sgolemon', 'name': u'Sara Golemon', 'email': u'sara.golemon@mongodb.com'}Message: |
| Comment by Mark Benvenuto [ 22/Aug/17 ] |
|
Backports are needed for this issue because |
| Comment by Githook User [ 22/Aug/17 ] |
|
Author: {'email': 'steven@greenius.co.uk', 'name': 'Steven Green'}Message: Closes #1167 Signed-off-by: Mark Benvenuto <mark.benvenuto@mongodb.com> |
| Comment by Steven Green [ 17/Jul/17 ] |
|
I have made two pull requests that replace string with std::string where needed so that it will compile. One against master (#1167) and the other against the 3.4 branch (#1166) Two files (src/mongo/util/net/miniwebserver.cpp and src/mongo/db/dbwebserver.cpp) I just added a using std::string near the top of the cpp file as there were already some other using std:: directives there. The other 3 files I replaced string with std::string which looks like it is the preferred style rather than adding a using directive. |
| Comment by Steven Green [ 17/Jul/17 ] |
|
This is the patch to libpcre that caused this problem to show itself... https://bugs.exim.org/show_bug.cgi?id=2084 Several using std directives (including "using std::string") were declared in global namespace in header file <pcre_stringpiece.h> which was included from <pcrecpp.h>. They have been moved into the pcrecpp namespace so as not to pollute the global namespace. |