Skip to content

Compiler constraints not respected for external packages #8082

@alalazo

Description

@alalazo

External packages are always concretized using the latest compiler available, regardless of the initial request.

Expected Result

$ spack compiler list
==> Available compilers
-- gcc ubuntu18.04-x86_64 ---------------------------------------
gcc@8  [email protected]

$ spack spec -Il openssl %[email protected]
Input spec
--------------------------------
     openssl%[email protected]

Concretized
--------------------------------
     dobj3bn  [email protected]%[email protected]+systemcerts arch=linux-ubuntu18.04-x86_64 

Actual Result

$ spack spec -Il openssl %[email protected]
Input spec
--------------------------------
     openssl%[email protected]

Concretized
--------------------------------
     dobj3bn  [email protected]%gcc@8+systemcerts arch=linux-ubuntu18.04-x86_64 

Note the %gcc@8 instead of %gcc%7.3.0 as requested.

Steps to reproduce the issue

Configure Spack with the following packages.yaml:

packages:
  openssl:
    buildable: False
    paths:
      [email protected]: /usr

and the following compilers.yaml:

compilers:
- compiler:
    environment: {}
    extra_rpaths: []
    flags: {}
    modules: []
    operating_system: ubuntu18.04
    paths:
      cc: /usr/bin/gcc-8
      cxx: /usr/bin/g++-8
      f77: /usr/bin/gfortran-8
      fc: /usr/bin/gfortran-8
    spec: gcc@8
    target: x86_64
- compiler:
    environment: {}
    extra_rpaths: []
    flags: {}
    modules: []
    operating_system: ubuntu18.04
    paths:
      cc: /usr/bin/gcc
      cxx: /usr/bin/g++
      f77: /usr/bin/gfortran
      fc: /usr/bin/gfortran
    spec: [email protected]
    target: x86_64

Information on your system

The only relevant part should be the two configuration files above

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions