From fb6a833b07e8e8db3075bcbbf5361b650a5169f2 Mon Sep 17 00:00:00 2001 From: JineHelin404 <605188046@qq.com> Date: Thu, 12 Sep 2024 21:43:09 +0800 Subject: [PATCH] fix to always hide symbol --- cpp/core/CMakeLists.txt | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/cpp/core/CMakeLists.txt b/cpp/core/CMakeLists.txt index fbf4288a5a85..c42c37b77620 100644 --- a/cpp/core/CMakeLists.txt +++ b/cpp/core/CMakeLists.txt @@ -213,14 +213,11 @@ file(MAKE_DIRECTORY ${root_directory}/releases) add_library(gluten SHARED ${SPARK_COLUMNAR_PLUGIN_SRCS}) add_dependencies(gluten jni_proto) -if(ENABLE_GLUTEN_VCPKG) - # Hide symbols of some static dependencies. Otherwise, if such dependencies - # are already statically linked to libvelox.so, a runtime error will be - # reported: xxx is being linked both statically and dynamically. - target_link_options( - gluten PRIVATE -Wl,--version-script=${CMAKE_CURRENT_SOURCE_DIR}/symbols.map) - target_link_libraries(gluten PRIVATE google::glog) -endif() +# Hide symbols of some static dependencies. Otherwise, if such dependencies +# are already statically linked to libvelox.so, a runtime error will be +# reported: xxx is being linked both statically and dynamically. +target_link_options( + gluten PRIVATE -Wl,--version-script=${CMAKE_CURRENT_SOURCE_DIR}/symbols.map) if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS 9.0) execute_process( @@ -318,6 +315,7 @@ endif() target_link_libraries(gluten PUBLIC Arrow::parquet Arrow::arrow Arrow::arrow_bundled_dependencies) +target_link_libraries(gluten PRIVATE google::glog) install(TARGETS gluten DESTINATION ${CMAKE_INSTALL_LIBDIR}) install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/resources/libhdfs.so