kou commented on code in PR #13599:
URL: https://github.com/apache/arrow/pull/13599#discussion_r920613348
##########
docker-compose.yml:
##########
@@ -487,7 +487,9 @@ services:
<<: *ccache
CC: clang-${CLANG_TOOLS}
CXX: clang++-${CLANG_TOOLS}
- ARROW_BUILD_STATIC: "OFF"
+ # ARROW-17051: this build uses static Protobuf, so we must also
+ # use static Arrow to run Flight/Flight SQL tests
+ ARROW_BUILD_STATIC: "ON"
Review Comment:
How about moving this to `ci/docker/ubuntru-*-cpp.dockerfile`? If newer
Ubuntu provides enough recent Protobuf as `libprotobuf-dev`, we can disable
static built only for the newer Ubuntu.
##########
cpp/src/arrow/flight/CMakeLists.txt:
##########
@@ -37,16 +37,12 @@ endif()
set(ARROW_FLIGHT_TEST_INTERFACE_LIBS)
if(ARROW_FLIGHT_TEST_LINKAGE STREQUAL "static")
- if(ARROW_BUILD_STATIC)
- set(ARROW_FLIGHT_TEST_LINK_LIBS arrow_flight_static)
- else()
- set(ARROW_FLIGHT_TEST_LINK_LIBS arrow_flight_shared)
- endif()
- if(ARROW_FLIGHT_TESTING_BUILD_STATIC)
- list(APPEND ARROW_FLIGHT_TEST_LINK_LIBS arrow_flight_testing_static)
- else()
- list(APPEND ARROW_FLIGHT_TEST_LINK_LIBS arrow_flight_testing_shared)
+ if(NOT ARROW_BUILD_STATIC)
+ message(STATUS "If static Protobuf or gRPC are used, Arrow must be built
statically")
+ message(STATUS "(These libraries have global state, and linkage must be
consistent)")
+ message(FATAL_ERROR "Must build Arrow statically to link Flight tests
statically")
Review Comment:
I like this.
##########
docker-compose.yml:
##########
@@ -1214,6 +1216,8 @@ services:
shm_size: *shm-size
environment:
<<: *ccache
+ ARROW_BUILD_STATIC: 'ON'
Review Comment:
Do we need this? We don't need to build static library when we don't build
tests.
--
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]