[SERVER-31119] Compilation fails with boost 1.62 Created: 17/Sep/17  Updated: 30/Oct/23  Resolved: 20/Sep/17

Status: Closed
Project: Core Server
Component/s: Internal Code
Affects Version/s: 3.4.9
Fix Version/s: 3.4.11, 3.6.0-rc0

Type: Bug Priority: Minor - P4
Reporter: Jelle van der Waa Assignee: Andrew Morrow (Inactive)
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: File compilation.patch    
Issue Links:
Backports
Duplicate
is duplicated by SERVER-26756 Build fails with boost v1.62.0 Closed
Backwards Compatibility: Fully Compatible
Operating System: ALL
Backport Requested:
v3.4
Steps To Reproduce:

scons mongod --use-system-boost --use-system-pcre --use-system-snappy --use-system-zlib --disable-warnings-as-errors

Sprint: Platforms 2017-10-02
Participants:

 Description   

Compilation with Boost 1.62 fails due to this compile error:

src/mongo/db/fts/unicode/string.cpp: In static member function 'static bool mongo::unicode::String::substrMatch(const string&, const string&, mongo::unicode::String::SubstrMatchOptions, mongo::unicode::CaseFoldMode)':
src/mongo/db/fts/unicode/string.cpp:277:80: error: no match for 'operator!=' (operand types are 'std::pair<const char*, const char*>' and 'mongo::StringData::const_iterator {aka const char*}')
     return boost::algorithm::boyer_moore_search(
            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~                                
                haystack.begin(), haystack.end(), needle.begin(), needle.end()) != haystack.

See attachment for the full backtrace



 Comments   
Comment by hydrapolic [ 27/Oct/17 ]

Any chance backporting to v3.2 and v3.0?

Comment by Githook User [ 26/Oct/17 ]

Author:

{'email': 'jelle@vdwaa.nl', 'name': 'Jelle van der Waa', 'username': 'jelly'}

Message: SERVER-31119 Make string.cpp compatible with boost 1.62

Add a conditional for boost > 1.62 compatibility, boyer_moore_search
now returns an std::pair.

Signed-off-by: Andrew Morrow <acm@mongodb.com>
(cherry picked from commit 8a5656c58c18e7c23d5bec6f9b2d41013ee80a47)
Branch: v3.4
https://github.com/mongodb/mongo/commit/0bce9f5e3d8464266e644c0c2cb90bd5481a0ae8

Comment by Githook User [ 20/Sep/17 ]

Author:

{'email': 'jelle@vdwaa.nl', 'name': 'Jelle van der Waa', 'username': 'jelly'}

Message: SERVER-31119 Make string.cpp compatible with boost 1.62

Add a conditional for boost > 1.62 compatibility, boyer_moore_search
now returns an std::pair.

Signed-off-by: Andrew Morrow <acm@mongodb.com>
Branch: master
https://github.com/mongodb/mongo/commit/8a5656c58c18e7c23d5bec6f9b2d41013ee80a47

Comment by Jelle van der Waa [ 17/Sep/17 ]

A PR has been made here https://github.com/mongodb/mongo/pull/1175

Generated at Thu Feb 08 04:26:03 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.