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

Build errors on macOS Sonoma 14.5 / Apple clang version 15.0.0 (clang-1500.3.9.4)

    • Type: Icon: Bug Bug
    • Resolution: Duplicate
    • Priority: Icon: Minor - P4 Minor - P4
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • Build
    • ALL
    • Hide

      $ g++ --version
      Apple clang version 15.0.0 (clang-1500.3.9.4)
      Target: arm64-apple-darwin23.5.0
      Thread model: posix
      InstalledDir: /Library/Developer/CommandLineTools/usr/bin

      $ python3 buildscripts/scons.py install-mongod --disable-warnings-as-errors=configure --disable-warnings-as-errors=source

      Show
      $ g++ --version Apple clang version 15.0.0 (clang-1500.3.9.4) Target: arm64-apple-darwin23.5.0 Thread model: posix InstalledDir: /Library/Developer/CommandLineTools/usr/bin $ python3 buildscripts/scons.py install-mongod --disable-warnings-as-errors=configure --disable-warnings-as-errors=source
    • Build OnDeck

      I have prepared a PR with some fixes, but this should be reviewed by a C++ expert as there are hardcoded resolutions that shouldn't go into the final code: https://github.com/mongodb/mongo/pull/1598

      Fix --disable-warnings-as-errors flag invocation

      Needs to be:

      $ python3 buildscripts/scons.py install-mongod --disable-warnings-as-errors=configure --disable-warnings-as-errors=source

      in documentation.

      Build error 1

       

      In file included from src/third_party/boost/boost/functional/hash.hpp:6:
      src/third_party/boost/boost/container_hash/hash.hpp:132:33: error: no template named 'unary_function' in namespace 'std'; did you mean '__unary_function'?
              struct hash_base : std::unary_function<T, std::size_t> {};
                                 ~~~~~^~~~~~~~~~~~~~
                                      __unary_function
      /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/__functional/unary_function.h:46:1: note: '__unary_function' declared here
      using __unary_function = __unary_function_keep_layout_base<_Arg, _Result>;
      ^
      1 error generated.
       

       

      Build error 2

      In file included from src/third_party/boost/boost/mpl/integral_c.hpp:32:
      src/third_party/boost/boost/mpl/aux_/integral_wrapper.hpp:73:31: error: integer value -1 is outside the valid range of values [0, 3] for this enumeration type [-Wenum-constexpr-conversion]
          typedef AUX_WRAPPER_INST( BOOST_MPL_AUX_STATIC_CAST(AUX_WRAPPER_VALUE_TYPE, (value - 1)) ) prior;
                                    ^
      src/third_party/boost/boost/mpl/aux_/static_cast.hpp:24:47: note: expanded from macro 'BOOST_MPL_AUX_STATIC_CAST'
      #   define BOOST_MPL_AUX_STATIC_CAST(T, expr) static_cast<T>(expr)
                                                    ^ 

      Build error 3

       

      In file included from src/third_party/asio-master/asio/include/asio/use_future.hpp:155:
      src/third_party/asio-master/asio/include/asio/impl/use_future.hpp:804:18: error: no template named 'result_of'; did you mean 'boost::result_of'?
              typename result_of<Function(Args...)>::type>(h)
                       ^~~~~~~~~
                       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;
                                  ^ 

      Build error 4

       

       

      In file included from src/third_party/asio-master/asio/include/asio.hpp:34:
      src/third_party/asio-master/asio/include/asio/bind_executor.hpp:205:43: error: no template named 'result_of'
        typename executor_binder_check<typename result_of<T()>::type>::type>
                                                ^
      src/third_party/asio-master/asio/include/asio/bind_executor.hpp:410:19: error: no type named 'result_of' in namespace 'boost'
        typename boost::result_of<T(Args...)>::type operator()(
        ~~~~~~~~~~~~~~~~^~~~~~~~~
      src/third_party/asio-master/asio/include/asio/bind_executor.hpp:410:28: error: expected member name or ';' after declaration specifiers
        typename boost::result_of<T(Args...)>::type operator()(
        ~~~~~~~~~~~~~~~~~~~~~~~~~^
      src/third_party/asio-master/asio/include/asio/bind_executor.hpp:301:7: error: member initializer 'base_type' does not name a non-static data member or base class
          : base_type(e, ASIO_MOVE_CAST(U)(u))
            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      src/third_party/asio-master/asio/include/asio/bind_executor.hpp:307:7: error: member initializer 'base_type' does not name a non-static data member or base class
          : base_type(other.get_executor(), other.get())
            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      src/third_party/asio-master/asio/include/asio/bind_executor.hpp:314:7: error: member initializer 'base_type' does not name a non-static data member or base class
          : base_type(e, other.get())
            ^~~~~~~~~~~~~~~~~~~~~~~~~
      src/third_party/asio-master/asio/include/asio/bind_executor.hpp:326:7: error: member initializer 'base_type' does not name a non-static data member or base class
          : base_type(other.get_executor(), other.get())
            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      src/third_party/asio-master/asio/include/asio/bind_executor.hpp:339:7: error: member initializer 'base_type' does not name a non-static data member or base class
          : base_type(e, other.get())
            ^~~~~~~~~~~~~~~~~~~~~~~~~
      src/third_party/asio-master/asio/include/asio/bind_executor.hpp:347:7: error: member initializer 'base_type' does not name a non-static data member or base class
          : base_type(ASIO_MOVE_CAST(executor_type)(other.get_executor()),
            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      src/third_party/asio-master/asio/include/asio/bind_executor.hpp:355:7: error: member initializer 'base_type' does not name a non-static data member or base class
          : base_type(e, ASIO_MOVE_CAST(T)(other.get()))
            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      src/third_party/asio-master/asio/include/asio/bind_executor.hpp:362:7: error: member initializer 'base_type' does not name a non-static data member or base class
          : base_type(ASIO_MOVE_CAST(OtherExecutor)(other.get_executor()),
            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      src/third_party/asio-master/asio/include/asio/bind_executor.hpp:372:7: error: member initializer 'base_type' does not name a non-static data member or base class
          : base_type(e, ASIO_MOVE_CAST(U)(other.get()))
            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 

       

       

            Assignee:
            alex.neben@mongodb.com Alex Neben
            Reporter:
            daniel.lorch@mongodb.com Daniel Lorch
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: