Skip to content

Conversation

@RUSLoker
Copy link

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.

@github-actions
Copy link

Thanks for opening a pull request!

If this is not a minor PR. Could you open an issue for this pull request on GitHub? https://github.com/apache/arrow/issues/new/choose

Opening GitHub issues ahead of time contributes to the Openness of the Apache Arrow project.

Then could you also rename the pull request title in the following format?

GH-${GITHUB_ISSUE_ID}: [${COMPONENT}] ${SUMMARY}

or

MINOR: [${COMPONENT}] ${SUMMARY}

See also:

Copy link
Member

@raulcd raulcd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR. We only push changes to main and if necessary cherry-pick on maintenance branches to perform new releases. Can you change the base branch on this PR? Could you also open an issue?

@RUSLoker
Copy link
Author

I have faced this problem when I built 22.0.0. I will try it at the main branch. If there still will be such a problem I will make an issue and pr again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants