Skip to content

Commit

Permalink
ARROW-17703: [C++][Gandiva] Fix Gandiva OpenSSL dependency (apache#14109
Browse files Browse the repository at this point in the history
)

If I build gandiva alone, I get a link error saying OpenSSL related definitions are not found. After some digging, I found out that `ARROW_USE_OPENSSL` is only turned on if any of the following conditions is met: `PARQUET_REQUIRE_ENCRYPTION`, `ARROW_FLIGHT`, `ARROW_S3`. Adding `ARROW_GANDIVA` to the list solves this issue.

Authored-by: Jin Shang <[email protected]>
Signed-off-by: Sutou Kouhei <[email protected]>
  • Loading branch information
js8544 authored Sep 13, 2022
1 parent 01dce6a commit 7c7fbcf
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 2 additions & 1 deletion cpp/cmake_modules/ThirdpartyToolchain.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -1245,7 +1245,8 @@ set(ARROW_OPENSSL_REQUIRED_VERSION "1.0.2")
set(ARROW_USE_OPENSSL OFF)
if(PARQUET_REQUIRE_ENCRYPTION
OR ARROW_FLIGHT
OR ARROW_S3)
OR ARROW_S3
OR ARROW_GANDIVA)
set(OpenSSL_SOURCE "SYSTEM")
resolve_dependency(OpenSSL
HAVE_ALT
Expand Down
2 changes: 0 additions & 2 deletions cpp/src/gandiva/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,6 @@ find_package(LLVMAlt REQUIRED)

add_definitions(-DGANDIVA_LLVM_VERSION=${LLVM_VERSION_MAJOR})

find_package(OpenSSLAlt REQUIRED)

# Set the path where the bitcode file generated, see precompiled/CMakeLists.txt
set(GANDIVA_PRECOMPILED_BC_PATH "${CMAKE_CURRENT_BINARY_DIR}/irhelpers.bc")
set(GANDIVA_PRECOMPILED_CC_PATH "${CMAKE_CURRENT_BINARY_DIR}/precompiled_bitcode.cc")
Expand Down

0 comments on commit 7c7fbcf

Please sign in to comment.