[SERVER-14605] Order of libraries passed to linker is non-deterministic, causing extraneous rebuilds Created: 17/Jul/14  Updated: 05/Apr/17  Resolved: 01/Feb/17

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

Type: Bug Priority: Major - P3
Reporter: Spencer Brody (Inactive) Assignee: Gabriel Russell (Inactive)
Resolution: Done Votes: 0
Labels: build-planning
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: Text File buildOutput.1.txt     Text File buildOutput.2.txt    
Issue Links:
Duplicate
is duplicated by SERVER-8981 LIBDEPS library ordering instability ... Closed
Related
is related to SERVER-17785 Scope application of link groups to a... Closed
Backwards Compatibility: Fully Compatible
Operating System: ALL
Sprint: Platforms 2017-01-23, Platforms 2017-02-13
Participants:

 Description   

Running "scons mongod" twice in a row could result in actually re-linking mongod the second time, even though it should be a no-op. This is because the ordering of the libraries passed to the link step can change, causing scons to think something is different and a rebuild is necessary.



 Comments   
Comment by Githook User [ 01/Feb/17 ]

Author:

{u'username': u'gabrielrussell', u'name': u'Gabriel Russell', u'email': u'gabriel.russell@mongodb.com'}

Message: SERVER-14605 Make SYSLIBDEPS dependency order stable across SCons invocations
Branch: master
https://github.com/mongodb/mongo/commit/29ee4e817e4d8131892a22b7de62d64e08034ca6

Comment by Jonathan Reams [ 28/Jul/14 ]

I can take this, but I don't know where to slot this in over the next iteration.

Comment by Andrew Morrow (Inactive) [ 28/Jul/14 ]

I am going to un-assign this from me, as I don't really have bandwidth to work on it right now, and there isn't any particular reason it needs to be me working on it. Perhaps jonathan.reams@10gen.com could take a look?

Comment by Andy Schwerin [ 18/Jul/14 ]

The new problem is that syslibdeps cannot be sorted, because order matters for them, in a specific way. The syslibdeps for any given Library need to stay in original order. What we can do is sort all LIBDEPS, and then enumerate the syslibdeps for each libdep in that order.

Comment by Eric Milkie [ 17/Jul/14 ]

I feel like this was a problem before (back in 2011) and we made a change to libdeps to fix it. Maybe it's returned?

Comment by Spencer Brody (Inactive) [ 17/Jul/14 ]

Attaching the output of "scons mongod" from two consecutive runs, both of which were actually no-op builds, but both of which did actual work.

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