Open barracuda156 opened 10 months ago
This also fails with GCC:
[ 46%] Building CXX object tiledb/api/c_api_support/exception_wrapper/test/CMakeFiles/unit_capi_exception_wrapper.dir/unit_capi_error_tree.cc.o
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_databases_tiledb/tiledb/work/TileDB-2.19.1/tiledb/api/c_api_support/exception_wrapper/test/unit_capi_error_tree.cc: In function 'void CATCH2_INTERNAL_TEST_12()':
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_databases_tiledb/tiledb/work/TileDB-2.19.1/tiledb/api/c_api_support/exception_wrapper/test/unit_capi_error_tree.cc:314:65: error: call of overloaded 'ErrorTreeTest(<brace-enclosed initializer list>)' is ambiguous
314 | ErrorTreeTest x{{{Error{"a", "b"}, {}}, {Error{"c", "d"}, {}}}};
| ^
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_databases_tiledb/tiledb/work/TileDB-2.19.1/tiledb/api/c_api_support/exception_wrapper/test/unit_capi_error_tree.cc:289:3: note: candidate: 'ErrorTreeTest::ErrorTreeTest(vector_type)'
289 | ErrorTreeTest(vector_type x)
| ^~~~~~~~~~~~~
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_databases_tiledb/tiledb/work/TileDB-2.19.1/tiledb/api/c_api_support/exception_wrapper/test/unit_capi_error_tree.cc:286:3: note: candidate: 'ErrorTreeTest::ErrorTreeTest(Error)'
286 | ErrorTreeTest(Error e)
| ^~~~~~~~~~~~~
gmake[7]: *** [tiledb/api/c_api_support/exception_wrapper/test/CMakeFiles/unit_capi_exception_wrapper.dir/build.make:90: tiledb/api/c_api_support/exception_wrapper/test/CMakeFiles/unit_capi_exception_wrapper.dir/unit_capi_error_tree.cc.o] Error 1
@eric-hughes-tiledb Could you take a look? This does not seem to work on macOS. It just fails to build with GCC on my old testing system and fails to link on Sonoma.
On a side-note, this test, like a few others, needs to link against libatomic
for some archs (ppc, arm, mips):
[ 46%] Building CXX object tiledb/api/c_api_support/exception_wrapper/test/CMakeFiles/unit_capi_exception_wrapper.dir/unit_capi_error_tree.cc.o
[ 47%] Linking CXX executable unit_capi_exception_wrapper
ld: warning: __ZN5Catch6Detail10unique_ptrINS_12ITestInvokerEED1Ev has different visibility (default) in /opt/local/lib/libCatch2.a(catch_registry_hub.cpp.o) and (hidden) in CMakeFiles/unit_capi_exception_wrapper.dir/unit_capi_exception_wrapper.cc.o
Undefined symbols:
"___atomic_fetch_add_8", referenced from:
__ZNSt13__atomic_baseIyEppEv in context.cc.o
ld: symbol(s) not found
collect2: error: ld returned 1 exit status
gmake[7]: *** [tiledb/api/c_api_support/exception_wrapper/test/CMakeFiles/unit_capi_exception_wrapper.dir/build.make:156: tiledb/api/c_api_support/exception_wrapper/test/unit_capi_exception_wrapper] Error 1
The missing symbols Catch::StringMaker
, etc. are entirely in the Catch2 library. We use it in header-only mode, which does not have this issue. My best guess, with limited information, is that (1) you've got a system-installed catch which uses a linked library, and (2) the build is picking up the system version, and thus (3) there's a missing library.
As for the GCC failure, which version? Our code does not compile on older versions.
@eric-hughes-tiledb Thank you for responding!
Unfortunately, building against bundled Catch2 fails for me: https://github.com/TileDB-Inc/TileDB/issues/4095 So I had to use an external one (and your guess is correct).
As for the GCC failure, which version? Our code does not compile on older versions.
gcc 13.2.0, recent enough, hopefully.
@eric-hughes-tiledb Another Catch2-related error:
[ 82%] Building CXX object test/CMakeFiles/tiledb_unit.dir/src/unit.cc.o
In file included from /opt/local/include/catch2/internal/catch_commandline.hpp:11,
from /opt/local/include/catch2/catch_session.hpp:11,
from /opt/local/include/catch2/catch_all.hpp:33,
from /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_databases_tiledb/tiledb/work/TileDB-2.19.1/test/../test/support/tdb_catch.h:56,
from /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_databases_tiledb/tiledb/work/TileDB-2.19.1/test/src/unit.cc:2:
/opt/local/include/catch2/internal/catch_clara.hpp: In instantiation of 'Catch::Clara::Parser Catch::Clara::operator|(const Parser&, T&&) [with T = Opt]':
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_databases_tiledb/tiledb/work/TileDB-2.19.1/test/src/unit.cc:40:65: required from here
/opt/local/include/catch2/internal/catch_clara.hpp:676:24: error: cannot bind non-const lvalue reference of type 'Catch::Clara::Parser&' to an rvalue of type 'Catch::Clara::Parser'
676 | return Parser( p ) |= CATCH_FORWARD(rhs);
| ^~~~~~~~~~~
/opt/local/include/catch2/internal/catch_clara.hpp:667:48: note: initializing argument 1 of 'Catch::Clara::Parser& Catch::Clara::operator|=(Parser&, Opt&&)'
667 | friend Parser& operator|=( Parser& p, Opt&& opt ) {
| ~~~~~~~~^
gmake[7]: *** [test/CMakeFiles/tiledb_unit.dir/build.make:2008: test/CMakeFiles/tiledb_unit.dir/src/unit.cc.o] Error 1
Or is this rather a bug in Catch2 itself?
UPD. This one is a Catch2 bug indeed, but fixed as of 3.5.2.
OS info:
Versions used: