Skip to content

Commit

Permalink
fix(interactive): Fix linkage for libflex_utils (#4419)
Browse files Browse the repository at this point in the history
Link `PROTOBUF_libraries` for libflex_utils and by default use dynamic
arrow libraries.

Fix #4416 
Fix #4430
  • Loading branch information
zhanglei1949 authored Jan 15, 2025
1 parent 34c0cd5 commit 0e2db7c
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 3 deletions.
2 changes: 1 addition & 1 deletion flex/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ option(BUILD_DOC "Whether to build doc" OFF)
option(BUILD_ODPS_FRAGMENT_LOADER "Whether to build odps fragment loader" OFF)
option(USE_PTHASH "Whether to use pthash" OFF)
option(OPTIMIZE_FOR_HOST "Whether to optimize on host" ON) # Whether to build optimized code on host
option(USE_STATIC_ARROW "Whether to use static arrow" ON) # Whether to link arrow statically, default is ON
option(USE_STATIC_ARROW "Whether to use static arrow" OFF) # Whether to link arrow statically, default is OFF
option(BUILD_WITH_OTEL "Whether to build with opentelemetry-cpp" OFF) # Whether to build with opentelemetry-cpp, default is OFF

#print options
Expand Down
2 changes: 1 addition & 1 deletion flex/utils/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ target_include_directories(flex_utils PUBLIC
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
$<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}>)
# Link the static library of arrow, to save the trouble of linking the shared library of arrow
target_link_libraries(flex_utils ${ARROW_LIB} ${YAML_CPP_LIBRARIES} ${Boost_LIBRARIES} ${GLOG_LIBRARIES})
target_link_libraries(flex_utils ${Protobuf_LIBRARIES} ${ARROW_LIB} ${YAML_CPP_LIBRARIES} ${Boost_LIBRARIES} ${GLOG_LIBRARIES})
install_flex_target(flex_utils)

install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
Expand Down
10 changes: 9 additions & 1 deletion python/graphscope/gsctl/scripts/install_deps.sh
Original file line number Diff line number Diff line change
Expand Up @@ -888,7 +888,15 @@ install_interactive_dependencies() {
fi
# opentelemetry
if [[ "${OS_PLATFORM}" != *"Darwin"* ]]; then
install_opentelemetry
# opentelemetry expect libprotoc >= 3.13.0, see https://github.com/open-telemetry/opentelemetry-cpp/discussions/2223
proto_version=$(protoc --version | awk '{print $2}')
major_version=$(echo ${proto_version} | cut -d'.' -f1)
minor_version=$(echo ${proto_version} | cut -d'.' -f2)
if [[ ${major_version} -lt 3 ]] || [[ ${major_version} -eq 3 && ${minor_version} -lt 13 ]]; then
warning "OpenTelemetry requires protoc >= 3.13, current version is ${proto_version}, please upgrade it."
else
install_opentelemetry
fi
fi
}

Expand Down

0 comments on commit 0e2db7c

Please sign in to comment.