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

Core Compile Fails Against Boost v1.61.0

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Major - P3 Major - P3
    • None
    • 3.2.7
    • Build
    • None
    • Void Linux
    • ALL
    • Hide

      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

      Show
      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

    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.

      Attachments

        Activity

          People

            Unassigned Unassigned
            antonio-malcolm Antonio Malcolm
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: