Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-82285

Compilation error in asio code, when compiling with clang

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • Build
    • Fully Compatible
    • ALL
    • Hide

      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
      Show
      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

      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
      

            Assignee:
            steve.gross@mongodb.com Steve Gross (Inactive)
            Reporter:
            mateusz.kuzmik1@gmail.com Mateusz Kuźmik
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: