Skip to content

Commit 0f25022

Browse files
authored
chore(cross): Install python3.9 for aarch64-unknown-linux-gnu (#7218)
1 parent c2a2c65 commit 0f25022

File tree

3 files changed

+26
-7
lines changed

3 files changed

+26
-7
lines changed

.github/workflows/push-cross-images.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
docker-dev:
1717
name: Build cross image for ${{ matrix.target }} target
1818
runs-on: ubuntu-20.04
19-
timeout-minutes: 60
19+
timeout-minutes: 120
2020
strategy:
2121
matrix:
2222
target:

rust/cubestore/cross/README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ docker push cubejs/rust-cross:x86_64-unknown-linux-musl-$CROSS_VERSION
3737
docker push cubejs/rust-cross:aarch64-unknown-linux-gnu-$CROSS_VERSION
3838

3939
# Verify versions
40-
docker run --rm -it cubejs/rust-cross:x86_64-unknown-linux-gnu-$CROSS_VERSION cc --version
41-
docker run --rm -it cubejs/rust-cross:x86_64-unknown-linux-gnu-buster-$CROSS_VERSION cc --version
40+
docker run --platform linux/amd64 --rm -it cubejs/rust-cross:x86_64-unknown-linux-gnu-$CROSS_VERSION cc --version
41+
docker run --platform linux/amd64 --rm -it cubejs/rust-cross:x86_64-unknown-linux-gnu-buster-$CROSS_VERSION cc --version
42+
docker run --platform linux/amd64 --rm -it cubejs/rust-cross:aarch64-unknown-linux-gnu-$CROSS_VERSION cc --version
4243
```

rust/cubestore/cross/aarch64-unknown-linux-gnu.Dockerfile

Lines changed: 22 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,13 +40,13 @@ ENV ARCH=arm \
4040
CPP=aarch64-linux-gnu-cpp \
4141
LD=aarch64-linux-gnu-ld
4242

43-
ENV LIZB_VERSION=1.2.13
44-
RUN wget https://zlib.net/zlib-${LIZB_VERSION}.tar.gz -O - | tar -xz && \
45-
cd zlib-${LIZB_VERSION} && \
43+
ENV ZLIB_VERSION=1.3
44+
RUN wget https://zlib.net/zlib-${ZLIB_VERSION}.tar.gz -O - | tar -xz && \
45+
cd zlib-${ZLIB_VERSION} && \
4646
./configure --prefix=/usr/aarch64-linux-gnu && \
4747
make -j $(nproc) && \
4848
make install && \
49-
cd .. && rm -rf zlib-${LIZB_VERSION};
49+
cd .. && rm -rf zlib-${ZLIB_VERSION};
5050

5151
# https://www.openssl.org/source/old/1.1.1/
5252
ENV OPENSSL_VERSION=1.1.1q
@@ -99,6 +99,24 @@ RUN wget https://www.python.org/ftp/python/${PYTHON_VERSION}/Python-${PYTHON_VER
9999
make install && \
100100
cd .. && rm -rf Python-${PYTHON_VERSION};
101101

102+
ENV PYTHON_VERSION=3.9.18
103+
RUN wget https://www.python.org/ftp/python/${PYTHON_VERSION}/Python-${PYTHON_VERSION}.tgz -O - | tar -xz && \
104+
cd Python-${PYTHON_VERSION} && \
105+
touch config.site-aarch64 && \
106+
echo "ac_cv_buggy_getaddrinfo=no" >> config.site-aarch64 && \
107+
echo "ac_cv_file__dev_ptmx=no" >> config.site-aarch64 && \
108+
echo "ac_cv_file__dev_ptc=no" >> config.site-aarch64 && \
109+
CONFIG_SITE=config.site-aarch64 ./configure \
110+
--enable-optimizations \
111+
--disable-ipv6 \
112+
--prefix=/usr/aarch64-linux-gnu \
113+
--build=aarch64-unknown-linux-gnu \
114+
--host=x86_64-linux-gnu \
115+
--with-build-python=/usr/bin/python3.9 && \
116+
make -j $(nproc) && \
117+
make install && \
118+
cd .. && rm -rf Python-${PYTHON_VERSION};
119+
102120
ENV PKG_CONFIG_ALLOW_CROSS=true
103121
ENV PKG_CONFIG_ALL_STATIC=true
104122
ENV RUSTFLAGS="-C target-feature=-crt-static"

0 commit comments

Comments
 (0)