-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Closed
Labels
Milestone
Description
Steps to reproduce
I ran into an issue where I need to enforce the same compiler chain on all packages built by Spack. Spack lost the use of gfortran on my dependencies and went with just using flang, which I did not want. The important take away is the high level package does not depend on fortran but packages under it do. The quick fix was to add depends_on("fortran", type="build") to the high level package but that is not ideal.
Here is a minimal thing to show what is wrong:
Compiler toolchain:
toolchains:
clang_19:
- spec: '%cxx=llvm'
when: '%cxx'
- spec: '%fortran=gcc'
when: '%fortran'
Minimal Packages:
class TopLevel(CMakePackage):
depends_on("lowlevel")
depends_on("cxx", type="build")
class LowLevel(CMakePackage):
depends_on("fortran", type="build")
Minimal concretization of showing the wrong fortran compiler:
==> Concretized 1 spec:
- cjd6jhd serac@develop fflags=-fPIC ~asan~cuda+devtools+enzyme~ipo+openmp~petsc+profiling+raja~rocm~shared~slepc+strumpack+sundials+tribol+umpire build_system=cmake build_type=Release dev_path=/serac/repo generator=make arch=linux-rhel8-ivybridge %c,cxx=clang@19.1.7
- tnt5ej5 ^adiak@0.4.1 fflags=-fPIC ~ipo+mpi~shared build_system=cmake build_type=Release commit=7ac997111785bee6d9391664b1d18ebc2b3c557b generator=make arch=linux-rhel8-ivybridge %c,cxx,fortran=clang@19.1.7
Error message
No response
Information on your system
- Spack: 1.1.0.dev0 (b4b1c5f)
- Builtin repo: spack/spack-packages@9c24df9
- Python: 3.9.12
- Platform: linux-rhel8-sapphirerapids
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
scheibelp
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
Done