pitrou commented on a change in pull request #11569:
URL: https://github.com/apache/arrow/pull/11569#discussion_r758569351



##########
File path: ci/docker/python-wheel-manylinux-201x.dockerfile
##########
@@ -18,65 +18,61 @@
 ARG base
 FROM ${base}
 
-ARG arch_alias
-ARG arch_short_alias
+ARG arch
+ARG arch_short
+ARG manylinux
 
+ENV MANYLINUX_VERSION=${manylinux}
+
+# Install basic dependencies
 RUN yum install -y git flex curl autoconf zip wget
 
 # Install CMake
-ARG cmake=3.19.3
-RUN wget -q 
https://github.com/Kitware/CMake/releases/download/v${cmake}/cmake-${cmake}-Linux-${arch_alias}.tar.gz
 -O - | \
-    tar -xzf - --directory /usr/local --strip-components=1
+# AWS SDK doesn't work with CMake=3.22 due to 
https://gitlab.kitware.com/cmake/cmake/-/issues/22524
+ARG cmake=3.21.4
+COPY ci/scripts/install_cmake.sh arrow/ci/scripts/
+RUN /arrow/ci/scripts/install_cmake.sh ${arch} linux ${cmake} /usr/local
 
 # Install Ninja
 ARG ninja=1.10.2
-RUN mkdir /tmp/ninja && \
-    wget -q https://github.com/ninja-build/ninja/archive/v${ninja}.tar.gz -O - 
| \
-    tar -xzf - --directory /tmp/ninja --strip-components=1 && \
-    cd /tmp/ninja && \
-    ./configure.py --bootstrap && \
-    mv ninja /usr/local/bin && \
-    rm -rf /tmp/ninja
+COPY ci/scripts/install_ninja.sh arrow/ci/scripts/
+RUN /arrow/ci/scripts/install_ninja.sh ${ninja} /usr/local
 
 # Install ccache
 ARG ccache=4.1
-RUN mkdir /tmp/ccache && \
-    wget -q https://github.com/ccache/ccache/archive/v${ccache}.tar.gz -O - | \
-    tar -xzf - --directory /tmp/ccache --strip-components=1 && \
-    cd /tmp/ccache && \
-    mkdir build && \
-    cd build && \
-    cmake -GNinja -DCMAKE_BUILD_TYPE=Release -DZSTD_FROM_INTERNET=ON .. && \
-    ninja install && \
-    rm -rf /tmp/ccache
+COPY ci/scripts/install_ccache.sh arrow/ci/scripts/
+RUN /arrow/ci/scripts/install_ccache.sh ${ccache} /usr/local
 
-# Install vcpkg
+# Install vcpkg and in case of manylinux2010 install a more recent glibc>2.15
+# for the prebuilt vcpkg binary
 ARG vcpkg
-RUN git clone https://github.com/microsoft/vcpkg /opt/vcpkg && \
-    git -C /opt/vcpkg checkout ${vcpkg} && \
-    /opt/vcpkg/bootstrap-vcpkg.sh -useSystemBinaries -disableMetrics && \
-    ln -s /opt/vcpkg/vcpkg /usr/bin/vcpkg
-
-# Patch ports files as needed
+ARG glibc=2.18
 COPY ci/vcpkg/*.patch \
      ci/vcpkg/*linux*.cmake \
      arrow/ci/vcpkg/
-RUN cd /opt/vcpkg && git apply --ignore-whitespace /arrow/ci/vcpkg/ports.patch
+COPY ci/scripts/install_vcpkg.sh \
+     ci/scripts/install_glibc.sh \
+     arrow/ci/scripts/
+RUN arrow/ci/scripts/install_vcpkg.sh /opt/vcpkg ${vcpkg} && \
+    if [ "${manylinux}" == "2010" ]; then \

Review comment:
       Can you add a comment explaining this? Also, why put all this on the 
same `RUN` line as vcpkg?

##########
File path: ci/scripts/install_glibc.sh
##########
@@ -0,0 +1,42 @@
+#!/usr/bin/env bash
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+set -e
+
+if [ "$#" -ne 2 ]; then
+  echo "Usage: $0 <version> <prefix>"
+  exit 1
+fi
+
+version=$1
+prefix=$2
+
+url="http://ftp.gnu.org/gnu/glibc/glibc-${version}.tar.gz";
+
+mkdir /tmp/glibc
+wget -q ${url} -O - | tar -xzf - --directory /tmp/glibc --strip-components=1
+
+mkdir /tmp/glibc/build
+pushd /tmp/glibc/build
+../configure --prefix=${prefix}
+make -j4

Review comment:
       Do we *really* need to build the glibc from scratch?




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to