[SERVER-13966] LIBDEPS_DEPENDENTS does not resolve library names the same as LIBDEPS Created: 16/May/14  Updated: 06/Nov/15  Resolved: 28/Jul/15

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

Type: Bug Priority: Major - P3
Reporter: Shaun Verch Assignee: Andrew Morrow (Inactive)
Resolution: Done Votes: 0
Labels: build-needs-definition
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Duplicate
is duplicated by SERVER-18368 LIBDEPS_DEPENDENTS should error for n... Closed
Backwards Compatibility: Fully Compatible
Operating System: ALL
Sprint: Platform 7 08/10/15
Participants:

 Description   

We have added an extension to scons that provides two variables, LIBDEPS and LIBDEPS_DEPENDENTS, to aid in dependency management.

Listing a library in LIBDEPS means that the current library depends on that library, while listing any target in LIBDEPS_DEPENDENTS means that the current library is depended on by that target.

Setting LIBDEPS=[ '<library name>' ] without any special pathnames, library prefixing information or special scons variables works because the LIBDEPS handling does that resolution automatically if it is not already there: https://github.com/mongodb/mongo/blob/master/site_scons/libdeps.py#L230

LIBDEPS_DEPENDENTS does not do this however, so it requires the full path, as well as the $BUILD_DIR, ${LIBSUFFIX}, and ${LIBPREFIX} variables.

Also, if the LIBDEPS_DEPENDENTS does not resolve correctly this is a "silent" failure, because failure to resolve just means scons never gets to it and simply doesn't compile it in.



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

The original goal of this ticket is not achievable: we cannot issue an error if you name a nonexistent target via a reverse dependency. However, we can, by introducing PROGDEPS_DEPENDENTS, remove the need for explicitly specifying library and program prefixes and suffixes.

Comment by Githook User [ 28/Jul/15 ]

Author:

{u'username': u'acmorrow', u'name': u'Andrew Morrow', u'email': u'acm@mongodb.com'}

Message: SERVER-13966 Differentiate library and program reverse dependencies
Branch: master
https://github.com/mongodb/mongo/commit/5891f4bc97ccd5a34f7731dc2011e9b5b24ea102

Comment by Shaun Verch [ 06/Jun/14 ]

We can't resolve this right now as is, because the way the LIBDEPS resolution works is by checking for the library suffix and library prefix and adding "$LIBSUFFIX" and "$LIBPREFIX" if those are not found.

This works for LIBDEPS, but not for LIBDEPS_DEPENDENTS in all cases. This is because some of our modules list executables rather than libraries in the LIBDEPS_DEPENDENTS list, which would be incorrectly handled the same way as a library that does not have the library suffix or library prefix if we tried to use the same logic that we did for LIBDEPS. This is fine for LIBDEPS because you can't ever have something dependent on an executable.

One way to solve this would be to add a PROGDEPS_DEPENDENTS variable or something similar, to indicate that a specific executable build depends on the given library, but that may be part of a larger build system refactor.

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