[SERVER-37195] mongos compile with dynamic linking fails due to "undefined reference" Created: 18/Sep/18  Updated: 29/Oct/23  Resolved: 21/Sep/18

Status: Closed
Project: Core Server
Component/s: Security, Sharding
Affects Version/s: None
Fix Version/s: 4.1.4

Type: Bug Priority: Major - P3
Reporter: Siyuan Zhou Assignee: Jonathan Reams
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
is depended on by SERVER-37170 mongos fails to start with error 'Dup... Closed
Problem/Incident
is caused by SERVER-5261 Include authentication information in... Closed
Backwards Compatibility: Fully Compatible
Operating System: ALL
Sprint: Platforms 2018-09-24
Participants:

 Description   

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
_______________________________________________________________________________________________________________________



 Comments   
Comment by Githook User [ 21/Sep/18 ]

Author:

{'name': 'Jonathan Reams', 'email': 'jbreams@mongodb.com', 'username': 'jbreams'}

Message: SERVER-37195 Add missing audit edges to mongos
Branch: master
https://github.com/mongodb/mongo/commit/9fe8c0a50426b073eba548dca811114c214f046f

Comment by Jonathan Reams [ 19/Sep/18 ]

This is fallout from SERVER-5261. I'm going to add the missing edge back in, but I'm curious why none of the dynamic builders caught this.

cc acm

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