Skip to content

Commit

Permalink
fix: use original gcc-7 toolchain for OTP 24 on Ubuntu 18.04
Browse files Browse the repository at this point in the history
  • Loading branch information
id committed Nov 22, 2024
1 parent 9334157 commit 404822c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 2 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ ARG LUX_VERSION=lux-3.0
COPY get-otp.sh get-zsh.sh get-elixir.sh get-fdb.sh get-emqtt-bench.sh get-lux.sh /

RUN if [ -f /opt/rh/devtoolset-10/enable ]; then source /opt/rh/devtoolset-10/enable; fi && \
. /etc/os-release && export ID=$ID && export VERSION_ID=$VERSION_ID && \
if expr "${OTP_VERSION}" : '24' > /dev/null && [ "${ID}" = "ubuntu" ] && [ "${VERSION_ID}" = "18.04" ]; then update-alternatives --set gcc /usr/bin/gcc-7; fi && \
which gcc && gcc --version && \
which g++ && g++ --version && \
/get-zsh.sh && \
Expand Down
3 changes: 2 additions & 1 deletion ubuntu18.04/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,8 @@ RUN apt-get update && \
wget \
zip \
zlib1g-dev && \
update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-11 90 --slave /usr/bin/g++ g++ /usr/bin/g++-11 --slave /usr/bin/gcov gcov /usr/bin/gcov-11 && \
update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-7 7 --slave /usr/bin/g++ g++ /usr/bin/g++-7 --slave /usr/bin/gcov gcov /usr/bin/gcov-7 && \
update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-11 11 --slave /usr/bin/g++ g++ /usr/bin/g++-11 --slave /usr/bin/gcov gcov /usr/bin/gcov-11 && \
apt-get clean && rm -rf /var/lib/apt/lists/*

WORKDIR /
Expand Down

0 comments on commit 404822c

Please sign in to comment.