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

3.0 server does not build

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • Labels:
      None
    • ALL

      When I run `scons` to build 3.0.15 I receive the following error:

      In file included from src/third_party/boost/boost/mpl/aux_/na_assert.hpp:23,
                       from src/third_party/boost/boost/mpl/arg.hpp:25,
                       from src/third_party/boost/boost/mpl/placeholders.hpp:24,
                       from src/third_party/boost/boost/iterator/iterator_categories.hpp:17,
                       from src/third_party/boost/boost/iterator/detail/facade_iterator_category.hpp:7,
                       from src/third_party/boost/boost/iterator/iterator_facade.hpp:14,
                       from src/third_party/boost/boost/filesystem/v3/path.hpp:28,
                       from src/third_party/boost/boost/filesystem/path.hpp:31,
                       from src/mongo/db/storage/mmap_v1/mmap_v1_engine.cpp:35:
      src/third_party/boost/boost/mpl/assert.hpp:154:21: warning: unnecessary parentheses in declaration of 'assert_arg' [-Wparentheses]
        154 | failed ************ (Pred::************
            |                     ^
      src/third_party/boost/boost/mpl/assert.hpp:159:21: warning: unnecessary parentheses in declaration of 'assert_not_arg' [-Wparentheses]
        159 | failed ************ (boost::mpl::not_<Pred>::************
            |                     ^
      In file included from src/third_party/boost/boost/filesystem/path.hpp:31,
                       from src/mongo/db/storage/mmap_v1/mmap_v1_engine.cpp:35:
      src/third_party/boost/boost/filesystem/v3/path.hpp: In member function 'boost::filesystem3::path& boost::filesystem3::path::append(const Source&, const codecvt_type&)':
      src/third_party/boost/boost/filesystem/v3/path.hpp:677:5: warning: this 'if' clause does not guard... [-Wmisleading-indentation]
        677 |     if (path_traits::empty(source))
            |     ^~
      src/third_party/boost/boost/filesystem/v3/path.hpp:679:7: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'if'
        679 |       string_type::size_type sep_pos(m_append_separator_if_needed());
            |       ^~~~~~~~~~~
      src/mongo/db/storage/mmap_v1/mmap_v1_engine.cpp: In function 'void mongo::{anonymous}::checkReadAhead(const string&)':
      src/mongo/db/storage/mmap_v1/mmap_v1_engine.cpp:168:61: error: 'major' was not declared in this scope
        168 |         string path = str::stream() << "/sys/dev/block/" << major(dev) << ':' << minor(dev)
            |                                                             ^~~~~
      src/mongo/db/storage/mmap_v1/mmap_v1_engine.cpp:168:82: error: 'minor' was not declared in this scope
        168 |         string path = str::stream() << "/sys/dev/block/" << major(dev) << ':' << minor(dev)
            |                                                                                  ^~~~~
      g++ -o build/linux2/normal/mongo/db/storage/mmap_v1/mmap_v1_init.o -c -Wnon-virtual-dtor -Woverloaded-virtual -std=c++11 -fno-omit-frame-pointer -fPIC -fno-strict-aliasing -ggdb -pthread -Wall -Wsign-compare -Wno-unknown-pragmas -Winvalid-pch -pipe -O3 -Wno-unused-local-typedefs -Wno-unused-function -Wno-deprecated-declarations -Wno-unused-const-variable -Wno-unused-but-set-variable -Wno-missing-braces -fno-builtin-memcmp -DBOOST_ALL_NO_LIB -D_SCONS -DMONGO_EXPOSE_MACROS -DPCRE_STATIC -DSUPPORT_UTF8 -DMONGO_OPTIMIZED_BUILD -DMONGO_BYTE_ORDER=1234 -D_FILE_OFFSET_BITS=64 -DMONGO_HAVE___THREAD -DMONGO_HAVE_CXX11_ATOMICS -DMONGO_HAVE_STD_IS_TRIVIALLY_COPYABLE -DBOOST_SYSTEM_NO_DEPRECATED -DMONGO_HAVE_HEADER_UNISTD_H -DMONGO_HAVE_POSIX_MONOTONIC_CLOCK -DMONGO_HAVE_EXECINFO_BACKTRACE -DMONGO_ENTERPRISE_VERSION=1 -DNETSNMP_NO_INLINE -Isrc/third_party/s2 -Isrc/third_party/pcre-8.39 -Isrc/third_party/boost -Ibuild/linux2/normal -Isrc src/mongo/db/storage/mmap_v1/mmap_v1_init.cpp
      scons: *** [build/linux2/normal/mongo/db/storage/mmap_v1/mmap_v1_engine.o] Error 1
      scons: building terminated because of errors.
      

      gcc 9:

      serene% gcc -v                                            
      Using built-in specs.
      COLLECT_GCC=gcc
      COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/9/lto-wrapper
      OFFLOAD_TARGET_NAMES=nvptx-none:hsa
      OFFLOAD_TARGET_DEFAULT=1
      Target: x86_64-linux-gnu
      Configured with: ../src/configure -v --with-pkgversion='Debian 9.3.0-14' --with-bugurl=file:///usr/share/doc/gcc-9/README.Bugs --enable-languages=c,ada,c++,go,brig,d,fortran,objc,obj-c++,gm2 --prefix=/usr --with-gcc-major-version-only --program-suffix=-9 --program-prefix=x86_64-linux-gnu- --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --enable-bootstrap --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-plugin --enable-default-pie --with-system-zlib --with-target-system-zlib=auto --enable-objc-gc=auto --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-offload-targets=nvptx-none=/build/gcc-9-aHzuVo/gcc-9-9.3.0/debian/tmp-nvptx/usr,hsa --without-cuda-driver --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu --with-build-config=bootstrap-lto-lean --enable-link-mutex
      Thread model: posix
      gcc version 9.3.0 (Debian 9.3.0-14) 
      

            Assignee:
            jonathan.streets@mongodb.com Jonathan Streets (Inactive)
            Reporter:
            oleg.pudeyev@mongodb.com Oleg Pudeyev (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: