Skip to content

[pull] master from cube-js:master #71

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

Merged
merged 1 commit into from
Aug 1, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
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
6 changes: 3 additions & 3 deletions rust/cubestore/cross/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,15 @@ Keep in mind:
- Don't use modern unix*, which ship newest `libc` (current used 2.31)
- Better to use one clang/gcc version across images (`clang-14`)
- Try to use one OS for all images (`debian`) for unix*
- Install 3 last versions for Python (`3.9`, `3.10`, `3.11`)

```sh
# dmY
export DOCKER_BUILDKIT_MAX_PARALLELISM=2
docker buildx bake x86_64-unknown-linux-gnu-python --push
docker buildx bake aarch64-unknown-linux-gnu-python --push
docker buildx bake x86_64-unknown-linux-musl-python --push

export CROSS_VERSION=01082024
# dmY
export CROSS_VERSION=31072025

# Verify versions
docker run --platform linux/amd64 --rm -it cubejs/rust-cross:x86_64-unknown-linux-gnu-$CROSS_VERSION cc --version
Expand Down
Original file line number Diff line number Diff line change
@@ -1,21 +1,22 @@
FROM base

ARG PYTHON_VERSION
ARG PYTHON_VERSION_SUFFIX
ARG PYTHON_RELEASE

# python is required for cross compiling python :D
RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y python${PYTHON_RELEASE} \
&& rm -rf /var/lib/apt/lists/*;

RUN wget https://www.python.org/ftp/python/${PYTHON_VERSION}/Python-${PYTHON_VERSION}.tgz -O - | tar -xz \
&& cd Python-${PYTHON_VERSION} \
# --enable-optimizations is disabled, because it's not supported with CROSS
RUN wget https://www.python.org/ftp/python/${PYTHON_VERSION}/Python-${PYTHON_VERSION}${PYTHON_VERSION_SUFFIX}.tgz -O - | tar -xz \
&& cd Python-${PYTHON_VERSION}${PYTHON_VERSION_SUFFIX} \
&& touch config.site-aarch64 \
&& echo "ac_cv_buggy_getaddrinfo=no" >> config.site-aarch64 \
&& echo "ac_cv_file__dev_ptmx=no" >> config.site-aarch64 \
&& echo "ac_cv_file__dev_ptc=no" >> config.site-aarch64 \
&& CONFIG_SITE=config.site-aarch64 ./configure \
--enable-shared \
--enable-optimizations \
--disable-ipv6 \
--prefix=/usr/aarch64-linux-gnu \
--build=aarch64-unknown-linux-gnu \
Expand Down
5 changes: 3 additions & 2 deletions rust/cubestore/cross/aarch64-unknown-linux-gnu.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@ ENV ARCH=arm \
CC=aarch64-linux-gnu-gcc \
CXX=aarch64-linux-gnu-g++ \
CPP=aarch64-linux-gnu-cpp \
LD=aarch64-linux-gnu-ld
LD=aarch64-linux-gnu-ld \
RUNLIB=aarch64-linux-gnu-ranlib

ENV ZLIB_VERSION=1.3.1
RUN wget https://zlib.net/zlib-${ZLIB_VERSION}.tar.gz -O - | tar -xz && \
Expand All @@ -45,7 +46,7 @@ RUN wget https://zlib.net/zlib-${ZLIB_VERSION}.tar.gz -O - | tar -xz && \
make install && \
cd .. && rm -rf zlib-${ZLIB_VERSION};

# https://www.openssl.org/source/old/1.1.1/
# https://openssl-library.org/source/old/1.1.1/
ENV OPENSSL_VERSION=1.1.1w
RUN wget https://www.openssl.org/source/openssl-${OPENSSL_VERSION}.tar.gz -O - | tar -xz \
&& cd openssl-${OPENSSL_VERSION} \
Expand Down
81 changes: 43 additions & 38 deletions rust/cubestore/cross/docker-bake.hcl
Original file line number Diff line number Diff line change
@@ -1,11 +1,48 @@
variable "CROSS_VERSION" {
default = "01082024"
// dmY
default = "31072025"
}

variable "LLVM_VERSION" {
default = "18"
}

variable "PYTHON_VERSIONS" {
default = [
# TODO: Enable after release.
# {
# python_version = "3.14.0"
# python_version_sufix = "rc1"
# python_release = "3.14"
# },
{
python_version = "3.13.5"
python_version_sufix = ""
python_release = "3.13"
},
{
python_version = "3.12.4"
python_version_sufix = ""
python_release = "3.12"
},
{
python_version = "3.11.3"
python_version_sufix = ""
python_release = "3.11"
},
{
python_version = "3.10.11"
python_version_sufix = ""
python_release = "3.10"
},
{
python_version = "3.9.18"
python_version_sufix = ""
python_release = "3.9"
}
]
}

target "aarch64-unknown-linux-gnu" {
context = "."
dockerfile = "aarch64-unknown-linux-gnu.Dockerfile"
Expand All @@ -24,29 +61,13 @@ target "aarch64-unknown-linux-gnu-python" {
dockerfile = "aarch64-unknown-linux-gnu-python.Dockerfile"
name = "aarch64-unknown-linux-gnu-python-${replace(item.python_release, ".", "-")}"
matrix = {
item = [
{
python_version = "3.12.4"
python_release = "3.12"
},
{
python_version = "3.11.3"
python_release = "3.11"
},
{
python_version = "3.10.11"
python_release = "3.10"
},
{
python_version = "3.9.18"
python_release = "3.9"
}
]
item = PYTHON_VERSIONS
}
args = {
CROSS_VERSION = CROSS_VERSION
PYTHON_VERSION = item.python_version
PYTHON_RELEASE = item.python_release
PYTHON_RELEASE = item.python_release,
PYTHON_VERSION_SUFFIX = item.python_version_sufix
}
tags = ["cubejs/rust-cross:aarch64-unknown-linux-gnu-${CROSS_VERSION}-python-${item.python_release}"]
platforms = ["linux/amd64"]
Expand Down Expand Up @@ -80,29 +101,13 @@ target "x86_64-unknown-linux-gnu-python" {
dockerfile = "x86_64-unknown-linux-gnu-python.Dockerfile"
name = "x86_64-unknown-linux-gnu-python-${replace(item.python_release, ".", "-")}"
matrix = {
item = [
{
python_version = "3.12.4"
python_release = "3.12"
},
{
python_version = "3.11.3"
python_release = "3.11"
},
{
python_version = "3.10.11"
python_release = "3.10"
},
{
python_version = "3.9.18"
python_release = "3.9"
}
]
item = PYTHON_VERSIONS
}
args = {
CROSS_VERSION = CROSS_VERSION
PYTHON_VERSION = item.python_version
PYTHON_RELEASE = item.python_release
PYTHON_VERSION_SUFFIX = item.python_version_sufix
}
tags = ["cubejs/rust-cross:x86_64-unknown-linux-gnu-${CROSS_VERSION}-python-${item.python_release}"]
platforms = ["linux/amd64"]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
FROM base

ARG PYTHON_VERSION
ARG PYTHON_VERSION_SUFFIX
ARG PYTHON_RELEASE

RUN cd tmp && wget https://www.python.org/ftp/python/${PYTHON_VERSION}/Python-${PYTHON_VERSION}.tgz -O - | tar -xz \
&& cd Python-${PYTHON_VERSION} \
RUN cd tmp && wget https://www.python.org/ftp/python/${PYTHON_VERSION}/Python-${PYTHON_VERSION}${PYTHON_VERSION_SUFFIX}.tgz -O - | tar -xz \
&& cd Python-${PYTHON_VERSION}${PYTHON_VERSION_SUFFIX} \
&& ./configure \
--enable-shared \
--with-openssl=/openssl \
Expand Down
2 changes: 1 addition & 1 deletion rust/cubestore/cross/x86_64-unknown-linux-gnu.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ RUN update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-$LLV
&& update-alternatives --install /usr/bin/cc cc /usr/bin/clang-$LLVM_VERSION 100 \
&& update-alternatives --install /usr/bin/c++ c++ /usr/bin/clang++-$LLVM_VERSION 100;

# https://www.openssl.org/source/old/1.1.1/
# https://openssl-library.org/source/old/1.1.1/
ARG OPENSSL_VERSION=1.1.1w
RUN cd tmp && wget https://www.openssl.org/source/openssl-${OPENSSL_VERSION}.tar.gz -O - | tar -xz \
&& cd openssl-${OPENSSL_VERSION} \
Expand Down
Loading