Skip to content

Commit 80518bc

Browse files
committed
fix(c++): fix link error -lgar_arrow_static not found when link static graphar build arrow from source
Signed-off-by: acezen <[email protected]>
1 parent c260513 commit 80518bc

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

cpp/CMakeLists.txt

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -232,16 +232,17 @@ macro(build_graphar_with_arrow_bundled)
232232
target_link_libraries(graphar PRIVATE ${CMAKE_DL_LIBS})
233233

234234
if(APPLE)
235-
message(STATUS "Linking arrow bundled dependencies " ${GAR_PARQUET_STATIC_LIB} ${GAR_ACERO_STATIC_LIB})
236-
target_link_libraries(graphar PRIVATE -Wl,-force_load gar_arrow_static
235+
target_link_libraries(graphar PRIVATE -Wl,-force_load
236+
"${GAR_ARROW_STATIC_LIB}"
237237
"${GAR_PARQUET_STATIC_LIB}"
238238
"${GAR_DATASET_STATIC_LIB}"
239239
"${GAR_ARROW_ACERO_STATIC_LIB}"
240240
"${GAR_ARROW_BUNDLED_DEPS_STATIC_LIB}"
241241
"-framework CoreFoundation"
242242
"-framework Security")
243243
else()
244-
target_link_libraries(graphar PRIVATE -Wl,--exclude-libs,ALL -Wl,--whole-archive gar_arrow_static
244+
target_link_libraries(graphar PRIVATE -Wl,--exclude-libs,ALL -Wl,--whole-archive
245+
"${GAR_ARROW_STATIC_LIB}"
245246
"${GAR_PARQUET_STATIC_LIB}"
246247
"${GAR_DATASET_STATIC_LIB}"
247248
"${GAR_ARROW_ACERO_STATIC_LIB}"

cpp/cmake/apache-arrow.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ function(build_arrow)
5757

5858
set(GAR_ARROW_STATIC_LIB_FILENAME
5959
"${CMAKE_STATIC_LIBRARY_PREFIX}arrow${CMAKE_STATIC_LIBRARY_SUFFIX}")
60-
set(GAR_ARROW_STATIC_LIB "${GAR_ARROW_STATIC_LIBRARY_DIR}/${GAR_ARROW_STATIC_LIB_FILENAME}")
60+
set(GAR_ARROW_STATIC_LIB "${GAR_ARROW_STATIC_LIBRARY_DIR}/${GAR_ARROW_STATIC_LIB_FILENAME}" CACHE INTERNAL "arrow lib")
6161
set(GAR_PARQUET_STATIC_LIB_FILENAME
6262
"${CMAKE_STATIC_LIBRARY_PREFIX}parquet${CMAKE_STATIC_LIBRARY_SUFFIX}")
6363
set(GAR_PARQUET_STATIC_LIB "${GAR_ARROW_STATIC_LIBRARY_DIR}/${GAR_PARQUET_STATIC_LIB_FILENAME}" CACHE INTERNAL "parquet lib")

0 commit comments

Comments
 (0)