You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@arrow.apache.org by ko...@apache.org on 2026/02/20 13:18:22 UTC

(arrow) branch main updated: GH-41624: [C++] Add missing system Boost dependency to bundled Apache Thrift (#49346)

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 b7ed8df53b GH-41624: [C++] Add missing system Boost dependency to bundled Apache Thrift (#49346)
b7ed8df53b is described below

commit b7ed8df53b7f2553578b34f867f4c6c036ca45eb
Author: Sutou Kouhei <ko...@clear-code.com>
AuthorDate: Fri Feb 20 22:18:15 2026 +0900

    GH-41624: [C++] Add missing system Boost dependency to bundled Apache Thrift (#49346)
    
    ### Rationale for this change
    
    Some public headers in Apache Thrift depend on Boost. So our bundled Apache Thrift CMake target must depend on Boost. We set it for system Apache Thrift but doesn't for bundled Apache Thrift + system Boost.
    
    ### What changes are included in this PR?
    
    * Add `Boost::headers` dependencies to bundled Apache Thrift even when we use system Boost.
    * Remove redundant `Boost::headers` dependency from `PARQUET_TEST_LINK_LIBS`.
    
    ### Are these changes tested?
    
    Yes.
    
    ### Are there any user-facing changes?
    
    Yes.
    * GitHub Issue: #41624
    
    Authored-by: Sutou Kouhei <ko...@clear-code.com>
    Signed-off-by: Sutou Kouhei <ko...@clear-code.com>
---
 cpp/cmake_modules/ThirdpartyToolchain.cmake | 2 ++
 cpp/src/parquet/CMakeLists.txt              | 2 +-
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/cpp/cmake_modules/ThirdpartyToolchain.cmake b/cpp/cmake_modules/ThirdpartyToolchain.cmake
index e84b2accb8..935584c534 100644
--- a/cpp/cmake_modules/ThirdpartyToolchain.cmake
+++ b/cpp/cmake_modules/ThirdpartyToolchain.cmake
@@ -1833,6 +1833,8 @@ function(build_thrift)
   if(BOOST_VENDORED)
     target_link_libraries(thrift PUBLIC $<BUILD_LOCAL_INTERFACE:Boost::headers>)
     target_link_libraries(thrift PRIVATE $<BUILD_LOCAL_INTERFACE:arrow::Boost::locale>)
+  else()
+    target_link_libraries(thrift INTERFACE Boost::headers)
   endif()
 
   add_library(thrift::thrift INTERFACE IMPORTED)
diff --git a/cpp/src/parquet/CMakeLists.txt b/cpp/src/parquet/CMakeLists.txt
index 6c1550dcc2..0c0bd98966 100644
--- a/cpp/src/parquet/CMakeLists.txt
+++ b/cpp/src/parquet/CMakeLists.txt
@@ -124,7 +124,7 @@ else()
   set(PARQUET_STATIC_INSTALL_INTERFACE_LIBS)
 endif()
 
-set(PARQUET_TEST_LINK_LIBS ${ARROW_TEST_LINK_LIBS} thrift::thrift Boost::headers)
+set(PARQUET_TEST_LINK_LIBS ${ARROW_TEST_LINK_LIBS} thrift::thrift)
 if(APPLE)
   list(APPEND PARQUET_TEST_LINK_LIBS ${CMAKE_DL_LIBS})
 elseif(NOT MSVC)