[SERVER-73720] pre-existing libraries in the VARIANT_DIR cause resmoke.py to always reinstall Created: 07/Feb/23  Updated: 27/Oct/23  Resolved: 27/Oct/23

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

Type: Bug Priority: Major - P3
Reporter: Daniel Moody Assignee: [DO NOT ASSIGN] Backlog - Server Development Platform Team (SDP) (Inactive)
Resolution: Won't Do Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Assigned Teams:
Server Development Platform
Operating System: ALL
Participants:

 Description   

There is a case where have pre-existing libraries built will cause resmoke.py to always be reinstalled when building with ninja. Asking ninja why shows something similar to:
ninja explain: output build/install/lib/libunwind.so older than most recent input build/install/bin/resmoke.py (1675783193520950656 vs 1675783458030914200)
 
The libraries in the install dir depend on resmoke.py for an installation to have its own resmoke.py to test with. But in this case you have a library which already exists in your build dir. The library in your build dir does not depend on resmoke.py but the one in the install does. Resmoke.py was generated in the build dir with a newer mtime, and because ninja uses mtime this will always be dirty. Possibly we could force a dependency at the build dir level (as opposed to install) but this is not an accurate dependency as building the library doesn't have a dependency on resmoke, only the installation does.
 
At the root of this problem is a discrepancy with the assumptions AIB (auto install binaries AKA hygenic builds) tool was designed with (scons does hash checks as opposed to ninja with mtime checks).

 

Workaround

Remove the build directory and rebuild.


Generated at Thu Feb 08 06:25:26 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.