Skip to content

Commit 373e20d

Browse files
author
Andrey Doronin
committed
fix(x64-glibc-217): use modern gcc and python from conda-forge
1 parent 8fb00ef commit 373e20d

File tree

3 files changed

+17
-24
lines changed

3 files changed

+17
-24
lines changed

recipes/x64-glibc-217/Dockerfile

Lines changed: 9 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -6,32 +6,16 @@ ARG UID=1000
66
RUN groupadd --gid $GID node \
77
&& adduser --gid $GID --uid $UID node
88

9-
RUN cat <<EOF | tee -a /etc/yum.repos.d/devtoolset-12.repo
10-
[devtoolset-12]
11-
name=Devtoolset 12
12-
baseurl=https://buildlogs.centos.org/c7-devtoolset-12.x86_64/
13-
enabled=1
14-
gpgcheck=0
15-
EOF
16-
179
RUN ulimit -n 1024 \
1810
&& sed -i 's/mirrorlist/#mirrorlist/g' /etc/yum.repos.d/CentOS-* \
1911
&& sed -i 's|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g' /etc/yum.repos.d/CentOS-* \
2012
&& yum install -y epel-release \
21-
&& yum install -y centos-release-scl-rh \
22-
&& sed -i 's/mirrorlist/#mirrorlist/g' /etc/yum.repos.d/CentOS-SCLo-scl-rh.repo \
23-
&& sed -i 's|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g' /etc/yum.repos.d/CentOS-SCLo-scl-rh.repo \
2413
&& yum upgrade -y \
2514
&& yum install -y \
2615
git \
2716
curl \
2817
make \
29-
python2 \
30-
rh-python38 \
31-
ccache \
32-
xz-utils \
33-
devtoolset-12 \
34-
glibc-devel
18+
ccache
3519

3620
COPY --chown=node:node run.sh /home/node/run.sh
3721

@@ -41,4 +25,12 @@ VOLUME /home/node/node.tar.xz
4125

4226
USER node
4327

28+
RUN cd "/home/node" && curl -LO https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-Linux-x86_64.sh \
29+
&& bash Miniforge3-Linux-x86_64.sh -b \
30+
&& rm Miniforge3-Linux-x86_64.sh
31+
ENV PATH="/home/node/miniforge3/bin:${PATH}"
32+
RUN mamba install -y \
33+
python=3.12 \
34+
gxx=15
35+
4436
ENTRYPOINT [ "/home/node/run.sh" ]

recipes/x64-glibc-217/run.sh

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,10 @@ cd /home/node
1717

1818
tar -xf node.tar.xz
1919

20+
nodeDir="/home/node/node-${fullversion}"
21+
2022
# configuring cares correctly to not use sys/random.h on this target
21-
cd "node-${fullversion}"/deps/cares
23+
cd "${nodeDir}"/deps/cares
2224
sed -i 's/define HAVE_SYS_RANDOM_H 1/undef HAVE_SYS_RANDOM_H/g' ./config/linux/ares_config.h
2325
sed -i 's/define HAVE_GETRANDOM 1/undef HAVE_GETRANDOM/g' ./config/linux/ares_config.h
2426

@@ -27,17 +29,16 @@ if [[ "$(grep -o 'ARES_VERSION_STR "[^"]*"' ./include/ares_version.h | awk '{pri
2729
sed -i 's/MSG_FASTOPEN/TCP_FASTOPEN_CONNECT/g' ./src/lib/ares__socket.c
2830
fi
2931

30-
cd /home/node
32+
# Linux implementation of experimental WASM memory control requires Linux 3.17 & glibc 2.27 so disable it
33+
cd "${nodeDir}"/deps/v8/src
34+
[ -f d8/d8.cc ] && sed -i -e 's/#if V8_TARGET_OS_LINUX/#if false/g' wasm/wasm-objects.cc d8/d8.cc
3135

32-
cd "node-${fullversion}"
36+
cd "${nodeDir}"
3337

3438
export CC="ccache gcc"
3539
export CXX="ccache g++"
3640
export MAJOR_VERSION=$(echo ${fullversion} | cut -d . -f 1 | tr --delete v)
3741

38-
. /opt/rh/devtoolset-12/enable
39-
. /opt/rh/rh-python38/enable
40-
4142
make -j$(getconf _NPROCESSORS_ONLN) binary V= \
4243
DESTCPU="x64" \
4344
ARCH="x64" \

recipes/x64-glibc-217/should-build.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,4 @@ fullversion=$2
77

88
decode "$fullversion"
99

10-
test "$major" -ge "18" && test "$major" -lt "24"
10+
test "$major" -ge "18"

0 commit comments

Comments
 (0)