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

Compilation error regarding IndexBuildBlock undefined on my Ubuntu 19 machine's local compile

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 4.3.1
    • Affects Version/s: None
    • Component/s: None
    • Labels:
      None
    • Fully Compatible
    • ALL
    • Execution Team 2019-09-23

      Compilation invocation:

      scons_args = "CC=/opt/mongodbtoolchain/v3/bin/clang" "CXX=/opt/mongodbtoolchain/v3/bin/clang++" $
          "-j32" "--opt=off" "--dbg=on" "--link-model=dynamic" "--allocator=system" "--ssl=on" $
          "--icecream" "VARIANT_DIR=ninja"
      

      Compilation error:

      [4859/4973 ( 97%) 64.308s]DYNLIB build/ninja/mongo/db/catalog/libindex_builds_manager.so
      FAILED: build/ninja/mongo/db/catalog/libindex_builds_manager.so
      /bin/icerun /opt/mongodbtoolchain/v3/bin/clang++ @build/ninja/mongo/db/catalog/libindex_builds_manager.so.rsp
      /opt/mongodbtoolchain/revisions/96e2650c61290915d321ca0e2fb6b2bcd68a0cfc/stow/gcc-v3.UUf/lib/gcc/x86_64-mongodb-linux/8.2.0/../../../../include/c++/8.2.0/bits/unique_ptr.h:137: error: undefined reference to 'mongo::IndexBuildBlock::~IndexBuildBlock()'
      clang-7: error: linker command failed with exit code 1 (use -v to see invocation)
      [4865/4973 ( 97%) 64.495s]DYNLIB build/ninja/mongo/db/libcloner.so
      FAILED: build/ninja/mongo/db/libcloner.so
      /bin/icerun /opt/mongodbtoolchain/v3/bin/clang++ @build/ninja/mongo/db/libcloner.so.rsp
      /opt/mongodbtoolchain/revisions/96e2650c61290915d321ca0e2fb6b2bcd68a0cfc/stow/gcc-v3.UUf/lib/gcc/x86_64-mongodb-linux/8.2.0/../../../../include/c++/8.2.0/bits/unique_ptr.h:137: error: undefined reference to 'mongo::IndexBuildBlock::~IndexBuildBlock()'
      clang-7: error: linker command failed with exit code 1 (use -v to see invocation)
      [4866/4973 ( 97%) 64.627s]DYNLIB build/ninja/mongo/db/s/libsharding_catalog_manager.so
      ninja: build stopped: subcommand failed.
      

      Compilation fix here:

      diff --git a/src/mongo/db/catalog/SConscript b/src/mongo/db/catalog/SConscript
      index f1d8de9ee2..e0edff18a2 100644
      --- a/src/mongo/db/catalog/SConscript
      +++ b/src/mongo/db/catalog/SConscript
      @@ -226,6 +226,7 @@ env.Library(
           ],
           LIBDEPS=[
               'collection',
      +        'index_build_block',
               'index_timestamp_helper',
               '$BUILD_DIR/mongo/base',
               '$BUILD_DIR/mongo/db/audit',
      @@ -239,7 +240,6 @@ env.Library(
               '$BUILD_DIR/mongo/util/progress_meter',
           ],
           LIBDEPS_PRIVATE=[
      -        'index_build_block',
               '$BUILD_DIR/mongo/db/index/index_build_interceptor',
               '$BUILD_DIR/mongo/db/storage/storage_options',
               '$BUILD_DIR/mongo/idl/server_parameter',
      

      Is there something I'm doing wrong? The evergreen waterfall seems just fine... IndexBuildBlock is used internally to multi_index_block only, so exposing it higher makes no sense. I cleared my build directory.

            Assignee:
            dianna.hohensee@mongodb.com Dianna Hohensee (Inactive)
            Reporter:
            dianna.hohensee@mongodb.com Dianna Hohensee (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: