Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
f1ff66e
fix spack latest images
iole-bolognesi Jun 24, 2026
c03daa1
branch name typo to trigger CI
iole-bolognesi Jun 24, 2026
ea0fc3e
avoid double applying the patch
iole-bolognesi Jun 24, 2026
c176f6a
remove useless syntax after new spack release
iole-bolognesi Jun 25, 2026
9c43f41
Fixes #34 - remove extra ARG no longer needed [skip ci]
iole-bolognesi Jun 26, 2026
e7a1429
using llvm native linker rather than gold plugin
iole-bolognesi Jun 30, 2026
e449b3a
Apply review comments : drop COMPILER_REF pin and refactor BOOT name …
iole-bolognesi Jun 30, 2026
d96d6ab
fix indentation
iole-bolognesi Jun 30, 2026
cde58a9
add spec to use lld linker for latest spack and clang image
iole-bolognesi Jul 1, 2026
c7ada36
try unify when possible in concretizer
iole-bolognesi Jul 2, 2026
f42369b
inject build flags only in the build of doxygen package
iole-bolognesi Jul 3, 2026
3f5a168
fix typo
iole-bolognesi Jul 3, 2026
1a5b5fb
add the additional syntax to packages.yaml rather than overwriting it
iole-bolognesi Jul 10, 2026
3eb932a
fix syntax error
iole-bolognesi Jul 10, 2026
33b7e57
change packages.yaml to only support LTO for doxygen package
iole-bolognesi Jul 15, 2026
ca817da
skip the YAML heredoc entirely and use spack config add's dotted-path…
iole-bolognesi Jul 15, 2026
c1a8e5d
Add quotes to EORUNs and add condition to set LTO flags to doxygen pa…
iole-bolognesi Jul 15, 2026
530225d
change codename of debian release
iole-bolognesi Jul 16, 2026
bdcfa84
post review changes -- removing registry as an argument and restoring…
iole-bolognesi Jul 16, 2026
a28a51a
remove unused registry arg
iole-bolognesi Jul 16, 2026
393f34c
removed unused registry arg
iole-bolognesi Jul 16, 2026
3e26a3c
fix from import
iole-bolognesi Jul 16, 2026
f33be62
restore deleted line
iole-bolognesi Jul 16, 2026
9ce34e5
remove registry arg
iole-bolognesi Jul 16, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/spack_docker_images.yml
Original file line number Diff line number Diff line change
Expand Up @@ -141,3 +141,4 @@ jobs:
LIBS=${{ matrix.level }}
tags: |
${{ steps.info.outputs.fullspack }}

76 changes: 47 additions & 29 deletions spack/3-baselibs/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -36,22 +36,37 @@ ARG COMPILER
ARG SPACK_INSTALL_ARGS="--show-log-on-error --fail-fast"

# Install the spack compiler with our latest system compiler
COPY ${COMPILER}.lst compilerpkg.lst
RUN spack solve -I -U \
"$(cat compilerpkg.lst)%$(spack compilers | tr ' ' '\n' | grep @)" \
&& spack install ${SPACK_INSTALL_ARGS} -U \
"$(cat compilerpkg.lst)%$(spack compilers | tr ' ' '\n' | grep @)"


# Prevent building any new compiler
RUN spack config --scope site add 'packages:llvm:buildable: false'
RUN spack config --scope site add 'packages:gcc:buildable: false'
COPY ${COMPILER}.lst compilerpkg.lst
RUN <<'EORUN'
set -e
COMPILER_PKG="$(cat compilerpkg.lst)"
Comment thread
JAuriac marked this conversation as resolved.
SPACK_VERSION="$(spack compilers | tr ' ' '\n' | grep @)"
Comment thread
JAuriac marked this conversation as resolved.
Comment thread
JAuriac marked this conversation as resolved.
# Select the ~bootstrap gcc variant as the 3-stage bootstrap fails on latest spack
if [[ "$COMPILER_PKG" == gcc* ]]
then
COMPILER_SPECIFIC_VARIANTS="~bootstrap"
else
COMPILER_SPECIFIC_VARIANTS=""
fi
spack solve -I -U ${COMPILER_PKG}${COMPILER_SPECIFIC_VARIANTS}%${SPACK_VERSION} \
&& spack install ${SPACK_INSTALL_ARGS} -U "${COMPILER_PKG}${COMPILER_SPECIFIC_VARIANTS}%${SPACK_VERSION}"
EORUN

# Prevent building any new compiler and set compiler flags for doxygen to support LTO
RUN <<'EORUN'
set -e
spack config --scope site add "packages:llvm:buildable:false"
spack config --scope site add "packages:gcc:buildable:false"
if spack --version | grep -qs '^1\.' && spack find llvm &>/dev/null
then
spack config --scope site add "packages:doxygen:require:ldflags=-fuse-ld=lld"
fi
EORUN

# Generate a compiler ref
# * before 1.0, rely on the compilers section and generate a mixed compiler for llvm
# * from spack 1.0 on, define a toolchain
RUN <<EORUN
RUN <<'EORUN'
set -e
if ( spack --version | grep -qs '^1\.' )
then
Expand Down Expand Up @@ -86,39 +101,42 @@ else
fi
EORUN


# Install an environment with our base libraries using the compiler ref we just generated
# Create an environment with our base libraries using the compiler ref we just generated
COPY <<'EOCOPY' spack.yaml
spack:
view: false
definitions:
- buildeps: []
- compiler: []
- libs: []
- mpi: []
- mpilibs: []
specs:
- '$buildeps'
- matrix:
- ['$%compiler']
- - '$libs'
- '$mpi'
- matrix:
- ['$%compiler']
- ['$^mpi']
- ['$mpilibs']
- $buildeps
- $libs
- $mpi
- $mpilibs
Comment on lines +114 to +117

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why remove the matrix ?

@iole-bolognesi iole-bolognesi Jul 16, 2026

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It was causing an error (see the comment on line 122). I couldn't find a related issue in Spack, but removing the matrix seems to fix the problem. I am still a bit confused about this error, maybe someone with more experience in Spack can investigate it further.

EOCOPY
RUN spack env create pdienv spack.yaml
COPY deps.sh deps.sh
RUN . deps.sh && spack -e pdienv add -l buildeps ${BASE_BUILDDEPS}
RUN . deps.sh && spack -e pdienv add -l libs ${BASE_LIBS}
RUN <<EORUN

# The toolchain is attached directly to each lib spec (string-parsed), which
# avoids the matrix that crashes in expand_toolchains on latest spack
RUN <<'EORUN'
set -e
if ( spack --version | grep -qs '^1\.' )
then spack -e pdienv add -l compiler pditoolchain
else spack -e pdienv add -l compiler "$(spack compilers | tr ' ' '\n' | grep @)"
. deps.sh
if spack --version | grep -qs '^1\.'
then COMPILER_REF="%pditoolchain"
else COMPILER_REF="%$(spack compilers | tr ' ' '\n' | grep @)"
Comment thread
JAuriac marked this conversation as resolved.
fi
for p in ${BASE_BUILDDEPS}; do
spack -e pdienv add -l buildeps "$p"
done
for p in ${BASE_LIBS}; do
spack -e pdienv add -l libs "$p ${COMPILER_REF}"
done
EORUN

# Concretize, fetch, install
RUN spack -e pdienv concretize --reuse
RUN spack -e pdienv fetch \
|| spack -e pdienv fetch \
Expand Down
2 changes: 1 addition & 1 deletion spack/3-baselibs/clang.lst
Original file line number Diff line number Diff line change
@@ -1 +1 @@
llvm+llvm_dylib+link_llvm_dylib~lldb
llvm+llvm_dylib+link_llvm_dylib+lld~lldb
2 changes: 1 addition & 1 deletion spack/4-mini/Dockerfile
Comment thread
iole-bolognesi marked this conversation as resolved.
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@ ARG SPACK_INSTALL_ARGS="--show-log-on-error --fail-fast"
RUN spack -e pdienv add -l mpi "${MPI}"
RUN . deps.sh && spack -e pdienv add -l mpilibs ${BASE_MPILIBS}
RUN spack -e pdienv concretize -f --reuse
RUN spack -e pdienv install ${SPACK_INSTALL_ARGS}
RUN spack -e pdienv install ${SPACK_INSTALL_ARGS}
2 changes: 1 addition & 1 deletion spack/5-all/Dockerfile
Comment thread
iole-bolognesi marked this conversation as resolved.
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,4 @@ ARG SPACK_INSTALL_ARGS="--show-log-on-error --fail-fast"
RUN . deps.sh && spack -e pdienv add -l libs ${OPT_LIBS}
RUN . deps.sh && spack -e pdienv add -l mpilibs ${OPT_MPILIBS}
RUN spack -e pdienv concretize -f --reuse
RUN spack -e pdienv install ${SPACK_INSTALL_ARGS}
RUN spack -e pdienv install ${SPACK_INSTALL_ARGS}
2 changes: 1 addition & 1 deletion spack/6-finalize/Dockerfile
Comment thread
iole-bolognesi marked this conversation as resolved.
Original file line number Diff line number Diff line change
Expand Up @@ -173,4 +173,4 @@ RUN export VERBOSE=1 \



FROM main
FROM main
Loading