From e332d15aae93e3bf3b31782b39a9165c895c6579 Mon Sep 17 00:00:00 2001 From: Jingyu Zhou Date: Fri, 13 Dec 2024 16:06:20 -0800 Subject: [PATCH] Fix java lib missing symbols issue Clang19 doesn't like missing symbols --- bindings/java/CMakeLists.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/bindings/java/CMakeLists.txt b/bindings/java/CMakeLists.txt index a00e0602973..774d7c52944 100644 --- a/bindings/java/CMakeLists.txt +++ b/bindings/java/CMakeLists.txt @@ -161,6 +161,10 @@ endif() if(NOT WIN32 AND NOT APPLE AND NOT OPEN_FOR_IDE) target_link_options(java_workloads PRIVATE "LINKER:--version-script=${CMAKE_SOURCE_DIR}/bindings/c/external_workload.map,-z,nodelete") + if(CMAKE_CXX_COMPILER_ID STREQUAL "Clang" AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL "19.0.0") + # Needed because symbol "workloadCFactory" is not defined + target_link_options(java_workloads PRIVATE "LINKER:--undefined-version") + endif() endif() target_include_directories(fdb_java PRIVATE ${JNI_INCLUDE_DIRS})