Skip to content

Commit

Permalink
Using update-alternatives --slave for gcc/g++ does not work
Browse files Browse the repository at this point in the history
  • Loading branch information
scottwittenburg committed Jun 30, 2023
1 parent 9cf74ff commit 83a86cc
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 3 deletions.
6 changes: 3 additions & 3 deletions scripts/ci/images-v2/Dockerfile.ci-spack-ubuntu20.04-base
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ RUN apt-get remove -y \
gfortran-9 && \
apt-get autoremove --purge -y && \
apt-get clean && \
update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-11 100 \
--slave /usr/bin/g++ g++ /usr/bin/g++-11 \
--slave /usr/bin/gfortran gfortran /usr/bin/gfortran-11
update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-11 100 && \
update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-11 100 && \
update-alternatives --install /usr/bin/gfortran gfortran /usr/bin/gfortran-11 100

ENTRYPOINT ["/bin/bash", "--login"]
2 changes: 2 additions & 0 deletions scripts/ci/setup-run/ci-ubuntu20.04-gcc10.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#!/bin/bash

update-alternatives --set gcc "$(update-alternatives --list gcc | grep gcc-10)"
update-alternatives --set g++ "$(update-alternatives --list g++ | grep g++-10)"
update-alternatives --set gfortran "$(update-alternatives --list gfortran | grep gfortran-10)"

spack env activate "adios2-ci-${GH_YML_MATRIX_PARALLEL}"
2 changes: 2 additions & 0 deletions scripts/ci/setup-run/ci-ubuntu20.04-gcc11.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#!/bin/bash

update-alternatives --set gcc "$(update-alternatives --list gcc | grep gcc-11)"
update-alternatives --set g++ "$(update-alternatives --list g++ | grep g++-11)"
update-alternatives --set gfortran "$(update-alternatives --list gfortran | grep gfortran-11)"

spack env activate "adios2-ci-${GH_YML_MATRIX_PARALLEL}"
2 changes: 2 additions & 0 deletions scripts/ci/setup-run/ci-ubuntu20.04-gcc8.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#!/bin/bash

update-alternatives --set gcc "$(update-alternatives --list gcc | grep gcc-8)"
update-alternatives --set g++ "$(update-alternatives --list g++ | grep g++-8)"
update-alternatives --set gfortran "$(update-alternatives --list gfortran | grep gfortran-8)"

spack env activate "adios2-ci-${GH_YML_MATRIX_PARALLEL}"
2 changes: 2 additions & 0 deletions scripts/ci/setup-run/ci-ubuntu20.04-gcc9.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#!/bin/bash

update-alternatives --set gcc "$(update-alternatives --list gcc | grep gcc-9)"
update-alternatives --set g++ "$(update-alternatives --list g++ | grep g++-9)"
update-alternatives --set gfortran "$(update-alternatives --list gfortran | grep gfortran-9)"

spack env activate "adios2-ci-${GH_YML_MATRIX_PARALLEL}"

0 comments on commit 83a86cc

Please sign in to comment.