spack: ValueError: Specs passed to a DirectoryLayout must be concrete!
I’ve never used modules before, but ANL’s LCRC is looking to make the switch to Lmod for our next cluster. I decided to try out our modules tutorial, but ran into a problem. I created a ~/.spack/modules.yaml containing:
modules:
enable::
- lmod
and ran:
$ spack module refresh --module-type lmod
but it crashed with:
Traceback (most recent call last):
File "/soft/spack-0.10.0/bin/spack", line 212, in <module>
main(sys.argv)
File "/soft/spack-0.10.0/bin/spack", line 208, in main
_main(args, unknown)
File "/soft/spack-0.10.0/bin/spack", line 174, in _main
return_val = command(parser, args)
File "/blues/gpfs/home/software/spack-0.10.0/lib/spack/spack/cmd/module.py", line 259, in module
callbacks[args.subparser_name](module_type, specs, args)
File "/blues/gpfs/home/software/spack-0.10.0/lib/spack/spack/cmd/module.py", line 243, in refresh
x.write(overwrite=True)
File "/blues/gpfs/home/software/spack-0.10.0/lib/spack/spack/modules.py", line 380, in write
set_module_variables_for_package(package, mod)
File "/blues/gpfs/home/software/spack-0.10.0/lib/spack/spack/build_environment.py", line 380, in set_module_variables_for_package
m.std_cmake_args = spack.CMakePackage._std_args(pkg)
File "/blues/gpfs/home/software/spack-0.10.0/lib/spack/spack/build_systems/cmake.py", line 95, in _std_args
rpaths = ':'.join(spack.build_environment.get_rpaths(pkg))
File "/blues/gpfs/home/software/spack-0.10.0/lib/spack/spack/build_environment.py", line 424, in get_rpaths
rpaths.extend(d.prefix.lib for d in deps
File "/blues/gpfs/home/software/spack-0.10.0/lib/spack/spack/build_environment.py", line 425, in <genexpr>
if os.path.isdir(d.prefix.lib))
File "/blues/gpfs/home/software/spack-0.10.0/lib/spack/spack/spec.py", line 1156, in prefix
return Prefix(spack.store.layout.path_for_spec(self))
File "/blues/gpfs/home/software/spack-0.10.0/lib/spack/spack/directory_layout.py", line 124, in path_for_spec
_check_concrete(spec)
File "/blues/gpfs/home/software/spack-0.10.0/lib/spack/spack/directory_layout.py", line 42, in _check_concrete
raise ValueError('Specs passed to a DirectoryLayout must be concrete!')
ValueError: Specs passed to a DirectoryLayout must be concrete!
This seems to be a common error message. I’m seeing it in #206, #217, #238, #244, and #1960. From what I gather from reading those other issues, it sounds like this is caused by changing hashes and packages/variants being added/removed? Unfortunately, this makes Spack + Modules a pipe dream, as you would have to completely reinstall Spack or uninstall all previous versions the first time any conflict occurs.
About this issue
- Original URL
- State: closed
- Created 10 years ago
- Reactions: 2
- Comments: 29 (29 by maintainers)
Commits related to this issue
- db and concretization of modified packages: fixes #2911 — committed to epfl-scitas/spack by alalazo 10 years ago
- db and concretization of modified packages: fixes #2911 (#2920) — committed to spack/spack by alalazo 10 years ago
- Revert "db and concretization of packages modified after installation: fixes #2911" — committed to spack/spack by tgamblin 10 years ago
- Revert "db and concretization of packages modified after installation: fixes #2911" (#3078) — committed to spack/spack by tgamblin 10 years ago
- db and concretization of modified packages: fixes #2911 (#2920) — committed to electronicvisions/spack by alalazo 10 years ago
- Revert "db and concretization of packages modified after installation: fixes #2911" (#3078) — committed to electronicvisions/spack by tgamblin 10 years ago
- specs retrieved from the DB point to prefix repo with highest priority This hopefully fixes #2911. The basic idea is that when I retrieve installed specs from the DB, then the prefix repo will have h... — committed to epfl-scitas/spack by alalazo 10 years ago
- specs retrieved from the DB point to prefix repo with highest priority This hopefully fixes #2911. The basic idea is that when I retrieve installed specs from the DB, then the prefix repo will have h... — committed to epfl-scitas/spack by alalazo 10 years ago
- db and concretization of modified packages: fixes #2911 (#2920) — committed to diaena/spack by alalazo 10 years ago
- Revert "db and concretization of packages modified after installation: fixes #2911" (#3078) — committed to diaena/spack by tgamblin 10 years ago
- db and concretization of modified packages: fixes #2911 (#2920) — committed to xavierandrade/spack by alalazo 10 years ago
- Revert "db and concretization of packages modified after installation: fixes #2911" (#3078) — committed to xavierandrade/spack by tgamblin 10 years ago
- db and concretization of modified packages: fixes #2911 (#2920) — committed to spack/spack by alalazo 10 years ago
- Revert "db and concretization of packages modified after installation: fixes #2911" (#3078) — committed to spack/spack by tgamblin 10 years ago
- db and concretization of modified packages: fixes #2911 (#2920) — committed to electronicvisions/spack by alalazo 10 years ago
- Revert "db and concretization of packages modified after installation: fixes #2911" (#3078) — committed to electronicvisions/spack by tgamblin 10 years ago
Ok, the problem seems to be inherent in spec construction from records in the DB. If there’s no rush I’ll try to put together a PR tomorrow.
@adamjstewart I’ll try my best to have a look at this tomorrow 😄