Skip to content

spack develop doesn't re-execute cmake stage after fixing a CMake issue from clean build. #48770

@greenc-FNAL

Description

@greenc-FNAL

Steps to reproduce

  1. Set up an environment to develop the CMakePackage of your choice with suitable spack env create, spack add, and spack develop commands (and others if appropriate).
  2. After the source is checked out, introduce a syntax error into the top level CMakeLists.txt file (e.g. project() -> pproject()).
  3. Attempt to spack install --no-add your package.
  4. After the expected failure, fix the error introduced in step 2.
  5. Re-try step 3.

Error message

...
scratch/greenc/art-develop-2025-01-14/spack_env/lib/spack/spack/installer.py:2349 ==> [2025-01-29-09:13:13.755390] cetlib: Building cetlib-develop-mbzdq4obgudz2fal3qteqhlpvmsnsnsn [CMakePackage]
scratch/greenc/art-develop-2025-01-14/spack_env/lib/spack/spack/installer.py:2451 ==> [2025-01-29-09:13:13.779965] cetlib: Executing phase: 'cmake'
scratch/greenc/art-develop-2025-01-14/spack_env/lib/spack/spack/installer.py:2451 ==> [2025-01-29-09:13:13.786559] cetlib: Executing phase: 'build'
scratch/greenc/art-develop-2025-01-14/spack_env/lib/spack/spack/error.py:58 ==> [2025-01-29-09:13:13.801067] Error: ProcessError: Command exited with status 1:
    '/usr/bin/ninja' '-j16' '-v'

1 error found in build log:
     2    scratch/greenc/art-develop-2025-01-14/spack_env/lib/spack/spack/installer.py:2451 ==> [2025-01-29-09:13:13.786559] cetlib: Executing phase: 'build'
     3    scratch/greenc/art-develop-2025-01-14/spack_env/lib/spack/spack/util/executable.py:262 ==> [2025-01-29-09:13:13.788500] '/usr/bin/ninja' '-j16' '-v'
  >> 4    ninja: error: loading 'build.ninja': No such file or directory
...

Information on your system

  • Spack: 0.24.0.dev0 (71604c0)
  • Python: 3.9.21
  • Platform: linux-almalinux9-cascadelake

General information

  • I have run spack debug report and 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

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingtriageThe issue needs to be prioritized

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions