Skip to content

Commit ad2b150

Browse files
lidavidmkou
andauthored
build: update vcpkg version (and hence dependencies) (apache#3542)
- Update to recent vcpkg - Remove patches that are no longer necessary - Use our own Docker image to build wheels instead of relying on upstream Closes apache#3516. --------- Co-authored-by: Sutou Kouhei <kou@cozmixng.org>
1 parent 6684456 commit ad2b150

File tree

10 files changed

+70
-219
lines changed

10 files changed

+70
-219
lines changed

.env

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ JDK=21
3232
MANYLINUX=2014
3333
MAVEN=3.9.10
3434
PLATFORM=linux/amd64
35-
PYTHON=3.9
35+
PYTHON=3.13
3636
GO=1.24.1
3737
ARROW_MAJOR_VERSION=18
3838
DOTNET=8.0
@@ -41,7 +41,7 @@ DOTNET=8.0
4141
# ci/scripts/install_vcpkg.sh script. Keep in sync with apache/arrow .env.
4242
# When updating, also update the docs, which list the version of libpq/SQLite
4343
# that vcpkg (and hence our wheels) ship
44-
VCPKG="f7423ee180c4b7f40d43402c2feb3859161ef625" # 2024.06.15 Release
44+
VCPKG="4334d8b4c8916018600212ab4dd4bbdc343065d1" # 2025.09.17 Release
4545

4646
# These are used to tell tests where to find services for integration testing.
4747
# They are valid if the services are started with the compose config.

ci/docker/python-wheel-manylinux.dockerfile

Lines changed: 54 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -15,24 +15,66 @@
1515
# specific language governing permissions and limitations
1616
# under the License.
1717

18-
ARG ARCH
1918
ARG MANYLINUX
19+
FROM quay.io/pypa/manylinux${MANYLINUX}:latest
20+
21+
ARG CMAKE=4.1.2
22+
ARG GO
23+
ARG NINJA=1.13.1
2024
ARG PYTHON
21-
ARG REPO
2225
ARG VCPKG
26+
ARG TARGETPLATFORM
2327

24-
FROM ${REPO}:${ARCH}-python-${PYTHON}-wheel-manylinux-${MANYLINUX}-vcpkg-${VCPKG}
25-
26-
ARG ARCH
27-
ARG GO
28+
SHELL ["/bin/bash", "-i", "-c"]
29+
ENTRYPOINT ["/bin/bash", "-i", "-c"]
2830

31+
# -------------------- System Dependencies --------------------
32+
# Some of these dependencies are needed to build things like OpenSSL in vcpkg
33+
RUN ulimit -n 1024 && yum install -y autoconf curl git flex perl-IPC-Cmd unzip wget yum-utils zip
2934
# docker is aliased to podman by AlmaLinux, but we want real Docker
3035
# (podman is just too different)
31-
RUN yum remove -y docker ; yum install -y yum-utils
36+
RUN ulimit -n 1024 && yum remove -y docker
3237
RUN yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
33-
RUN yum install -y docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
34-
# arm64v8 -> arm64
35-
RUN wget --no-verbose https://go.dev/dl/go${GO}.linux-${ARCH/v8/}.tar.gz && \
36-
tar -C /usr/local -xzf go${GO}.linux-${ARCH/v8/}.tar.gz && \
37-
rm go${GO}.linux-${ARCH/v8/}.tar.gz
38+
RUN ulimit -n 1024 && yum install -y docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
39+
40+
# -------------------- Python --------------------
41+
RUN PYTHON_ROOT=$(find /opt/python -name cp${PYTHON/./}-cp${PYTHON/./}) && \
42+
echo "export PATH=$PYTHON_ROOT/bin:\$PATH" >> /etc/profile.d/python.sh
43+
ENV PATH="/opt/python/cp${PYTHON/./}-cp${PYTHON/./}/bin:${PATH}"
44+
45+
# -------------------- CMake, Go --------------------
46+
RUN mkdir -p /.cache/go-build \
47+
&& chmod 777 /.cache/go-build \
48+
&& git config --global --add safe.directory /adbc \
49+
&& cp /root/.gitconfig /.gitconfig \
50+
&& chmod 777 /.gitconfig
51+
52+
RUN if [[ ${TARGETPLATFORM} == "linux/amd64" ]]; then \
53+
export ARCH="amd64" CMAKE_ARCH=x86_64; \
54+
elif [[ ${TARGETPLATFORM} == "linux/arm64" ]]; then \
55+
export ARCH="arm64" CMAKE_ARCH=aarch64; \
56+
else \
57+
echo "Unsupported platform: ${TARGETPLATFORM}"; \
58+
exit 1; \
59+
fi && \
60+
wget --no-verbose -O cmake.tar.gz \
61+
https://github.com/Kitware/CMake/releases/download/v${CMAKE}/cmake-${CMAKE}-linux-${CMAKE_ARCH}.tar.gz && \
62+
wget --no-verbose -O go.tar.gz https://go.dev/dl/go${GO}.linux-${ARCH}.tar.gz && \
63+
tar -C /usr/local -xzf cmake.tar.gz && \
64+
tar -C /usr/local -xzf go.tar.gz && \
65+
rm -f cmake.tar.gz go.tar.gz
66+
3867
ENV PATH="/usr/local/go/bin:${PATH}"
68+
69+
# -------------------- Ninja --------------------
70+
RUN mkdir -p /tmp/ninja && \
71+
wget --no-verbose -O - "https://github.com/ninja-build/ninja/archive/v${NINJA}.tar.gz" | \
72+
tar -xzf - --directory /tmp/ninja --strip-components=1 && \
73+
pushd /tmp/ninja && \
74+
./configure.py --bootstrap && \
75+
mv ninja "/usr/local/bin" && \
76+
rm -rf /tmp/ninja
77+
78+
# -------------------- vcpkg --------------------
79+
ADD ci/scripts/install_vcpkg.sh /
80+
RUN /install_vcpkg.sh /opt/vcpkg ${VCPKG} && rm -f /install_vcpkg.sh

ci/scripts/install_vcpkg.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ vcpkg_version=${2:-$default_vcpkg_version}
3535
vcpkg_ports_patch=${3:-$default_vcpkg_ports_patch}
3636

3737
# reduce the fetched data using a shallow clone
38-
git clone --shallow-since=2024-01-01 https://github.com/microsoft/vcpkg ${vcpkg_destination}
38+
git clone --shallow-since=2025-09-01 https://github.com/microsoft/vcpkg ${vcpkg_destination}
3939

4040
pushd ${vcpkg_destination}
4141

ci/scripts/python_util.sh

Lines changed: 3 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -70,33 +70,15 @@ function build_drivers {
7070

7171
echo "=== Setup VCPKG ==="
7272

73-
pushd "${VCPKG_ROOT}"
74-
# XXX: work around lz4 CMakeLists being out of date
75-
# https://github.com/lz4/lz4/issues/1550
76-
patch -N -p1 < "${source_dir}/ci/vcpkg/0001-Work-around-lz4-CMake-https-github.com-lz4-lz4-issue.patch"
77-
78-
# XXX: make vcpkg retry downloads https://github.com/microsoft/vcpkg/discussions/20583
79-
patch -N -p1 < "${source_dir}/ci/vcpkg/0002-Retry-downloads.patch"
80-
81-
# XXX: backport fix for CMake 4 and macOS
82-
patch -N -p1 < "${source_dir}/ci/vcpkg/0003-Fix-CMake-4-OSX.patch"
83-
popd
84-
8573
# Need to install sqlite3 to make CMake be able to find it below
86-
"${VCPKG_ROOT}/vcpkg" install sqlite3 \
87-
--overlay-triplets "${VCPKG_OVERLAY_TRIPLETS}" \
88-
--triplet "${VCPKG_DEFAULT_TRIPLET}"
89-
90-
"${VCPKG_ROOT}/vcpkg" install libpq \
74+
"${VCPKG_ROOT}/vcpkg" install libpq sqlite3 \
9175
--overlay-triplets "${VCPKG_OVERLAY_TRIPLETS}" \
9276
--triplet "${VCPKG_DEFAULT_TRIPLET}"
9377

9478
echo "=== Building drivers ==="
9579
mkdir -p ${build_dir}
9680
pushd ${build_dir}
9781
cmake \
98-
-DADBC_BUILD_SHARED=ON \
99-
-DADBC_BUILD_STATIC=ON \
10082
-DCMAKE_BUILD_WITH_INSTALL_RPATH=ON \
10183
-DCMAKE_INSTALL_LIBDIR=lib \
10284
-DCMAKE_INSTALL_PREFIX=${build_dir} \
@@ -105,6 +87,8 @@ function build_drivers {
10587
${CMAKE_ARGUMENTS} \
10688
-DVCPKG_OVERLAY_TRIPLETS="${VCPKG_OVERLAY_TRIPLETS}" \
10789
-DVCPKG_TARGET_TRIPLET="${VCPKG_DEFAULT_TRIPLET}" \
90+
-DADBC_BUILD_SHARED=ON \
91+
-DADBC_BUILD_STATIC=ON \
10892
-DADBC_DRIVER_BIGQUERY=ON \
10993
-DADBC_DRIVER_FLIGHTSQL=ON \
11094
-DADBC_DRIVER_MANAGER=ON \

ci/vcpkg/0001-Work-around-lz4-CMake-https-github.com-lz4-lz4-issue.patch

Lines changed: 0 additions & 87 deletions
This file was deleted.

ci/vcpkg/0002-Retry-downloads.patch

Lines changed: 0 additions & 41 deletions
This file was deleted.

ci/vcpkg/0003-Fix-CMake-4-OSX.patch

Lines changed: 0 additions & 46 deletions
This file was deleted.

compose.yaml

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -171,32 +171,31 @@ services:
171171
# relocate on a separate image so that we can use a newer docker for cibuildwheel
172172

173173
python-wheel-manylinux-build:
174-
image: ${REPO}:${ARCH}-python-${PYTHON}-wheel-manylinux-${MANYLINUX}-vcpkg-${VCPKG}-adbc
174+
image: ghcr.io/apache/arrow-adbc:manylinux${MANYLINUX}-go${GO}-python${PYTHON}-vcpkg${VCPKG}
175175
build:
176176
context: .
177-
cache_from:
178-
- ${REPO}:${ARCH}-python-${PYTHON}-wheel-manylinux-${MANYLINUX}-vcpkg-${VCPKG}-adbc
179177
dockerfile: ci/docker/python-wheel-manylinux.dockerfile
180178
args:
181-
ARCH: ${ARCH}
182179
GO: ${GO}
183180
MANYLINUX: ${MANYLINUX}
184181
PYTHON: ${PYTHON}
185-
REPO: ${REPO}
186182
VCPKG: ${VCPKG}
183+
platforms:
184+
- linux/amd64
185+
- linux/arm64
187186
volumes:
188187
- .:/adbc
189188
# Must set safe.directory so go/miniver won't error when calling git
190189
command: "'git config --global --add safe.directory /adbc && /adbc/ci/scripts/python_wheel_unix_build.sh ${ARCH} /adbc /adbc/build'"
191190

192191
python-wheel-manylinux-relocate:
193-
image: ${REPO}:adbc-python-${PYTHON}-wheel-relocate
194-
platform: ${PLATFORM}
192+
image: ghcr.io/apache/arrow-adbc:python${PYTHON}
195193
build:
196194
context: .
197-
cache_from:
198-
- ${REPO}:adbc-python-${PYTHON}-wheel-relocate
199195
dockerfile: ci/docker/python-wheel-manylinux-relocate.dockerfile
196+
platforms:
197+
- linux/amd64
198+
- linux/arm64
200199
volumes:
201200
- /var/run/docker.sock:/var/run/docker.sock
202201
- .:/adbc

docs/source/driver/postgresql.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -315,7 +315,7 @@ Software Versions
315315
=================
316316

317317
For Python wheels, the shipped version of the PostgreSQL client libraries is
318-
15.2. For conda-forge packages, the version of libpq is the same as the
318+
16.9. For conda-forge packages, the version of libpq is the same as the
319319
version of libpq in your Conda environment.
320320

321321
The PostgreSQL driver is tested against PostgreSQL versions 11 through 16.

docs/source/driver/sqlite.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -242,6 +242,6 @@ Driver-specific options:
242242
Software Versions
243243
=================
244244

245-
For Python wheels, the shipped version of SQLite is 3.40.1. For conda-forge
245+
For Python wheels, the shipped version of SQLite is 3.50.4. For conda-forge
246246
packages, the version of sqlite is the same as the version of sqlite in your
247247
Conda environment.

0 commit comments

Comments
 (0)