Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Spack depfile does not check if installed packages have changed leaving stale "markerfiles" #44169

Open
3 tasks done
robertu94 opened this issue May 13, 2024 · 2 comments
Open
3 tasks done
Labels
bug Something isn't working triage The issue needs to be prioritized

Comments

@robertu94
Copy link
Contributor

robertu94 commented May 13, 2024

Steps to reproduce

spack env activate .
spack env depfile -o Makefile
make -j $(nproc)
spack config edit # change a dependency
spack env deactivate
spack uninstall --all --dependents $foo # you might have to do this to get the concretizer to resolve or you did this accidently
spack env activate .
spack concretize -f
spack env depfile -o Makefile
make -j $(nproc)

Error message

uninstalled dependency for $foo

because the generated make file does not introduce dependencies for all packages in the envionment on the spack.yaml, the spack.lock file, or some internal spack database file to force a recheck, means that make doesn't work as expected if a dependency was uninstalled and make clean needs to be called before make will function as expected. In contrast, spack install works just fine.

Information on your system

  • Spack: 0.22.0.dev0 (83945f9)
  • Python: 3.12.3
  • Platform: linux-fedora40-icelake
  • Concretizer: clingo

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
@robertu94 robertu94 added bug Something isn't working triage The issue needs to be prioritized labels May 13, 2024
@alalazo alalazo added this to the v0.22.1 milestone May 14, 2024
@haampie haampie removed this from the v0.22.1 milestone May 14, 2024
@haampie
Copy link
Member

haampie commented May 14, 2024

That's just how it works. Run make clean.

@haampie haampie closed this as completed May 14, 2024
@robertu94
Copy link
Contributor Author

robertu94 commented May 14, 2024

Ok, I understand if this is a closed won't fix, but could we at least improve the error message so that the user should probably run make clean? spack install will also run without errors, but this leaves a sharp edge for users.

@robertu94 robertu94 reopened this May 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working triage The issue needs to be prioritized
Projects
None yet
Development

No branches or pull requests

3 participants