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

Concretization fails with strange error with deprecated versions #43533

Open
3 tasks done
hernando opened this issue Apr 7, 2024 · 0 comments
Open
3 tasks done

Concretization fails with strange error with deprecated versions #43533

hernando opened this issue Apr 7, 2024 · 0 comments
Labels
bug Something isn't working concretization impact-low

Comments

@hernando
Copy link

hernando commented Apr 7, 2024

Steps to reproduce

I was trying to build an application depending on glib 2.56.4 and I was having many problems with the concretization. After some research I found out that this version is not installable on its own and after some debugging I think I've found the cause.

The problem can be reproduced in develop-2024-04-07 with a simple package like this:

from spack.package import *

import spack.builder
import spack.package_base
from spack.directives import build_system

from spack.build_systems._checks import BaseBuilder

class FooPackage(spack.package_base.PackageBase):
    build_system_class = "FooPackage"
    build_system("foo")

@spack.builder.builder("foo")
class FooBuilder(BaseBuilder):
    pass


class BarPackage(spack.package_base.PackageBase):
    build_system_class = "BarPackage"
    build_system("bar")

@spack.builder.builder("bar")
class BarBuilder(BaseBuilder):
    pass


class Test(FooPackage, BarPackage):

    version("2")
    version("1", deprecated=True)

    build_system(
        conditional("foo", when="@2:"),
        conditional("bar", when="@:1"),
        default="foo",
    )

Trying to concretize test@1 gives an error that is not actionable and even looks wrong. If deprecated=True is removed from the version directive, the command works as expected. Adding --deprecated to the command line also works. This may be a duplicate of #42037, but the error is not exactly the same and the bit about variant ... when [,,] looks weird.

Error message

$ spack spec test@1
==> Error: concretization failed for the following reasons:

   1. Cannot satisfy 'test@1'
   2. Cannot satisfy 'test@1'
        required because test@1 requested explicitly 
   3. Cannot satisfy 'test@2:' and 'test@1
        required because test@1 requested explicitly 
        required because test variant build_system value foo when [, , ] 
          required because test@1 requested explicitly 

I did not add -d because it does not seems to provide additional hints and it should be easy to reproduce.

Information on your system

  • Spack: 0.22.0.dev0 (54acda3)
  • Python: 3.10.6
  • Platform: linux-linuxmint21-zen3
  • 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
@hernando hernando added bug Something isn't working triage The issue needs to be prioritized labels Apr 7, 2024
@alalazo alalazo added concretization impact-low and removed triage The issue needs to be prioritized labels May 21, 2024
@alalazo alalazo changed the title Concretization fails with strange error in multi-build system package with deprecated version Concretization fails with strange error with deprecated versions May 21, 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 concretization impact-low
Projects
Status: Todo
Development

No branches or pull requests

2 participants