[SERVER-37642] Build failures with clang 7 Created: 15/Oct/18  Updated: 27/Oct/23  Resolved: 19/Oct/18

Status: Closed
Project: Core Server
Component/s: Build
Affects Version/s: 4.0.3
Fix Version/s: None

Type: Bug Priority: Major - P3
Reporter: Ryan Schmidt Assignee: Andrew Morrow (Inactive)
Resolution: Works as Designed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: Text File main.log    
Operating System: ALL
Steps To Reproduce:

Build mongodb 4.0.3 with clang 7.0.0.

Sprint: Dev Tools 2018-10-22
Participants:

 Description   

On a whim, I tried building mongodb 4.0.3 with clang 7.0.0 (as installed by the MacPorts clang-7.0 port) on macOS High Sierra. It failed with numerous error messages, including:

error: "<experimental/string_view> has been removed. Use <string_view> instead."
error: no member named 'experimental' in namespace 'std'
error: no template named 'basic_string_view'; did you mean 'std::basic_string_view'?
error: unknown type name 'string_view'; did you mean 'std::string_view'?
fatal error: too many errors emitted, stopping now [-ferror-limit=]

I'll attach the full log.



 Comments   
Comment by Andrew Morrow (Inactive) [ 19/Oct/18 ]

Thanks. Hopefully master is cleaned up soon and then MongoDB 4.2 will work with clang7 out of the box. I'm going to close this out as "works as designed", but feel free to reach out on this ticket if there is anything additional I can help with.

Comment by Ryan Schmidt [ 18/Oct/18 ]

Yes, clang 5.0 for example works fine. It's not a problem for me right now, I just wanted to let you know.

Comment by Andrew Morrow (Inactive) [ 16/Oct/18 ]

ryandesign - I'm not too surprised. We are just about to work on upgrading our toolchains so this will get fixed on master. Is this a problem for macports or can you ask it to use an earlier LLVM in the MongoDB build? You are in a bit of a bind here, because ASIO is seeing that it doesn't have C++17 (true on v4.0 branch, soon to be false on master), but decides to fall back to <experimental/string_view, which LLVM 7 rejects unconditionally. Looking quickly through the ASIO detail/config.hpp header, I think you might be able to work around this by saying CPPDEFINES=ASIO_DISABLE_STRING_VIEW on your SCons invocation. I'm not sure what the implications are, either for correctness or performance, but you could try it and report back.

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