Skip to content

Commit 9d92dbb

Browse files
committed
cmake: BuildArrow.cmake uses bundled thrift if system version < 0.17
the bump to arrow 17.0.0 broke the ubuntu jammy builds with: In file included from /usr/include/thrift/transport/TTransport.h:25, from /usr/include/thrift/protocol/TProtocol.h:28, from /usr/include/thrift/TBase.h:24, from /build/ceph-20.3.0-3599-g3d863d32/src/arrow/cpp/src/generated/parquet_types.h:14, from /build/ceph-20.3.0-3599-g3d863d32/src/arrow/cpp/src/generated/parquet_constants.h:10, from /build/ceph-20.3.0-3599-g3d863d32/src/arrow/cpp/src/generated/parquet_constants.cpp:7: /usr/include/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. when comparing the gcc command line with arrow-15.0.0, the following argument is no longer present: > -isystem /build/ceph-20.3.0-3402-gb2db4947/obj-x86_64-linux-gnu/boost/include arrow 17.0.0 seems to assume that thrift doesn't depend on boost anymore. a comment in apache/arrow#32266 claims that > we don't need Boost with system Thrift 0.17.0 or later but our jammy builds are stuck with libthrift-0.16.0. to reenable jammy builds, instruct Arrow's cmake to use its bundled thrift dependency if our system thrift version is < 0.17.0 Signed-off-by: Casey Bodley <[email protected]>
1 parent dd868a9 commit 9d92dbb

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

cmake/modules/BuildArrow.cmake

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,13 @@ function(build_arrow)
1616
list(APPEND arrow_CMAKE_ARGS -DARROW_JEMALLOC=OFF)
1717

1818
# transitive dependencies
19-
list(APPEND arrow_INTERFACE_LINK_LIBRARIES thrift)
19+
if (thrift_VERSION VERSION_GREATER_EQUAL 0.17)
20+
# build arrow with system thrift, and include the transitive dependency on the Arrow::Arrow target
21+
list(APPEND arrow_INTERFACE_LINK_LIBRARIES thrift)
22+
else()
23+
# build arrow with bundled thrift to work around missing boost dependency
24+
list(APPEND arrow_CMAKE_ARGS -DThrift_SOURCE=BUNDLED -DARROW_THRIFT_USE_SHARED=OFF)
25+
endif()
2026

2127
if (NOT WITH_SYSTEM_UTF8PROC)
2228
# forward utf8proc_ROOT from build_utf8proc()

0 commit comments

Comments
 (0)