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

Fails to compile with Boost 1.66

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 3.6.3, 3.7.2
    • Affects Version/s: 3.6.1
    • Component/s: Build
    • None
    • Fully Compatible
    • ALL
    • v3.6
    • Hide

      Compile with: scons core tools --use-system-pcre --use-system-snappy --use-system-yaml --use-system-zlib --use-system-wiredtiger --use-sasl-client --ssl --disable-warnings-as-errors --use-system-boost
      With Boost 1.66 installed.

      Show
      Compile with: scons core tools --use-system-pcre --use-system-snappy --use-system-yaml --use-system-zlib --use-system-wiredtiger --use-sasl-client --ssl --disable-warnings-as-errors --use-system-boost With Boost 1.66 installed.
    • Repl 2018-02-12

      Mongo fails to compile with Boost 1.66:

      src/mongo/db/repl/oplog_fetcher.cpp: In function 'mongo::StatusWith<boost::optional<mongo::rpc::OplogQueryMetadata> > mongo::repl::{anonymous}::parseOplogQueryMetadata(mongo::Fetcher::QueryResponse)':
      src/mongo/db/repl/oplog_fetcher.cpp:248:93: error: no matching function for call to 'make_optional<mongo::rpc::OplogQueryMetadata>(mongo::rpc::OplogQueryMetadata&)'
               oqMetadata = boost::make_optional<rpc::OplogQueryMetadata>(metadataResult.getValue());
                                                                                                   ^
      In file included from /usr/include/boost/optional.hpp:15:0,
                       from src/mongo/base/status_with.h:30,
                       from src/mongo/db/repl/oplog_fetcher.h:34,
                       from src/mongo/db/repl/oplog_fetcher.cpp:33:
      /usr/include/boost/optional/optional.hpp:1367:56: note: candidate: template<class T> boost::optional<typename boost::decay<T>::type> boost::make_optional(T&&)
       optional<BOOST_DEDUCED_TYPENAME boost::decay<T>::type> make_optional ( T && v  )
                                                              ^~~~~~~~~~~~~
      /usr/include/boost/optional/optional.hpp:1367:56: note:   template argument deduction/substitution failed:
      src/mongo/db/repl/oplog_fetcher.cpp:248:91: note:   cannot convert 'metadataResult.mongo::StatusWith<mongo::rpc::OplogQueryMetadata>::getValue()' (type 'mongo::rpc::OplogQueryMetadata') to type 'mongo::rpc::OplogQueryMetadata&&'
               oqMetadata = boost::make_optional<rpc::OplogQueryMetadata>(metadataResult.getValue());
                                                                          ~~~~~~~~~~~~~~~~~~~~~~~^~
      In file included from /usr/include/boost/optional.hpp:15:0,
                       from src/mongo/base/status_with.h:30,
                       from src/mongo/db/repl/oplog_fetcher.h:34,
                       from src/mongo/db/repl/oplog_fetcher.cpp:33:
      /usr/include/boost/optional/optional.hpp:1375:56: note: candidate: template<class T> boost::optional<typename boost::decay<T>::type> boost::make_optional(bool, T&&)
       optional<BOOST_DEDUCED_TYPENAME boost::decay<T>::type> make_optional ( bool cond, T && v )
                                                              ^~~~~~~~~~~~~
      /usr/include/boost/optional/optional.hpp:1375:56: note:   template argument deduction/substitution failed:
      src/mongo/db/repl/oplog_fetcher.cpp:248:93: note:   candidate expects 2 arguments, 1 provided
               oqMetadata = boost::make_optional<rpc::OplogQueryMetadata>(metadataResult.getValue());
                                                                                                   ^
      scons: *** [build/opt/mongo/db/repl/oplog_fetcher.o] Error 1
      scons: building terminated because of errors.
      build/opt/mongo/db/repl/oplog_fetcher.o failed: Error 1
      

            Assignee:
            judah.schvimer@mongodb.com Judah Schvimer
            Reporter:
            jelly1 Jelle van der Waa
            Votes:
            1 Vote for this issue
            Watchers:
            8 Start watching this issue

              Created:
              Updated:
              Resolved: