[SERVER-24950] Core Compile Fails Against Boost v1.61.0 Created: 08/Jul/16  Updated: 07/Dec/16  Resolved: 08/Jul/16

Status: Closed
Project: Core Server
Component/s: Build
Affects Version/s: 3.2.7
Fix Version/s: None

Type: Bug Priority: Major - P3
Reporter: Antonio Malcolm Assignee: Unassigned
Resolution: Duplicate Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Void Linux


Issue Links:
Duplicate
duplicates SERVER-24208 Use boost::none instead of boost::non... Closed
Operating System: ALL
Steps To Reproduce:

scons core \
--prefix=/usr/local/srv/db/mongodb/v3.2.7 \
--use-system-boost \
--use-system-intel_decimal128 \
--use-system-pcre \
--use-system-snappy \
--use-system-yaml \
--use-system-zlib \
--use-sasl-client \
--ssl \
--nostrip \
--disable-warnings-as-errors \
--allocator=system \
--wiredtiger=on \
--use-system-wiredtiger

Participants:

 Description   

When building MongoDB core r3.2.7 against Boost v1.61.0, the build fails, with the following error:

src/mongo/db/ftdc/compressor.cpp:50:31: error: no matching function for call to 'boost::none_t::none_t()'
return

{boost::none_t()}

;
^
src/mongo/db/ftdc/compressor.cpp:50:31: note: candidates are:
In file included from /usr/local/include/boost/none.hpp:16:0,
from /usr/local/include/boost/optional/optional.hpp:47,
from /usr/local/include/boost/optional.hpp:15,
from src/mongo/db/ftdc/compressor.h:31,
from src/mongo/db/ftdc/compressor.cpp:31:
/usr/local/include/boost/none_t.hpp:32:12: note: boost::none_t::none_t(boost::none_t::init_tag)
explicit none_t(init_tag){} // to disable default constructor
^
/usr/local/include/boost/none_t.hpp:32:12: note: candidate expects 1 argument, 0 provided
/usr/local/include/boost/none_t.hpp:29:8: note: constexpr boost::none_t::none_t(const boost::none_t&)
struct none_t
^
/usr/local/include/boost/none_t.hpp:29:8: note: candidate expects 1 argument, 0 provided
/usr/local/include/boost/none_t.hpp:29:8: note: constexpr boost::none_t::none_t(boost::none_t&&)
/usr/local/include/boost/none_t.hpp:29:8: note: candidate expects 1 argument, 0 provided
src/mongo/db/ftdc/compressor.cpp:50:32: error: could not convert '

{<expression error>}' from '<brace-enclosed initializer list>' to 'mongo::StatusWith<boost::optional<std::tuple<mongo::ConstDataRange, mongo::FTDCCompressor::CompressorState, mongo::Date_t> > >'
return {boost::none_t()};
^
src/mongo/db/ftdc/compressor.cpp:110:27: error: no matching function for call to 'boost::none_t::none_t()'
return {boost::none_t()};
^
src/mongo/db/ftdc/compressor.cpp:110:27: note: candidates are:
In file included from /usr/local/include/boost/none.hpp:16:0,
from /usr/local/include/boost/optional/optional.hpp:47,
from /usr/local/include/boost/optional.hpp:15,
from src/mongo/db/ftdc/compressor.h:31,
from src/mongo/db/ftdc/compressor.cpp:31:
/usr/local/include/boost/none_t.hpp:32:12: note: boost::none_t::none_t(boost::none_t::init_tag)
explicit none_t(init_tag){} // to disable default constructor
^
/usr/local/include/boost/none_t.hpp:32:12: note: candidate expects 1 argument, 0 provided
/usr/local/include/boost/none_t.hpp:29:8: note: constexpr boost::none_t::none_t(const boost::none_t&)
struct none_t
^
/usr/local/include/boost/none_t.hpp:29:8: note: candidate expects 1 argument, 0 provided
/usr/local/include/boost/none_t.hpp:29:8: note: constexpr boost::none_t::none_t(boost::none_t&&)
/usr/local/include/boost/none_t.hpp:29:8: note: candidate expects 1 argument, 0 provided
src/mongo/db/ftdc/compressor.cpp:110:28: error: could not convert '{<expression error>}

' from '<brace-enclosed initializer list>' to 'mongo::StatusWith<boost::optional<std::tuple<mongo::ConstDataRange, mongo::FTDCCompressor::CompressorState, mongo::Date_t> > >'
return

{boost::none_t()}

;
^
src/mongo/db/ftdc/compressor.cpp:111:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^
scons: *** [build/opt/mongo/db/ftdc/compressor.o] Error 1
scons: building terminated because of errors.

I'm guessing this is due to boost::none_t() needing to be replaced with boost::none, and will attempt patching the source, to see if that works.

This also means it would break against Boost v1.60, as that version requires the same change. This means MongoDB does not built against the latest version of Boost.



 Comments   
Comment by Antonio Malcolm [ 08/Jul/16 ]

Noted. Adding a comment to that ticket.
Is there a technical reason why you wouldn't add a fix for this, considering it appears to be a small update?
The folks at MariaDB encountered a similar issue, and it was also a simple fix- one file, one occurrence, in their case.
It's three files, with four occurrences, in the case of compiling the MongoDB core (as I detailed in the other ticket).
It seems a bit odd, to refuse to support the current version of boost, or the last current version, in the current MongoDB stable, considering it's a minor, possibly even trivial, update.

Comment by Kelsey Schubert [ 08/Jul/16 ]

Hi antonio-malcolm,

Thanks for the report. Please see the discussion on SERVER-24208 regarding this issue.

Kind regards,
Thomas

Generated at Thu Feb 08 04:07:52 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.