Skip to content

Commit c5606c5

Browse files
authored
[fix](thirdparty) add Thrift_VERSION fallback in paimon-cpp arrow patch (#60711)
## Summary - update `thirdparty/patches/paimon-cpp-buildutils-static-deps.patch` - add `Thrift_VERSION` fallback resolution in the embedded `cmake_modules/arrow.diff` hunk - keep a clear fatal error when no thrift version source is available ## Why On different environments, thrift version metadata may be exposed via different variables (`thrift_PC_VERSION`, `ThriftAlt_VERSION`, or `THRIFT_VERSION`). Without fallback, `Thrift_VERSION` can be empty and break Arrow configure. ## Testing - rebuilt thirdparty package: `bash thirdparty/build-thirdparty.sh paimon_cpp` - build completed successfully (`Finished to build all thirdparties`)
1 parent e13d314 commit c5606c5

File tree

1 file changed

+33
-0
lines changed

1 file changed

+33
-0
lines changed

thirdparty/patches/paimon-cpp-buildutils-static-deps.patch

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,3 +146,36 @@ diff --git a/src/paimon/format/blob/blob_format_writer.cpp b/src/paimon/format/b
146146
}
147147

148148
// write bin length
149+
150+
--- a/cmake_modules/arrow.diff
151+
+++ b/cmake_modules/arrow.diff
152+
@@ -196,3 +196,29 @@
153+
int64_t pagesize_;
154+
ParquetDataPageVersion parquet_data_page_version_;
155+
ParquetVersion::type parquet_version_;
156+
+diff --git a/cpp/cmake_modules/ThirdpartyToolchain.cmake b/cpp/cmake_modules/ThirdpartyToolchain.cmake
157+
+index 9df922afa2..5c8b3d4d07 100644
158+
+--- a/cpp/cmake_modules/ThirdpartyToolchain.cmake
159+
++++ b/cpp/cmake_modules/ThirdpartyToolchain.cmake
160+
+@@ -1789,7 +1789,20 @@ if(ARROW_WITH_THRIFT)
161+
+ REQUIRED_VERSION
162+
+ 0.11.0)
163+
+
164+
+- string(REPLACE "." ";" Thrift_VERSION_LIST ${Thrift_VERSION})
165+
++ if(NOT Thrift_VERSION)
166+
++ if(DEFINED thrift_PC_VERSION AND thrift_PC_VERSION)
167+
++ set(Thrift_VERSION "${thrift_PC_VERSION}")
168+
++ elseif(DEFINED ThriftAlt_VERSION AND ThriftAlt_VERSION)
169+
++ set(Thrift_VERSION "${ThriftAlt_VERSION}")
170+
++ elseif(DEFINED THRIFT_VERSION AND THRIFT_VERSION)
171+
++ set(Thrift_VERSION "${THRIFT_VERSION}")
172+
++ endif()
173+
++ endif()
174+
++ if(NOT Thrift_VERSION)
175+
++ message(FATAL_ERROR "Thrift_VERSION is empty after resolving Thrift dependency")
176+
++ endif()
177+
++
178+
++ string(REPLACE "." ";" Thrift_VERSION_LIST "${Thrift_VERSION}")
179+
+ list(GET Thrift_VERSION_LIST 0 Thrift_VERSION_MAJOR)
180+
+ list(GET Thrift_VERSION_LIST 1 Thrift_VERSION_MINOR)
181+
+ list(GET Thrift_VERSION_LIST 2 Thrift_VERSION_PATCH)

0 commit comments

Comments
 (0)