This is an automated email from the ASF dual-hosted git repository.
kou pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/arrow.git
The following commit(s) were added to refs/heads/main by this push:
new e51f442a70 GH-37116: [C++][ORC] Link to absl::log_internal_check_op
for ABSL_DCHECK*() (#37117)
e51f442a70 is described below
commit e51f442a708deb4ee15f932e19e1cb8375f28c18
Author: Sutou Kouhei <[email protected]>
AuthorDate: Fri Aug 11 10:05:27 2023 +0900
GH-37116: [C++][ORC] Link to absl::log_internal_check_op for ABSL_DCHECK*()
(#37117)
### Rationale for this change
Recent protoc generates files that use ABSL_DCHECK*(). At least 3.21.12
doesn't use ABSL_DCHECK*() and 23.4 uses ABSL_DCHECK*().
If ABSL_DCHECK*() are used, we need to link to absl::log_internal_check_op.
### What changes are included in this PR?
Link to absl::log_internal_check_op if possible.
### Are these changes tested?
Yes.
### Are there any user-facing changes?
No.
* Closes: #37116
Authored-by: Sutou Kouhei <[email protected]>
Signed-off-by: Sutou Kouhei <[email protected]>
---
.github/workflows/cpp.yml | 3 +--
cpp/cmake_modules/ThirdpartyToolchain.cmake | 5 +++++
2 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/.github/workflows/cpp.yml b/.github/workflows/cpp.yml
index eaccf25403..fb76faa529 100644
--- a/.github/workflows/cpp.yml
+++ b/.github/workflows/cpp.yml
@@ -164,8 +164,7 @@ jobs:
ARROW_HDFS: ON
ARROW_HOME: /usr/local
ARROW_JEMALLOC: ON
- # TODO(kszucs): link error in the tests
- ARROW_ORC: OFF
+ ARROW_ORC: ON
ARROW_PARQUET: ON
ARROW_S3: ON
ARROW_WITH_BROTLI: ON
diff --git a/cpp/cmake_modules/ThirdpartyToolchain.cmake
b/cpp/cmake_modules/ThirdpartyToolchain.cmake
index 1e7840cf92..4422e17e85 100644
--- a/cpp/cmake_modules/ThirdpartyToolchain.cmake
+++ b/cpp/cmake_modules/ThirdpartyToolchain.cmake
@@ -4399,6 +4399,11 @@ macro(build_orc)
PROPERTIES IMPORTED_LOCATION "${ORC_STATIC_LIB}"
INTERFACE_INCLUDE_DIRECTORIES
"${ORC_INCLUDE_DIR}")
set(ORC_LINK_LIBRARIES LZ4::lz4 ZLIB::ZLIB ${ARROW_ZSTD_LIBZSTD}
${Snappy_TARGET})
+ # Protobuf generated files may use ABSL_DCHECK*() and
+ # absl::log_internal_check_op is needed for them.
+ if(TARGET absl::log_internal_check_op)
+ list(APPEND ORC_LINK_LIBRARIES absl::log_internal_check_op)
+ endif()
if(NOT MSVC)
if(NOT APPLE)
list(APPEND ORC_LINK_LIBRARIES Threads::Threads)