This is an automated email from the ASF dual-hosted git repository.

wesm pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/arrow.git


The following commit(s) were added to refs/heads/master by this push:
     new 655eb74  ARROW-2212: [C++/Python] Build Protobuf in base manylinux 1 
docker image
655eb74 is described below

commit 655eb74e7a275b5861246baa0641851df3ca2ffd
Author: Uwe L. Korn <[email protected]>
AuthorDate: Mon Feb 26 10:54:12 2018 -0500

    ARROW-2212: [C++/Python] Build Protobuf in base manylinux 1 docker image
    
    Saves ~6min build time.
    
    Author: Uwe L. Korn <[email protected]>
    
    Closes #1662 from xhochy/ARROW-2212 and squashes the following commits:
    
    acf2319d <Uwe L. Korn> ARROW-2212:  Build Protobuf in base manylinux1 
docker image
---
 cpp/cmake_modules/ThirdpartyToolchain.cmake |  4 ++++
 python/manylinux1/Dockerfile-x86_64         |  2 +-
 python/manylinux1/Dockerfile-x86_64_base    |  4 ++++
 python/manylinux1/scripts/build_protobuf.sh | 28 ++++++++++++++++++++++++++++
 4 files changed, 37 insertions(+), 1 deletion(-)

diff --git a/cpp/cmake_modules/ThirdpartyToolchain.cmake 
b/cpp/cmake_modules/ThirdpartyToolchain.cmake
index e64284c..944ca1d 100644
--- a/cpp/cmake_modules/ThirdpartyToolchain.cmake
+++ b/cpp/cmake_modules/ThirdpartyToolchain.cmake
@@ -110,6 +110,10 @@ if (DEFINED ENV{GRPC_HOME})
   set(GRPC_HOME "$ENV{GRPC_HOME}")
 endif()
 
+if (DEFINED ENV{PROTOBUF_HOME})
+  set(PROTOBUF_HOME "$ENV{PROTOBUF_HOME}")
+endif()
+
 # Ensure that a default make is set
 if ("${MAKE}" STREQUAL "")
     if (NOT MSVC)
diff --git a/python/manylinux1/Dockerfile-x86_64 
b/python/manylinux1/Dockerfile-x86_64
index f2b64e6..62a0893 100644
--- a/python/manylinux1/Dockerfile-x86_64
+++ b/python/manylinux1/Dockerfile-x86_64
@@ -14,7 +14,7 @@
 # KIND, either express or implied.  See the License for the
 # specific language governing permissions and limitations
 # under the License.
-FROM quay.io/xhochy/arrow_manylinux1_x86_64_base:ARROW-2204
+FROM quay.io/xhochy/arrow_manylinux1_x86_64_base:ARROW-2212
 
 ADD arrow /arrow
 WORKDIR /arrow/cpp
diff --git a/python/manylinux1/Dockerfile-x86_64_base 
b/python/manylinux1/Dockerfile-x86_64_base
index 4dfb131..955abdd 100644
--- a/python/manylinux1/Dockerfile-x86_64_base
+++ b/python/manylinux1/Dockerfile-x86_64_base
@@ -63,6 +63,10 @@ ENV ZSTD_HOME /usr
 ADD scripts/build_ccache.sh /
 RUN /build_ccache.sh
 
+ADD scripts/build_protobuf.sh /
+RUN /build_protobuf.sh
+ENV PROTOBUF_HOME /usr
+
 WORKDIR /
 RUN git clone https://github.com/matthew-brett/multibuild.git && cd multibuild 
&& git checkout ffe59955ad8690c2f8bb74766cb7e9b0d0ee3963
 
diff --git a/python/manylinux1/scripts/build_protobuf.sh 
b/python/manylinux1/scripts/build_protobuf.sh
new file mode 100755
index 0000000..c3ea800
--- /dev/null
+++ b/python/manylinux1/scripts/build_protobuf.sh
@@ -0,0 +1,28 @@
+#!/bin/bash -ex
+# 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.
+
+PROTOBUF_VERSION="2.6.0"
+
+curl -sL 
https://github.com/google/protobuf/releases/download/v${PROTOBUF_VERSION}/protobuf-${PROTOBUF_VERSION}.tar.gz
 -o protobuf-${PROTOBUF_VERSION}.tar.gz
+tar xf protobuf-${PROTOBUF_VERSION}.tar.gz
+pushd protobuf-${PROTOBUF_VERSION}
+./configure --disable-shared --prefix=/usr "CXXFLAGS=-O2 -fPIC"
+make -j5
+make install
+popd
+rm -rf protobuf-${PROTOBUF_VERSION}.tar.gz protobuf-${PROTOBUF_VERSION}

-- 
To stop receiving notification emails like this one, please contact
[email protected].

Reply via email to