Skip to content

require does not work with cflags= #34241

@stephenmsachs

Description

@stephenmsachs

Steps to reproduce

Adding cflags= to the spec in packages:<apps>:require: throws an error. Interestingly, using variants with the equals sign works fine.

Error message

[ec2-user@ip-10-12-10-115 ]$ spack config rm packages:openfoam
[ec2-user@ip-10-12-10-115 ]$ spack config add packages:openfoam:require:"openfoam@2006_220610 ^[email protected]"
[ec2-user@ip-10-12-10-115 ]$ spack spec -U openfoam 1>/dev/null; echo $?
0
[ec2-user@ip-10-12-10-115 ]$ spack config rm packages:openfoam
[ec2-user@ip-10-12-10-115 ]$ spack config add packages:openfoam:require:"openfoam@2006_220610 scotch=False"
[ec2-user@ip-10-12-10-115 ]$ spack spec -U openfoam 1>/dev/null; echo $?
0
[ec2-user@ip-10-12-10-115 ]$ spack config rm packages:openfoam
[ec2-user@ip-10-12-10-115 ]$ spack config add packages:openfoam:require:"openfoam@2006_220610 cflags=foo"
[ec2-user@ip-10-12-10-115 ]$ spack spec -U openfoam 1>/dev/null; echo $?
==> Error: Cannot satisfy the requirements in packages.yaml for the 'openfoam' package. You may want to delete them to proceed with concretization. To check where the requirements are defined run 'spack config blame packages'
1

Information on your system

  • Spack: 0.20.0.dev0 (c6ee304)
  • Python: 3.7.10
  • Platform: linux-amzn2-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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions