-
Notifications
You must be signed in to change notification settings - Fork 2.4k
solver: error with flags when a package appears multiple times in the DAG #51209
Copy link
Copy link
Closed
Copy link
Labels
Description
Steps to reproduce
Assume you have some gcc compiler registered:
$ spack compiler list
==> Available compilers
-- gcc ubuntu20.04-x86_64 ---------------------------------------
[e] [email protected] [e] [email protected] [e] [email protected] [e] [email protected]and that gcc is your default compiler. Try to build a version of gcc not in the list with flags:
$ spack -m spec gcc@14
- [email protected] build_system=generic languages:='c,c++,fortran' arch=linux-ubuntu20.04-icelake %c,[email protected]
- ^[email protected] build_system=generic arch=linux-ubuntu20.04-icelake
[e] ^[email protected] build_system=generic languages:='c,c++,fortran' arch=linux-ubuntu20.04-icelake
- ^[email protected] build_system=generic arch=linux-ubuntu20.04-icelake
[e] ^[email protected] build_system=autotools arch=linux-ubuntu20.04-icelake
$ spack -m spec gcc@14 cflags="-O3"
==> Error: set() does not equal {'-O3'}Error message
$ spack -m spec gcc@14 cflags="-O3"
==> Error: set() does not equal {'-O3'}The error is due to
spack/lib/spack/spack/solver/asp.py
Line 3686 in 2d6a5fe
| cmd_specs = {s.name: s for spec in self._command_line_specs for s in spec.traverse()} |
which assumes there's only one gcc in the spec, and errors out when looking at the compiler of gcc@14.
Information on your system
- Spack: 1.1.0.dev0 (2d6a5fe)
- Builtin repo: spack/spack-packages@b8a64c3
- Python: 3.13.2
- Platform: linux-ubuntu20.04-icelake
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
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
Done