Uploaded image for project: 'Data Management'
  1. Data Management
  2. DM-8728

SCons pybind11 builds re-link unnecessarily

    Details

    • Type: Bug
    • Status: Done
    • Resolution: Done
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None
    • Templates:
    • Story Points:
      6
    • Team:
      Data Release Production

      Description

      When rebuilding the pybind11 branch of afw, I noticed that scons was frequently rebuilding products even when no changes had occurred. Knowing that this used to be a problem in Swig builds based on whether SCons processed Swig files before or after .cc files, I tried explicitly listing the build targets, as this was the workaround for the Swig problem. This did prevent an immediate build, but revealed another way to trigger the problem that may be easier to debug:

      If you do:

      scons lib python
      

      and then

      scons lib python tests
      

      You'll note that it re-links all of the pybind11 modules before running all of the tests. If you run scons with --debug=explain, it will report that the dependencies of libafw.so have changed, and hence that file needs to be re-linked. It then rebuilds all of the pybind11 modules, since these each link against libafw.so. I don't understand why it thinks the dependencies of libafw.so change when we add tests to the target list (they may also change under other weird circumstances), but that's what we should fix.

      Giving this a lot of SPs since SCons dependency logic debugging can be hard.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                jbosch Jim Bosch
                Reporter:
                jbosch Jim Bosch
                Reviewers:
                Tim Jenness
                Watchers:
                Jim Bosch, Pim Schellart [X] (Inactive), Tim Jenness
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Summary Panel