Created attachment 249479 [details] poudriere log The port fails to build on FreeBSD-13.2-amd64. See attached log for more: ... Run Build Command(s): /usr/local/bin/ninja -v cmTC_a04fe [1/2] /usr/local/llvm17/bin/clang++ -DGTEST_LINKED_AS_SHARED_LIBRARY=1 -O2 -pipe -fstack-protector-strong -isystem /usr/local/include -fno-strict-aliasing -isystem /usr/local/include -Qunused-arguments -fcolor-diagnostics -std=c++17 -fPIE -pthread -MD -MT CMakeFiles/cmTC_a04fe.dir/gtest_cxx_standard_test.cc.o -MF CMakeFiles/cmTC_a04fe.dir/gtest_cxx_standard_test.cc.o.d -o CMakeFiles/cmTC_a04fe.dir/gtest_cxx_standard_test.cc.o -c /wrkdirs/usr/ports/databases/arrow/work/.build/gtest_cxx_standard_test.cc [2/2] : && /usr/local/llvm17/bin/clang++ -O2 -pipe -fstack-protector-strong -isystem /usr/local/include -fno-strict-aliasing -isystem /usr/local/include -Qunused-arguments -fcolor-diagnostics -fstack-protector-strong CMakeFiles/cmTC_a04fe.dir/gtest_cxx_standard_test.cc.o -o cmTC_a04fe -Wl,-rpath,/usr/local/lib /usr/local/lib/libgtest_main.so.1.14.0 /usr/local/lib/libgtest.so.1.14.0 -pthread && : FAILED: cmTC_a04fe : && /usr/local/llvm17/bin/clang++ -O2 -pipe -fstack-protector-strong -isystem /usr/local/include -fno-strict-aliasing -isystem /usr/local/include -Qunused-arguments -fcolor-diagnostics -fstack-protector-strong CMakeFiles/cmTC_a04fe.dir/gtest_cxx_standard_test.cc.o -o cmTC_a04fe -Wl,-rpath,/usr/local/lib /usr/local/lib/libgtest_main.so.1.14.0 /usr/local/lib/libgtest.so.1.14.0 -pthread && : ld: error: undefined symbol: testing::Matcher<std::__1::basic_string_view<char, std::__1::char_traits<char>>>::Matcher(std::__1::basic_string_view<char, std::__1::char_traits<char>>) >>> referenced by gtest_cxx_standard_test.cc >>> CMakeFiles/cmTC_a04fe.dir/gtest_cxx_standard_test.cc.o:(CXX_STANDARD_MatcherStringView_Test::TestBody()) clang++: error: linker command failed with exit code 1 (use -v to see invocation) ninja: build stopped: subcommand failed. ...
I can't reproduce the failure on 13.3-RELEASE. See the log: https://freebsd.org/~yuri/arrow-15.0.2-on-13.3-RELEASE.log
Does it have to succeed on 13.2 when it succeeds on 13.3? Release 13.3 (March 5, 2024) is a recent release, and it should be sufficient that it succeeds on 13.3.
We still support 13.2 for three more months. Many packages depend on arrow and will now break.
(In reply to Palle Girgensohn from comment #3) Ok, I will try to reproduce on 13.2.
Seems here's where it happens: -- Found ThriftAlt: /usr/local/lib/libthrift.so (found suitable version "0.16.0", minimum required is "0.11.0") -- Providing CMake module for FindThriftAlt as part of Parquet CMake package -- Found GTest: /usr/local/lib/cmake/GTest/GTestConfig.cmake (found suitable version "1.14.0", minimum required is "1.10.0") -- GTest can't be used with C++17. -- Use -DGTest_SOURCE=BUNDLED. -- Output: Change Dir: '/wrkdirs/usr/ports/databases/arrow/work/.build/CMakeFiles/CMakeTmp' ``` -- Use -DGTest_SOURCE=BUNDLED. ``` seems like it could be a valuable tip?
Seems that turning off the TESTING knob works as a work-around. Adding TESTING_CMAKE_ON= -DGTest_SOURCE=BUNDLED conditionally for ${OSVERSION} < 133000 could possibly fix this. I'm testing it now.
I tried this diff --git a/databases/arrow/Makefile b/databases/arrow/Makefile index 3df2af72231d..e43ccd0a6313 100644 --- a/databases/arrow/Makefile +++ b/databases/arrow/Makefile @@ -186,6 +186,10 @@ OPTIONS_DEFAULT+= ${opt} .include <bsd.port.options.mk> +.if ${PORT_OPTIONS:MTESTING} && ${OPSYS} == FreeBSD && ${OSVERSION} < 1303000 +CMAKE_ARGS+= -DGTest_SOURCE=BUNDLED +.endif + .if ${PORT_OPTIONS:MCOMPUTE} || ${PORT_OPTIONS:MFLIGHT} || ${PORT_OPTIONS:MGANDIVA} PLIST_FILES+= lib/cmake/Arrow/Findre2Alt.cmake .endif but it does not help. Perhaps the simple solution is to remove TESTING from the default setup? Hence, this is my suggestion, at least until 13.2 is EoL, June 30: diff --git a/databases/arrow/Makefile b/databases/arrow/Makefile index 3df2af72231d..d02763344b6d 100644 --- a/databases/arrow/Makefile +++ b/databases/arrow/Makefile @@ -30,7 +30,7 @@ CMAKE_OFF= ARROW_BUILD_STATIC ARROW_WITH_BACKTRACE ARROW_BUILD_TESTS ARROW_BUILD OPTIONS_GROUP= COMPRESSION COMPONENTS # components are listed in cpp/cmake_modules/DefineOptions.cmake OPTIONS_GROUP_COMPRESSION= BROTLI BZ2 LZ4 SNAPPY ZLIB ZSTD -OPTIONS_GROUP_COMPONENTS= ACERO COMPUTE CSV DATASET FILESYSTEM FLIGHT GANDIVA HDFS IPC JSON MIMALLOC PARQUET ORC S3 SKYHOOK SUBSTRAIT BUILD_UTILITIES TENSORFLOW TESTING +OPTIONS_GROUP_COMPONENTS= ACERO COMPUTE CSV DATASET FILESYSTEM FLIGHT GANDIVA HDFS IPC JSON MIMALLOC PARQUET ORC S3 SKYHOOK SUBSTRAIT BUILD_UTILITIES TENSORFLOW OPTIONS_SUB= yes ## DESCs
The core reason is that googletest is compiled with C++ level less than 17, and symbols aren't compatible with code compiled with C++17. Some other ports suffer from the same problem due to other dependencies. I will mark TESTING broken on 13.2.
Fixed. Thanks for your report!
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=bd78a1b4103aedc78d22c173685d9938ad8b8986 commit bd78a1b4103aedc78d22c173685d9938ad8b8986 Author: Yuri Victorovich <yuri@FreeBSD.org> AuthorDate: 2024-03-27 20:13:29 +0000 Commit: Yuri Victorovich <yuri@FreeBSD.org> CommitDate: 2024-03-27 20:16:27 +0000 databases/arrow: Fix build on 13.2 The TESTING option (enabling the TESTING module) is disabled due to googletest incompatibility with C++17 -compiled code on 13.2 PR: 277953 Reported by: Palle Girgensohn <girgen@FreeBSD.org> databases/arrow/Makefile | 8 ++++++++ 1 file changed, 8 insertions(+)