Intel Oneapi toolchain run into `fortran-rt` provider conflict with `gcc-runtime`
When building packages with gcc
, Spack requires them to depend on a gcc-runtime
package. Conversely, packages built with the oneapi
compiler, depend on a oneapi-runtime
package. The problem arises from both of these packages wanting to be the sole provider, specifically, of fortran-rt
. With "unified concretisation" this is unable to resolve.
One potential solution is abandon the unified concretisation in favour of when-possible
. This does incur greater risk of packages being installed without the specific dependency chain we're looking for
Another potential solution was suggested when the issue was brought up in Slack with a different user running into it:
My situation: building an environment using
intel-oneapi-compilers
wherever possible (and thus depend onintel-oneapi-runtime
); exceptions arebison
,gcc-runtime
, andlibbsd
, which are built withGNU
compilers. These packages are constrained inpackages.yaml
withrequire: '%gcc'
As in your case, it appears that a dependency on
gcc-runtime
leads to both runtime packages wanting to providefortran-rt
, as seen by the output fromspack diff /hash1 /hash2
For my situation, concretization isunify: when_possible
andspack.yaml
specifiesprefer: ['%oneapi']
for all packages, and am also using an internal fork ofspack
; I'll have to check as to how up to date withspack/develop
it is. It seems that addingintel-oneapi-runtime
as an external (as with the compiler and MPI specs) topackages.yaml
, e.g.intel-oneapi-runtime: externals: - spec: intel-oneapi-runtime@2024.2.1%oneapi@2024.2.1 prefix: /apps/oneapi/compiler/2024.2 modules: - compiler-rt/2024.2.1
resolves duplicates