Skip to content

Commit 0e2db7c

Browse files
authored
fix(interactive): Fix linkage for libflex_utils (#4419)
Link `PROTOBUF_libraries` for libflex_utils and by default use dynamic arrow libraries. Fix #4416 Fix #4430
1 parent 34c0cd5 commit 0e2db7c

File tree

3 files changed

+11
-3
lines changed

3 files changed

+11
-3
lines changed

flex/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ option(BUILD_DOC "Whether to build doc" OFF)
1515
option(BUILD_ODPS_FRAGMENT_LOADER "Whether to build odps fragment loader" OFF)
1616
option(USE_PTHASH "Whether to use pthash" OFF)
1717
option(OPTIMIZE_FOR_HOST "Whether to optimize on host" ON) # Whether to build optimized code on host
18-
option(USE_STATIC_ARROW "Whether to use static arrow" ON) # Whether to link arrow statically, default is ON
18+
option(USE_STATIC_ARROW "Whether to use static arrow" OFF) # Whether to link arrow statically, default is OFF
1919
option(BUILD_WITH_OTEL "Whether to build with opentelemetry-cpp" OFF) # Whether to build with opentelemetry-cpp, default is OFF
2020

2121
#print options

flex/utils/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ target_include_directories(flex_utils PUBLIC
7070
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
7171
$<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}>)
7272
# Link the static library of arrow, to save the trouble of linking the shared library of arrow
73-
target_link_libraries(flex_utils ${ARROW_LIB} ${YAML_CPP_LIBRARIES} ${Boost_LIBRARIES} ${GLOG_LIBRARIES})
73+
target_link_libraries(flex_utils ${Protobuf_LIBRARIES} ${ARROW_LIB} ${YAML_CPP_LIBRARIES} ${Boost_LIBRARIES} ${GLOG_LIBRARIES})
7474
install_flex_target(flex_utils)
7575

7676
install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}

python/graphscope/gsctl/scripts/install_deps.sh

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -888,7 +888,15 @@ install_interactive_dependencies() {
888888
fi
889889
# opentelemetry
890890
if [[ "${OS_PLATFORM}" != *"Darwin"* ]]; then
891-
install_opentelemetry
891+
# opentelemetry expect libprotoc >= 3.13.0, see https://github.com/open-telemetry/opentelemetry-cpp/discussions/2223
892+
proto_version=$(protoc --version | awk '{print $2}')
893+
major_version=$(echo ${proto_version} | cut -d'.' -f1)
894+
minor_version=$(echo ${proto_version} | cut -d'.' -f2)
895+
if [[ ${major_version} -lt 3 ]] || [[ ${major_version} -eq 3 && ${minor_version} -lt 13 ]]; then
896+
warning "OpenTelemetry requires protoc >= 3.13, current version is ${proto_version}, please upgrade it."
897+
else
898+
install_opentelemetry
899+
fi
892900
fi
893901
}
894902

0 commit comments

Comments
 (0)