Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pin clang and gcc versions for ubuntu22-openmpi #4696

Merged
Merged
Changes from 1 commit
Commits
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
Prev Previous commit
Next Next commit
pin clang-tidy/format and libomp to 14
  • Loading branch information
walshmm committed Aug 11, 2023
commit bd35ee7f08358ec7d6ecbf49edcc0c4d9759e313
11 changes: 8 additions & 3 deletions config/docker/dependencies/ubuntu22/openmpi/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ RUN wget https://apt.kitware.com/kitware-archive.sh &&\
RUN export DEBIAN_FRONTEND=noninteractive &&\
apt-get install gcc-9 g++-9 \
clang-14 \
Copy link
Contributor

@ye-luo ye-luo Aug 10, 2023

Choose a reason for hiding this comment

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

After this, do gcc and g++ automatically point to 9 and does clang point to 14?
I'm asking this because I vaguely remember this only produce gcc-9/clang-14 but no gcc/clang.

Copy link
Contributor

@ye-luo ye-luo Aug 10, 2023

Choose a reason for hiding this comment

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

Since we are doing versioned install, please do clang-format-14 clang-tidy-14 and libomp-14-dev as they are from llvm

Copy link
Contributor Author

Choose a reason for hiding this comment

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

these lines swap the defaults to the new versions

clang-format \
clang-tidy \
libomp-dev \
clang-format-14 \
clang-tidy-14 \
libomp-14-dev \
gcovr \
python3 \
cmake \
Expand Down Expand Up @@ -56,6 +56,11 @@ RUN update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-9 100 && \
RUN update-alternatives --install /usr/bin/clang clang /usr/bin/clang-14 100 && \
update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-14 100

# add clang-format and clang-tidy as well as libomp
RUN update-alternatives --install /usr/bin/clang-format clang-format /usr/bin/clang-format-14 100 && \
update-alternatives --install /usr/bin/clang-tidy clang-tidy /usr/bin/clang-tidy-14 100 && \
update-alternatives --install /usr/bin/clang-tidy-diff.py clang-tidy-diff.py /usr/bin/clang-tidy-diff-14.py 100

# must add a user different from root
# to run MPI executables
RUN useradd -ms /bin/bash user
Expand Down