From 194a88b7cf1143bf375f6698a0be6cc86597bd25 Mon Sep 17 00:00:00 2001 From: Helin Jin <36835301+JinHelin404@users.noreply.github.com> Date: Fri, 13 Sep 2024 13:20:28 +0800 Subject: [PATCH] [GLUTEN-7208][VL] Fix loading libvelox.so failed when using static glog (#7209) --- cpp/core/CMakeLists.txt | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/cpp/core/CMakeLists.txt b/cpp/core/CMakeLists.txt index 4c84d15f3a77..270468275a9b 100644 --- a/cpp/core/CMakeLists.txt +++ b/cpp/core/CMakeLists.txt @@ -213,13 +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) -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(