-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Multiple build systems: second builders do not inherit phase callbacks #36689
Copy link
Copy link
Closed
Description
Steps to reproduce
$ spack install netcdf-c~mpi~zstd build_system=autotools ^hdf5~mpi
$ spack install netcdf-c~mpi~zstd build_system=cmake ^hdf5~mpiError message
Both builders (CMakeBuilder and AutotoolsBuilder) of netcdf-c inherit from BackupStep, which implements a run_after("install") method backup_nc_config. However, the method is run only when build_system=cmake. If we swap the declaration of the builders, i.e. instead of
class CMakeBuilder(...):
...
class AutotoolsBuilder(...):
...we do
class AutotoolsBuilder(...):
...
class CMakeBuilder(...):
...the backup_nc_config will run only when build_system=autotools.
I see a similar pattern in proj (@adamjstewart FYI) where the install_datum_grids method is run when build_system=cmake but is not run when build_system=autotools (given the issue reported in #36688 is resolved).
@alalazo is probably the right person to mention here.
Information on your system
- Spack: 0.20.0.dev0 (74ad92e)
- Python: 3.9.2
- Platform: linux-debian11-skylake
- Concretizer: clingo
General information
- I have run
spack debug reportand reported the version of Spack/Python/Platform - I have searched the issues of this repo and believe this is not a duplicate
- I have run the failing commands in debug mode and reported the output
Reactions are currently unavailable