RUSLoker opened a new pull request, #48852:
URL: https://github.com/apache/arrow/pull/48852

   ### Rationale for this change
   When I tried to build arrow with bundled Thrift enabled with Boost installed 
in a system it always fails with an error like following:
   ```
   Building CXX object 
src/parquet/CMakeFiles/parquet_objlib.dir/bloom_filter.cc.o
   FAILED: src/parquet/CMakeFiles/parquet_objlib.dir/bloom_filter.cc.o
    /usr/local/bin/c++ -DARROW_HAVE_RUNTIME_AVX2 -DARROW_HAVE_RUNTIME_AVX512 
-DARROW_HAVE_RUNTIME_BMI2 -DARROW_HAVE_RUNTIME_SSE4_2 -DARROW_HAVE_SSE4_2 
-DARROW_WITH_TIMING_TESTS -DHAVE_INTTYPES_H -DHAVE_NETDB_H -DHAVE_NETINET_IN_H 
-DPARQUET_EXPORTING -DPARQUET_THRIFT_VERSION_MAJOR=0 
-DPARQUET_THRIFT_VERSION_MINOR=22 -I/arrow/cpp/build/src -I/arrow/cpp/src 
-I/arrow/cpp/src/generated -isystem 
/arrow/cpp/build/xsimd_ep/src/xsimd_ep-install/include -isystem 
/arrow/cpp/build/rapidjson_ep/src/rapidjson_ep-install/include -isystem 
/arrow/cpp/build/_deps/thrift-build -isystem 
/arrow/cpp/build/_deps/thrift-src/lib/cpp/src -Wno-noexcept-type -Wno-self-move 
 -fdiagnostics-color=always  -Wall -fno-semantic-interposition -msse4.2   -O3 
-O2 -ftree-vectorize  -std=c++17 -flto=auto -fno-fat-lto-objects -fPIC -MD -MT 
src/parquet/CMakeFiles/parquet_objlib.dir/bloom_filter.cc.o -MF 
src/parquet/CMakeFiles/parquet_objlib.dir/bloom_filter.cc.o.d -o 
src/parquet/CMakeFiles/parquet_objlib.dir/bloom_filter.cc.
 o -c /arrow/cpp/src/parquet/bloom_filter.cc
   In file included from 
/arrow/cpp/build/_deps/thrift-src/lib/cpp/src/thrift/transport/TTransport.h:25,
                    from 
/arrow/cpp/build/_deps/thrift-src/lib/cpp/src/thrift/protocol/TProtocol.h:46,
                    from 
/arrow/cpp/build/_deps/thrift-src/lib/cpp/src/thrift/TBase.h:24,
                    from /arrow/cpp/src/generated/parquet_types.h:14,
                    from /arrow/cpp/src/parquet/bloom_filter.cc:26:
   
/arrow/cpp/build/_deps/thrift-src/lib/cpp/src/thrift/transport/TTransportException.h:23:10:
 fatal error: boost/numeric/conversion/cast.hpp: No such file or directory
      23 | #include <boost/numeric/conversion/cast.hpp>
         |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   compilation terminated.
   ```
   
   As I found out it happens because the `Boost::headers` is not properly 
linked to the thrift library so it could be linked as a transitive dependency 
when it's built by the project .
   
   ### What changes are included in this PR?
   - added the `headers` to the `ARROW_BOOST_COMPONENTS` in 
`cpp/cmake_modules/ThirdpartyToolchain.cmake`;
   - added linking over the `Boost::headers` in the `build_thrift` function  in 
`cpp/cmake_modules/ThirdpartyToolchain.cmake`.
   
   ### Are these changes tested?
   Yes.
   
   ### Are there any user-facing changes?
   No.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to