Description of problem: Version-Release number of selected component (if applicable): How reproducible: Steps to Reproduce: 1. 2. 3. Actual results: Expected results: Additional info: 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: The error is: 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()); ^ This code is dumb, the point of make_optional(x) is to deduce the type from 'x', so saying make_optional<T>(x) to override it makes no sense, and doesn't even compile with the latest version of boost (because boost::optional now follows the same design as std::optional). The upstream bug is https://jira.mongodb.org/browse/SERVER-32516 The fix is: --- mongo-r3.6.2/src/mongo/db/repl/oplog_fetcher.cpp~ 2018-01-30 18:19:15.398613407 +0000 +++ mongo-r3.6.2/src/mongo/db/repl/oplog_fetcher.cpp 2018-01-30 18:19:43.245561408 +0000 @@ -245,7 +245,7 @@ if (!metadataResult.isOK()) { return metadataResult.getStatus(); } - oqMetadata = boost::make_optional<rpc::OplogQueryMetadata>(metadataResult.getValue()); + oqMetadata = boost::make_optional(metadataResult.getValue()); } return oqMetadata; }
Failed to scratch build: https://koji.fedoraproject.org/koji/taskinfo?taskID=24513377
Fixed upstream by: https://github.com/mongodb/mongo/commit/3c34eda8d8a38b982a1659b919e9f4b5971ba512
*** Bug 1540650 has been marked as a duplicate of this bug. ***
Thanks for reporting upstream fix for boost 1.66. Unfortunately there is another problem caused probably by gcc8 which fails mongodb builds. - https://github.com/chriskohlhoff/asio/issues/276