diff --git a/docker-compose.yml b/docker-compose.yml index 6bf5f67e73a33..728c843a40a8b 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -684,6 +684,19 @@ services: /arrow/ci/scripts/cpp_build.sh /arrow /build && /arrow/ci/scripts/r_sanitize.sh /arrow" + r-manylinux2014: + image: ${REPO}:amd64-centos-7.7-python-manylinux2014 + build: + context: python/manylinux201x + dockerfile: Dockerfile-x86_64_base_2014 + cache_from: + - ${REPO}:amd64-centos-7.7-python-manylinux2014 + shm_size: *shm-size + volumes: + - .:/arrow:delegated + - ./python/manylinux201x:/io:delegated + command: /io/build_arrow_static.sh + ################################ Rust ####################################### debian-rust: diff --git a/python/manylinux201x/build_arrow_static.sh b/python/manylinux201x/build_arrow_static.sh new file mode 100755 index 0000000000000..587092befaaf1 --- /dev/null +++ b/python/manylinux201x/build_arrow_static.sh @@ -0,0 +1,90 @@ +#!/bin/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. +# +# Build upon the scripts in https://github.com/matthew-brett/manylinux-builds +# * Copyright (c) 2013-2019, Matt Terry and Matthew Brett (BSD 2-clause) +# +# Usage: +# either build: +# $ docker-compose build centos-python-manylinux2010 +# or pull: +# $ docker-compose pull centos-python-manylinux2010 +# and then run: +# $ docker-compose run -e PYTHON_VERSION=3.7 centos-python-manylinux2010 +# Can use either manylinux2010 or manylinux2014 + +source /multibuild/manylinux_utils.sh + +# Quit on failure +set -e + +# Print commands for debugging +# set -x + +cd /arrow/python + +export PKG_CONFIG_PATH=/usr/lib/pkgconfig:/arrow-dist/lib/pkgconfig + +# Ensure the target directory exists +mkdir -p /io/dist + +ARROW_BUILD_DIR=/io/dist +mkdir -p "${ARROW_BUILD_DIR}" +pushd "${ARROW_BUILD_DIR}" +CC=gcc CXX=g++ cmake -DCMAKE_BUILD_TYPE=Release \ + -DARROW_DEPENDENCY_SOURCE=BUNDLED \ + -DZLIB_ROOT=/usr/local \ + -DCMAKE_INSTALL_PREFIX=/io/dist \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DARROW_BUILD_TESTS=OFF \ + -DARROW_BUILD_SHARED=OFF \ + -DARROW_BUILD_STATIC=ON \ + -DARROW_BOOST_USE_SHARED=OFF \ + -DARROW_GANDIVA_PC_CXX_FLAGS="-isystem;/opt/rh/devtoolset-8/root/usr/include/c++/8/;-isystem;/opt/rh/devtoolset-8/root/usr/include/c++/8/x86_64-redhat-linux/" \ + -DARROW_JEMALLOC=ON \ + -DARROW_RPATH_ORIGIN=ON \ + -DARROW_PYTHON=OFF \ + -DARROW_COMPUTE=ON \ + -DARROW_CSV=ON \ + -DARROW_FILESYSTEM=ON \ + -DARROW_JSON=ON \ + -DARROW_PARQUET=ON \ + -DARROW_DATASET=ON \ + -DARROW_PLASMA=OFF \ + -DARROW_TENSORFLOW=OFF \ + -DARROW_ORC=OFF \ + -DARROW_WITH_BZ2=ON \ + -DARROW_WITH_ZLIB=ON \ + -DARROW_WITH_ZSTD=ON \ + -DARROW_WITH_LZ4=ON \ + -DARROW_WITH_SNAPPY=ON \ + -DARROW_WITH_BROTLI=ON \ + -DARROW_FLIGHT=OFF \ + -DARROW_GANDIVA=OFF \ + -DARROW_GANDIVA_JAVA=OFF \ + -DBoost_NAMESPACE=arrow_boost \ + -DBOOST_ROOT=/arrow_boost_dist \ + -DOPENSSL_USE_STATIC_LIBS=ON \ + -GNinja /arrow/cpp +ninja -v install + +# Copy the bundled static libs from the build to the install dir +find . -regex .*/lib/.*\\.a\$ | xargs -I{} cp {} ./lib + +popd diff --git a/r/configure b/r/configure index 003e1fb43ac48..41294fdec7db6 100755 --- a/r/configure +++ b/r/configure @@ -33,6 +33,11 @@ PKG_BREW_NAME="apache-arrow" PKG_TEST_HEADER="" PKG_LIBS="-larrow -lparquet -larrow_dataset" +# Temporarily put here +if [ "$LIBARROW_BINARY" ]; then + PKG_LIBS="$PKG_LIBS -lthrift -lsnappy -lz -lzstd -llz4 -lbrotlidec-static -lbrotlienc-static -lbrotlicommon-static -lboost_filesystem -lboost_regex -lboost_system -ljemalloc_pic" +fi + # generate code if [ "$ARROW_R_DEV" = "TRUE" ]; then echo "*** Generating code with data-raw/codegen.R"