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

Reuse can prevent specs from concretizing #43663

Closed
3 tasks done
adamjstewart opened this issue Apr 15, 2024 · 1 comment · Fixed by #43676
Closed
3 tasks done

Reuse can prevent specs from concretizing #43663

adamjstewart opened this issue Apr 15, 2024 · 1 comment · Fixed by #43676
Assignees
Labels
bug Something isn't working concretization impact-low

Comments

@adamjstewart
Copy link
Member

Steps to reproduce

Using the following db:

spack-db.develop.7e14ff806a.2024-04-15-151420.tar.gz

The following fails:

> spack spec gdal+mdb

whereas the following succeed:

> spack spec gdal@3.4+mdb
> spack spec --fresh gdal+mdb

It seems like reuse is preventing clingo from choosing an older version of GDAL.

Error message

> spack -d spec gdal+mdb
...
Traceback (most recent call last):
  File "/Users/Adam/spack/lib/spack/spack/main.py", line 1068, in main
    return _main(argv)
           ^^^^^^^^^^^
  File "/Users/Adam/spack/lib/spack/spack/main.py", line 1021, in _main
    return finish_parse_and_run(parser, cmd_name, args, env_format_error)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/Adam/spack/lib/spack/spack/main.py", line 1051, in finish_parse_and_run
    return _invoke_command(command, parser, args, unknown)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/Adam/spack/lib/spack/spack/main.py", line 648, in _invoke_command
    return_val = command(parser, args)
                 ^^^^^^^^^^^^^^^^^^^^^
  File "/Users/Adam/spack/lib/spack/spack/cmd/spec.py", line 101, in spec
    concretized_specs = spack.cmd.parse_specs(args.specs, concretize=True)
                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/Adam/spack/lib/spack/spack/cmd/__init__.py", line 177, in parse_specs
    spec.concretize(tests=tests)
  File "/Users/Adam/spack/lib/spack/spack/spec.py", line 2997, in concretize
    self._new_concretize(tests)
  File "/Users/Adam/spack/lib/spack/spack/spec.py", line 2970, in _new_concretize
    result = solver.solve([self], tests=tests, allow_deprecated=allow_deprecated)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/Adam/spack/lib/spack/spack/solver/asp.py", line 3548, in solve
    result, _, _ = self.driver.solve(
                   ^^^^^^^^^^^^^^^^^^
  File "/Users/Adam/spack/lib/spack/spack/solver/asp.py", line 853, in solve
    raise InternalConcretizerError(
spack.solver.asp.InternalConcretizerError: Internal Spack error: the solver completed but produced specs that do not satisfy the request. Please report a bug at https://github.com/spack/spack/issues
	Unsatisfied input specs:
	Input spec: gdal+mdb
	Candidate spec: gdal@=3.8.3...

Information on your system

  • Spack: 0.22.0.dev0 (7e14ff8)
  • Python: 3.11.6
  • Platform: darwin-sonoma-m2
  • 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
@adamjstewart adamjstewart added bug Something isn't working concretization triage The issue needs to be prioritized labels Apr 15, 2024
@haampie
Copy link
Member

haampie commented Apr 16, 2024

The issue is that gdal@=3.8.3 is reused by the solver, which lacks +mdb because it's a conditional variant when="@:3.4". Will investigate why that happens.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working concretization impact-low
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

3 participants