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

kszucs 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 ed3113b  ARROW-15495: [C++][FlightRPC] Require Protobuf/gRPC SOURCEs 
to match
ed3113b is described below

commit ed3113b8bd286b8cf29b1d349fa9f3444706347c
Author: [5~[5~David Li <[email protected]>
AuthorDate: Sat Jan 29 00:01:14 2022 +0100

    ARROW-15495: [C++][FlightRPC] Require Protobuf/gRPC SOURCEs to match
    
    Prevent us from mixing system/bundled gRPC and Protobuf, since gRPC itself 
links to Protobuf and having two copies of Protobuf linked will lead to runtime 
errors or crashes.
    
    Closes #12284 from lidavidm/arrow-15495
    
    Lead-authored-by: [5~[5~David Li <[email protected]>
    Co-authored-by: Krisztián Szűcs <[email protected]>
    Co-authored-by: David Li <[email protected]>
    Signed-off-by: Krisztián Szűcs <[email protected]>
---
 ci/docker/ubuntu-21.04-cpp.dockerfile       | 5 ++++-
 cpp/cmake_modules/ThirdpartyToolchain.cmake | 5 +++++
 dev/tasks/tasks.yml                         | 2 +-
 3 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/ci/docker/ubuntu-21.04-cpp.dockerfile 
b/ci/docker/ubuntu-21.04-cpp.dockerfile
index 58639cb..2f74e17 100644
--- a/ci/docker/ubuntu-21.04-cpp.dockerfile
+++ b/ci/docker/ubuntu-21.04-cpp.dockerfile
@@ -86,6 +86,7 @@ RUN apt-get update -y -q && \
         libre2-dev \
         libsnappy-dev \
         libssl-dev \
+        libsqlite3-dev \
         libthrift-dev \
         libutf8proc-dev \
         libzstd-dev \
@@ -118,7 +119,8 @@ RUN /arrow/ci/scripts/install_gcs_testbench.sh default
 ENV ARROW_BUILD_TESTS=ON \
     ARROW_DEPENDENCY_SOURCE=SYSTEM \
     ARROW_DATASET=ON \
-    ARROW_FLIGHT=OFF \
+    ARROW_FLIGHT=ON \
+    ARROW_FLIGHT_SQL=ON \
     ARROW_GANDIVA=ON \
     ARROW_HDFS=ON \
     ARROW_HOME=/usr/local \
@@ -142,6 +144,7 @@ ENV ARROW_BUILD_TESTS=ON \
     ORC_SOURCE=BUNDLED \
     PARQUET_BUILD_EXAMPLES=ON \
     PARQUET_BUILD_EXECUTABLES=ON \
+    Protobuf_SOURCE=BUNDLED \
     PATH=/usr/lib/ccache/:$PATH \
     PYTHON=python3
 
diff --git a/cpp/cmake_modules/ThirdpartyToolchain.cmake 
b/cpp/cmake_modules/ThirdpartyToolchain.cmake
index 8c05495..bc38952 100644
--- a/cpp/cmake_modules/ThirdpartyToolchain.cmake
+++ b/cpp/cmake_modules/ThirdpartyToolchain.cmake
@@ -3549,6 +3549,11 @@ endmacro()
 
 if(ARROW_WITH_GRPC)
   set(ARROW_GRPC_REQUIRED_VERSION "1.17.0")
+  if(NOT Protobuf_SOURCE STREQUAL gRPC_SOURCE)
+    # ARROW-15495: Protobuf/gRPC must come from the same source
+    message(STATUS "Forcing gRPC_SOURCE to Protobuf_SOURCE 
(${Protobuf_SOURCE})")
+    set(gRPC_SOURCE "${Protobuf_SOURCE}")
+  endif()
   resolve_dependency(gRPC
                      HAVE_ALT
                      TRUE
diff --git a/dev/tasks/tasks.yml b/dev/tasks/tasks.yml
index 81ed8b0..f64597f 100644
--- a/dev/tasks/tasks.yml
+++ b/dev/tasks/tasks.yml
@@ -988,7 +988,7 @@ tasks:
     params:
       image: conda-cpp-valgrind
 
-{% for ubuntu_version in ["18.04", "20.04"] %}
+{% for ubuntu_version in ["18.04", "20.04", "21.04"] %}
   test-ubuntu-{{ ubuntu_version }}-cpp:
     ci: github
     template: docker-tests/github.linux.yml

Reply via email to