Skip to content

Commit

Permalink
Merge pull request #123 from emqx/20241122-use-gcc-7-for-otp-24
Browse files Browse the repository at this point in the history
use gcc 7 for otp 24 on ubuntu18.04
  • Loading branch information
id authored Nov 22, 2024
2 parents e19a68a + 404822c commit f7fb8a6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
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
5 changes: 3 additions & 2 deletions ubuntu18.04/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,13 @@ 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 /

ARG PYTHON_VERSION=3.9.2
ARG PYTHON_VERSION=3.9.20
RUN wget https://www.python.org/ftp/python/${PYTHON_VERSION}/Python-${PYTHON_VERSION}.tgz \
&& tar xvf Python-${PYTHON_VERSION}.tgz \
&& cd Python-${PYTHON_VERSION} \
Expand Down

0 comments on commit f7fb8a6

Please sign in to comment.