kou commented on pull request #10768:
URL: https://github.com/apache/arrow/pull/10768#issuecomment-884726000
> For the Ruby one: Arrow Flight is built with system OpenSSL but Arrow
Flight GLib tried to link against conda's OpenSSL and it's failed. I don't know
why this was occurred...
Wrong. This verification scripts build Arrow C++ with bundled gRPC. The
bundled gRPC uses system shared OpenSSL but `libarrow_flight.so` doesn't link
system shared OpenSSL.
The following patch will solve this:
```diff
diff --git a/cpp/cmake_modules/ThirdpartyToolchain.cmake
b/cpp/cmake_modules/ThirdpartyToolchain.cmake
index a79d4fd7b..56c37000b 100644
--- a/cpp/cmake_modules/ThirdpartyToolchain.cmake
+++ b/cpp/cmake_modules/ThirdpartyToolchain.cmake
@@ -2543,6 +2543,9 @@ macro(build_grpc)
c-ares::cares
ZLIB::ZLIB
Threads::Threads)
+ if(ARROW_OPENSSL_USE_SHARED)
+ list(APPEND GRPC_LINK_LIBRARIES OpenSSL::SSL)
+ endif()
set_target_properties(gRPC::grpc
PROPERTIES IMPORTED_LOCATION
"${GRPC_STATIC_LIBRARY_GRPC}"
INTERFACE_INCLUDE_DIRECTORIES
"${GRPC_INCLUDE_DIR}"
```
I confirmed this on my local Ubuntu 20.04 Docker container.
--
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]