Skip to content

Commit ad5166c

Browse files
committed
Remove debugging inf and trying to lik ORC publicly to propagate protobuf symbols
1 parent f4a987c commit ad5166c

2 files changed

Lines changed: 9 additions & 25 deletions

File tree

cpp/cmake_modules/BuildUtils.cmake

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -395,17 +395,6 @@ function(ADD_ARROW_LIB LIB_NAME)
395395
PUBLIC "$<BUILD_INTERFACE:${ARG_SHARED_LINK_LIBS}>"
396396
"$<INSTALL_INTERFACE:${ARG_SHARED_INSTALL_INTERFACE_LIBS}>"
397397
PRIVATE ${ARG_SHARED_PRIVATE_LINK_LIBS})
398-
message(STATUS "DEBUG ${LIB_NAME}_shared PRIVATE link libs: ${ARG_SHARED_PRIVATE_LINK_LIBS}"
399-
)
400-
get_target_property(_link_libs ${LIB_NAME}_shared LINK_LIBRARIES)
401-
message(STATUS "DEBUG ${LIB_NAME}_shared LINK_LIBRARIES: ${_link_libs}")
402-
if(TARGET protobuf::libprotobuf)
403-
get_target_property(_pb_type protobuf::libprotobuf TYPE)
404-
get_target_property(_pb_loc protobuf::libprotobuf IMPORTED_LOCATION)
405-
get_target_property(_pb_loc2 protobuf::libprotobuf LOCATION)
406-
message(STATUS "DEBUG protobuf::libprotobuf TYPE=${_pb_type} IMPORTED_LOCATION=${_pb_loc} LOCATION=${_pb_loc2}"
407-
)
408-
endif()
409398

410399
if(USE_OBJLIB)
411400
# Ensure that dependencies are built before compilation of objects in

cpp/src/arrow/CMakeLists.txt

Lines changed: 9 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1018,22 +1018,20 @@ if(ARROW_ORC)
10181018
arrow_add_object_library(ARROW_ORC adapters/orc/adapter.cc adapters/orc/options.cc
10191019
adapters/orc/util.cc)
10201020
foreach(ARROW_ORC_TARGET ${ARROW_ORC_TARGETS})
1021-
target_link_libraries(${ARROW_ORC_TARGET} PRIVATE orc::orc)
1021+
# Link ORC as PUBLIC so that orc.lib and its dependencies (protobuf)
1022+
# propagate to the consuming target (arrow_shared). PRIVATE deps of
1023+
# OBJECT libraries are not propagated on MSVC, which causes unresolved
1024+
# protobuf symbols when linking arrow.dll.
1025+
if(MSVC)
1026+
target_link_libraries(${ARROW_ORC_TARGET} PUBLIC orc::orc)
1027+
else()
1028+
target_link_libraries(${ARROW_ORC_TARGET} PRIVATE orc::orc)
1029+
endif()
10221030
if(ARROW_ORC_VERSION VERSION_LESS "2.0.0")
10231031
target_compile_definitions(${ARROW_ORC_TARGET}
10241032
PRIVATE ARROW_ORC_NEED_TIME_ZONE_DATABASE_CHECK)
10251033
endif()
10261034
endforeach()
1027-
# On Windows (MSVC), ORC links protobuf PRIVATE so protobuf symbols
1028-
# don't propagate through the OBJECT library chain to arrow.dll.
1029-
# Add protobuf directly to ensure it appears on the link line.
1030-
if(MSVC)
1031-
list(APPEND ARROW_SHARED_PRIVATE_LINK_LIBS ${ARROW_PROTOBUF_LIBPROTOBUF})
1032-
endif()
1033-
message(STATUS "DEBUG ORC: MSVC=${MSVC}")
1034-
message(STATUS "DEBUG ORC: ARROW_PROTOBUF_LIBPROTOBUF=${ARROW_PROTOBUF_LIBPROTOBUF}")
1035-
message(STATUS "DEBUG ORC: ARROW_SHARED_PRIVATE_LINK_LIBS=${ARROW_SHARED_PRIVATE_LINK_LIBS}"
1036-
)
10371035
else()
10381036
set(ARROW_ORC_TARGET_SHARED)
10391037
set(ARROW_ORC_TARGET_STATIC)
@@ -1106,9 +1104,6 @@ else()
11061104
set(ARROW_PC_REQUIRES "")
11071105
endif()
11081106

1109-
message(STATUS "DEBUG ARROW_LIB: ARROW_SHARED_PRIVATE_LINK_LIBS=${ARROW_SHARED_PRIVATE_LINK_LIBS}"
1110-
)
1111-
message(STATUS "DEBUG ARROW_LIB: ARROW_ORC_TARGET_SHARED=${ARROW_ORC_TARGET_SHARED}")
11121107
add_arrow_lib(arrow
11131108
CMAKE_PACKAGE_NAME
11141109
Arrow

0 commit comments

Comments
 (0)