[SERVER-82285] Compilation error in asio code, when compiling with clang Created: 18/Oct/23  Updated: 02/Feb/24

Status: Needs Scheduling
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Major - P3
Reporter: Mateusz Kuźmik Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Assigned Teams:
Build
Operating System: ALL
Steps To Reproduce:

Clang version:

% clang -v
Apple clang version 14.0.3 (clang-1403.0.22.14.1)
Target: arm64-apple-darwin22.6.0
Thread model: posix
InstalledDir: /Applications/Xcode-14.3.1.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin

Compile mongod with command:

python3 buildscripts/scons.py install-mongod

Participants:

 Description   

When compiling mongod, I get the following error:

In file included from src/mongo/util/net/ssl_stream.cpp:37:
In file included from src/mongo/util/net/ssl/impl/src.hpp:38:
In file included from src/mongo/util/net/ssl/detail/impl/engine_apple.ipp:43:
In file included from src/mongo/util/net/ssl/detail/engine.hpp:41:
In file included from src/mongo/util/net/ssl/detail/engine_apple.hpp:35:
In file included from src/third_party/asio-master/asio/include/asio/buffer.hpp:28:
src/third_party/asio-master/asio/include/asio/detail/type_traits.hpp:61:7: error: no member named 'result_of' in namespace 'std'; did you mean 'boost::result_of'?
using std::result_of;
      ^~~~~~~~~~~~~~
      boost::result_of
src/third_party/boost/boost/utility/result_of.hpp:72:29: note: 'boost::result_of' declared here
template<typename F> struct result_of;
                            ^
Compiling build/opt/third_party/wiredtiger/src/os_common/os_fs_inmemory.o
1 error generated.
scons: *** [build/opt/mongo/util/net/ssl_stream.o] Error 1
scons: building terminated because of errors.
build/opt/mongo/util/net/ssl_stream.o failed: Error 1



 Comments   
Comment by Mateusz Kuźmik [ 23/Oct/23 ]

chris.kelly@mongodb.com Signed!

Comment by Chris Kelly [ 21/Oct/23 ]

Hi mateusz.kuzmik1@gmail.com!

Thanks for making this pull request! We just need you to sign our [Contributor's Agreement](https://www.mongodb.com/legal/contributor-agreement) as part of our considering the PR.

Comment by Mateusz Kuźmik [ 18/Oct/23 ]

A fix that worked for me: https://github.com/mongodb/mongo/pull/1576

Comment by Mateusz Kuźmik [ 18/Oct/23 ]

Similar issue was resolved in SERVER-76814, but only for libc++

Generated at Thu Feb 08 06:48:47 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.