Skip to content

Commit

Permalink
Fix thrift
Browse files Browse the repository at this point in the history
  • Loading branch information
rui-mo committed Jul 3, 2024
1 parent 8c6e19a commit 29af955
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/linux-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ jobs:
Protobuf_SOURCE: BUNDLED # can be removed after #10134 is merged
simdjson_SOURCE: BUNDLED
xsimd_SOURCE: BUNDLED
Arrow_SOURCE: BUNDLED
Arrow_SOURCE: AUTO
CUDA_VERSION: "12.4"
steps:
- uses: actions/checkout@v4
Expand Down
10 changes: 9 additions & 1 deletion CMake/FindArrow.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,13 @@ if("${ARROW_LIB}" STREQUAL "ARROW_LIB-NOTFOUND"
set(Arrow_FOUND false)
return()
endif()
find_package(Thrift)
if(NOT Thrift_FOUND)
# Requires building arrow from source with thrift bundled.
set(Arrow_FOUND false)
return()
endif()
add_library(thrift ALIAS thrift::thrift)

set(Arrow_FOUND true)

Expand All @@ -32,7 +39,8 @@ find_path(ARROW_INCLUDE_PATH arrow/api.h)
set_target_properties(
arrow arrow_testing parquet PROPERTIES INTERFACE_INCLUDE_DIRECTORIES
${ARROW_INCLUDE_PATH})
set_target_properties(arrow PROPERTIES IMPORTED_LOCATION ${ARROW_LIB})
set_target_properties(arrow PROPERTIES IMPORTED_LOCATION ${ARROW_LIB}
INTERFACE_LINK_LIBRARIES thrift)
set_target_properties(parquet PROPERTIES IMPORTED_LOCATION ${PARQUET_LIB})
set_target_properties(arrow_testing PROPERTIES IMPORTED_LOCATION
${ARROW_TESTING_LIB})
4 changes: 4 additions & 0 deletions scripts/setup-centos9.sh
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,10 @@ function install_arrow {
-DCMAKE_BUILD_TYPE=Release \
-DARROW_BUILD_STATIC=ON \
-DThrift_SOURCE=BUNDLED

# Install thrift.
cd _build/thrift_ep-prefix/src/thrift_ep-build
$SUDO cmake --install ./ --prefix /usr/local/
}

function install_cuda {
Expand Down
5 changes: 4 additions & 1 deletion scripts/setup-ubuntu.sh
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,6 @@ function install_velox_deps_from_apt {
libre2-dev \
libsnappy-dev \
libsodium-dev \
libthrift-dev \
liblzo2-dev \
libelf-dev \
libdwarf-dev \
Expand Down Expand Up @@ -178,6 +177,10 @@ function install_arrow {
-DCMAKE_BUILD_TYPE=Release \
-DARROW_BUILD_STATIC=ON \
-DThrift_SOURCE=BUNDLED

# Install thrift.
cd _build/thrift_ep-prefix/src/thrift_ep-build
$SUDO cmake --install ./ --prefix /usr/local/
}

function install_cuda {
Expand Down

0 comments on commit 29af955

Please sign in to comment.