[SERVER-8981] LIBDEPS library ordering instability can drive spurious rebuilds of mongod and mongos Created: 14/Mar/13  Updated: 10/Dec/14  Resolved: 06/Aug/14

Status: Closed
Project: Core Server
Component/s: Build
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Minor - P4
Reporter: Andrew Morrow (Inactive) Assignee: Jonathan Reams
Resolution: Duplicate Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Duplicate
duplicates SERVER-14605 Order of libraries passed to linker i... Closed
Operating System: ALL
Steps To Reproduce:

With a clean 'build' directory, and with the enterprise repo enabled, build mongod (don't use --mute):

> scons ./mongod

At the end, have a look at the libraries on the link line:
-ldl -lgsasl -lnetsnmpagent -lnetsnmpmibs -lnetsnmp -lgsasl -lssl -lcrypto

Rebuild the target. This should be a no-op, but if you do it enough times, it will get rebuilt. Note the libraries on the link line:

-lnetsnmpagent -lnetsnmpmibs -lnetsnmp -lgsasl -ldl -lgsasl -lssl -lcrypto

They are different, forcing a rebuild

Participants:

 Description   

The mongod and mongos targets are occasionally rebuilt even when no changes have been made, because the ordering of libraries on the link line is not consistent. SCons sees the library ordering difference as requiring a rebuild.



 Comments   
Comment by Jonathan Reams [ 06/Aug/14 ]

Duplicated by SERVER-14605

Comment by Eric Milkie [ 14/Mar/13 ]

I thought we already fixed this? It was a big problem before but Andy added a sort in there somewhere and it got a lot better after that.

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