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

mongos compile with dynamic linking fails due to "undefined reference"

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 4.1.4
    • Affects Version/s: None
    • Component/s: Security, Sharding
    • None
    • Fully Compatible
    • ALL
    • Platforms 2018-09-24

      Linking `mongos` in dynamic mode without enterprise module failed due to undefined reference to 'mongo::audit::logShutdown(mongo::Client*)'. The failure started on 2ea069aa50 of SERVER-5261.

      syzhou@siyuan-ws in ~/10gen/mongo on branch (7087350...)
      $ git co 2ea069aa505c750cad6a7ba6ae6d4ac897f396d1
      Previous HEAD position was 7087350... SERVER-37071 Blacklist set7.js and max_doc_size.js from retryable_writes_jscore_stepdown_passthrough
      HEAD is now at 2ea069a... SERVER-5261 Include authentication information in currentOp output
      _______________________________________________________________________________________________________________________
      syzhou@siyuan-ws in ~/10gen/mongo on branch (2ea069a...)
      $ echo $SCONSFLAGS
      -j24 --dbg=on CC=/opt/mongodbtoolchain/v2/bin/gcc CXX=/opt/mongodbtoolchain/v2/bin/g++
      _______________________________________________________________________________________________________________________
      syzhou@siyuan-ws in ~/10gen/mongo on branch (2ea069a...)
      $ rm -rf ./build
      _______________________________________________________________________________________________________________________
      syzhou@siyuan-ws in ~/10gen/mongo on branch (2ea069a...)
      $ scons --link-model=dynamic --allocator=system  mongos
      scons: Reading SConscript files ...
      Using SCONSFLAGS environment variable arguments: -j24 --dbg=on CC=/opt/mongodbtoolchain/v2/bin/gcc CXX=/opt/mongodbtoolchain/v2/bin/g++
      
      ...
      
      Linking build/debug/mongo/mongos
      src/mongo/s/server.cpp:257: error: undefined reference to 'mongo::audit::logShutdown(mongo::Client*)'
      collect2: error: ld returned 1 exit status
      scons: *** [build/debug/mongo/mongos] Error 1
      scons: building terminated because of errors.
      build/debug/mongo/mongos failed: Error 1
      >>> elapsed time 265s
      _______________________________________________________________________________________________________________________
      syzhou@siyuan-ws in ~/10gen/mongo on branch (2ea069a...)
      $ git co HEAD~1
      Previous HEAD position was 2ea069a... SERVER-5261 Include authentication information in currentOp output
      HEAD is now at 7087350... SERVER-37071 Blacklist set7.js and max_doc_size.js from retryable_writes_jscore_stepdown_passthrough
      _______________________________________________________________________________________________________________________
      syzhou@siyuan-ws in ~/10gen/mongo on branch (7087350...)
      $ scons --link-model=dynamic --allocator=system  mongos
      scons: Reading SConscript files ...
      Using SCONSFLAGS environment variable arguments: -j24 --dbg=on CC=/opt/mongodbtoolchain/v2/bin/gcc CXX=/opt/mongodbtoolchain/v2/bin/g++
      ...
      Linking build/debug/mongo/mongos
      Install file: "build/debug/mongo/mongos" as "mongos"
      scons: done building targets.
      >>> elapsed time 135s
      _______________________________________________________________________________________________________________________
      

            Assignee:
            jonathan.reams@mongodb.com Jonathan Reams
            Reporter:
            siyuan.zhou@mongodb.com Siyuan Zhou
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: