Skip to content

Commit d37e1da

Browse files
子懿claude
andcommitted
fix(cmake): link CMAKE_DL_LIBS after libarrow.a to fix gcc8 fs_test link
libarrow.a calls dlsym but the arrow imported target did not declare ${CMAKE_DL_LIBS} in its link interface, so -ldl could end up before libarrow.a in the final link line. Linkers that resolve symbols strictly left-to-right (gcc8-test in CI) then fail linking paimon-fs-test with "undefined reference to dlsym / DSO missing from command line" once fs_test started linking the jindo static libraries. Declare ${CMAKE_DL_LIBS} on the arrow interface, matching the lucene and jindosdk::nextarch targets. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
1 parent 991db0b commit d37e1da

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

cmake_modules/ThirdpartyToolchain.cmake

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1636,13 +1636,16 @@ macro(build_arrow)
16361636

16371637
target_link_libraries(arrow_dataset INTERFACE arrow_acero)
16381638

1639+
# libarrow.a calls dlsym; keep ${CMAKE_DL_LIBS} in the interface so -ldl is placed
1640+
# after libarrow.a on linkers that resolve symbols strictly left-to-right.
16391641
target_link_libraries(arrow
16401642
INTERFACE zstd
16411643
snappy
16421644
lz4
16431645
zlib
16441646
re2::re2
1645-
arrow_bundled_dependencies)
1647+
arrow_bundled_dependencies
1648+
${CMAKE_DL_LIBS})
16461649

16471650
target_link_libraries(parquet
16481651
INTERFACE zstd

0 commit comments

Comments
 (0)