From 8e33bc955982e59549fbfe94e26d524f27e8841d Mon Sep 17 00:00:00 2001 From: =?utf8?q?Lukas=20M=C3=A4rdian?= Date: Sat, 19 Nov 2022 10:33:48 +0000 Subject: [PATCH] Fix 'catch' & 'catch2' compatibility with glibc-2.34 Origin: vendor, Ubuntu Bug: https://github.com/potassco/libpotassco/issues/12 (only catch1 part) Last-Update: 2022-01-18 The gringo package contains several embedded copies of the 'catch' (CTest) library. All of those copies are outdated and incompatible with glibc-2.34. This patch updates the test sources to use the system provided versions of 'catch' and 'catch2' instead, to fix this issue. C.f.: https://github.com/catchorg/Catch2/issues/2178 Last-Update: 2022-01-18 Gbp-Pq: Name use-system-catch-for-glibc-2.34-compat.patch --- clasp/libpotassco/tests/main.cpp | 2 +- clasp/libpotassco/tests/test_application.cpp | 2 +- clasp/libpotassco/tests/test_aspif.cpp | 2 +- clasp/libpotassco/tests/test_options.cpp | 2 +- clasp/libpotassco/tests/test_smodels.cpp | 2 +- clasp/libpotassco/tests/test_string_convert.cpp | 2 +- clasp/libpotassco/tests/test_text.cpp | 2 +- clasp/libpotassco/tests/test_value.cpp | 2 +- clasp/tests/clause_creator_test.cpp | 2 +- clasp/tests/clause_test.cpp | 2 +- clasp/tests/cli_test.cpp | 2 +- clasp/tests/decision_heuristic_test.cpp | 2 +- clasp/tests/dependency_graph_test.cpp | 2 +- clasp/tests/dlp_builder_test.cpp | 2 +- clasp/tests/enumerator_test.cpp | 2 +- clasp/tests/facade_test.cpp | 2 +- clasp/tests/literal_test.cpp | 2 +- clasp/tests/minimize_test.cpp | 2 +- clasp/tests/parser_test.cpp | 2 +- clasp/tests/program_builder_test.cpp | 2 +- clasp/tests/rule_test.cpp | 2 +- clasp/tests/satelite_test.cpp | 2 +- clasp/tests/solver_test.cpp | 2 +- clasp/tests/test_main.cpp | 2 +- clasp/tests/unfounded_check_test.cpp | 2 +- clasp/tests/weight_constraint_test.cpp | 2 +- libclingo/tests/main.cc | 2 +- libclingo/tests/tests.hh | 2 +- libgringo/tests/main.cc | 2 +- libgringo/tests/tests.hh | 2 +- libreify/tests/main.cc | 2 +- libreify/tests/program.cc | 2 +- 32 files changed, 32 insertions(+), 32 deletions(-) diff --git a/clasp/libpotassco/tests/main.cpp b/clasp/libpotassco/tests/main.cpp index 36731dc..13b8722 100644 --- a/clasp/libpotassco/tests/main.cpp +++ b/clasp/libpotassco/tests/main.cpp @@ -16,4 +16,4 @@ int enableDebugHeap() { static int eh = enableDebugHeap(); #endif #define CATCH_CONFIG_MAIN // This tells Catch to provide a main() - only do this in one cpp file -#include "catch.hpp" +#include diff --git a/clasp/libpotassco/tests/test_application.cpp b/clasp/libpotassco/tests/test_application.cpp index 6097360..fd7ffe5 100644 --- a/clasp/libpotassco/tests/test_application.cpp +++ b/clasp/libpotassco/tests/test_application.cpp @@ -18,7 +18,7 @@ // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS // IN THE SOFTWARE. -#include "catch.hpp" +#include #include #include #include diff --git a/clasp/libpotassco/tests/test_aspif.cpp b/clasp/libpotassco/tests/test_aspif.cpp index 00762f8..fdb0a2f 100644 --- a/clasp/libpotassco/tests/test_aspif.cpp +++ b/clasp/libpotassco/tests/test_aspif.cpp @@ -24,7 +24,7 @@ #ifdef _MSC_VER #pragma warning (disable : 4996) #endif -#include "catch.hpp" +#include #include "test_common.h" #include #include diff --git a/clasp/libpotassco/tests/test_options.cpp b/clasp/libpotassco/tests/test_options.cpp index 32d9d4d..a9215d2 100644 --- a/clasp/libpotassco/tests/test_options.cpp +++ b/clasp/libpotassco/tests/test_options.cpp @@ -18,7 +18,7 @@ // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS // IN THE SOFTWARE. -#include "catch.hpp" +#include #include #include #include diff --git a/clasp/libpotassco/tests/test_smodels.cpp b/clasp/libpotassco/tests/test_smodels.cpp index a217c87..442b3e0 100644 --- a/clasp/libpotassco/tests/test_smodels.cpp +++ b/clasp/libpotassco/tests/test_smodels.cpp @@ -22,7 +22,7 @@ // IN THE SOFTWARE. // -#include "catch.hpp" +#include #include "test_common.h" #include #include diff --git a/clasp/libpotassco/tests/test_string_convert.cpp b/clasp/libpotassco/tests/test_string_convert.cpp index f853781..5523a25 100644 --- a/clasp/libpotassco/tests/test_string_convert.cpp +++ b/clasp/libpotassco/tests/test_string_convert.cpp @@ -18,7 +18,7 @@ // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS // IN THE SOFTWARE. -#include "catch.hpp" +#include #include #include #include diff --git a/clasp/libpotassco/tests/test_text.cpp b/clasp/libpotassco/tests/test_text.cpp index 38b7300..6439fdb 100644 --- a/clasp/libpotassco/tests/test_text.cpp +++ b/clasp/libpotassco/tests/test_text.cpp @@ -22,7 +22,7 @@ // IN THE SOFTWARE. // -#include "catch.hpp" +#include #include "test_common.h" #include #include diff --git a/clasp/libpotassco/tests/test_value.cpp b/clasp/libpotassco/tests/test_value.cpp index cd610b5..9d449b9 100644 --- a/clasp/libpotassco/tests/test_value.cpp +++ b/clasp/libpotassco/tests/test_value.cpp @@ -18,7 +18,7 @@ // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS // IN THE SOFTWARE. -#include "catch.hpp" +#include #include #include #include diff --git a/clasp/tests/clause_creator_test.cpp b/clasp/tests/clause_creator_test.cpp index 3fe2d63..6088108 100644 --- a/clasp/tests/clause_creator_test.cpp +++ b/clasp/tests/clause_creator_test.cpp @@ -24,7 +24,7 @@ #include #include #include -#include "catch.hpp" +#include namespace Clasp { namespace Test { using namespace Clasp::mt; diff --git a/clasp/tests/clause_test.cpp b/clasp/tests/clause_test.cpp index b279fa0..49139b6 100644 --- a/clasp/tests/clause_test.cpp +++ b/clasp/tests/clause_test.cpp @@ -24,7 +24,7 @@ #include #include #include -#include "catch.hpp" +#include #ifdef _MSC_VER #pragma warning (disable : 4267) // conversion from 'size_t' to unsigned int #pragma once diff --git a/clasp/tests/cli_test.cpp b/clasp/tests/cli_test.cpp index 53ce512..7fb0036 100644 --- a/clasp/tests/cli_test.cpp +++ b/clasp/tests/cli_test.cpp @@ -26,7 +26,7 @@ #include #include #include -#include "catch.hpp" +#include namespace Clasp { static bool operator==(const ScheduleStrategy& lhs, const ScheduleStrategy& rhs) { return lhs.type == rhs.type && lhs.base == rhs.base && lhs.len == rhs.len && lhs.grow == rhs.grow; diff --git a/clasp/tests/decision_heuristic_test.cpp b/clasp/tests/decision_heuristic_test.cpp index 566cf10..9fe2771 100644 --- a/clasp/tests/decision_heuristic_test.cpp +++ b/clasp/tests/decision_heuristic_test.cpp @@ -27,7 +27,7 @@ #include #include #include "lpcompare.h" -#include "catch.hpp" +#include namespace Clasp { namespace Test { using namespace Clasp::Asp; ///////////////////////////////////////////////////////////////////////////////////////// diff --git a/clasp/tests/dependency_graph_test.cpp b/clasp/tests/dependency_graph_test.cpp index f383018..6915905 100644 --- a/clasp/tests/dependency_graph_test.cpp +++ b/clasp/tests/dependency_graph_test.cpp @@ -24,7 +24,7 @@ #include #include #include "lpcompare.h" -#include "catch.hpp" +#include namespace Clasp { namespace Test { using namespace Clasp::Asp; diff --git a/clasp/tests/dlp_builder_test.cpp b/clasp/tests/dlp_builder_test.cpp index 68cb772..e18befd 100644 --- a/clasp/tests/dlp_builder_test.cpp +++ b/clasp/tests/dlp_builder_test.cpp @@ -26,7 +26,7 @@ #include #include "lpcompare.h" #include -#include "catch.hpp" +#include using namespace std; namespace Clasp { namespace Test { using namespace Clasp::Asp; diff --git a/clasp/tests/enumerator_test.cpp b/clasp/tests/enumerator_test.cpp index ef0fd4c..472705a 100644 --- a/clasp/tests/enumerator_test.cpp +++ b/clasp/tests/enumerator_test.cpp @@ -28,7 +28,7 @@ #include #include "lpcompare.h" #include -#include "catch.hpp" +#include using namespace std; namespace Clasp { namespace Test { using namespace Clasp::Asp; diff --git a/clasp/tests/facade_test.cpp b/clasp/tests/facade_test.cpp index 1a711df..f4998b1 100644 --- a/clasp/tests/facade_test.cpp +++ b/clasp/tests/facade_test.cpp @@ -35,7 +35,7 @@ #endif #include "lpcompare.h" #include -#include "catch.hpp" +#include namespace Clasp { namespace Test { using namespace Clasp::mt; diff --git a/clasp/tests/literal_test.cpp b/clasp/tests/literal_test.cpp index a47e084..c51a950 100644 --- a/clasp/tests/literal_test.cpp +++ b/clasp/tests/literal_test.cpp @@ -22,7 +22,7 @@ // IN THE SOFTWARE. // #include -#include "catch.hpp" +#include namespace Clasp { namespace Test { static bool testBin(const Literal& p) { diff --git a/clasp/tests/minimize_test.cpp b/clasp/tests/minimize_test.cpp index cb6e31f..f8661a1 100644 --- a/clasp/tests/minimize_test.cpp +++ b/clasp/tests/minimize_test.cpp @@ -28,7 +28,7 @@ #include #include #include -#include "catch.hpp" +#include namespace Clasp { namespace Test { namespace { struct BranchAndBoundTest { diff --git a/clasp/tests/parser_test.cpp b/clasp/tests/parser_test.cpp index 6ca85e5..d5f62a5 100644 --- a/clasp/tests/parser_test.cpp +++ b/clasp/tests/parser_test.cpp @@ -29,7 +29,7 @@ #include #include #include "lpcompare.h" -#include "catch.hpp" +#include namespace Clasp { namespace Test { template diff --git a/clasp/tests/program_builder_test.cpp b/clasp/tests/program_builder_test.cpp index ed79c2d..a698fff 100644 --- a/clasp/tests/program_builder_test.cpp +++ b/clasp/tests/program_builder_test.cpp @@ -27,7 +27,7 @@ #include #include #include "lpcompare.h" -#include "catch.hpp" +#include using namespace std; namespace Clasp { namespace Test { using namespace Clasp::Asp; diff --git a/clasp/tests/rule_test.cpp b/clasp/tests/rule_test.cpp index dad5dd0..38284a3 100644 --- a/clasp/tests/rule_test.cpp +++ b/clasp/tests/rule_test.cpp @@ -27,7 +27,7 @@ #include #include "lpcompare.h" #include -#include "catch.hpp" +#include namespace Potassco { static bool operator==(const LitSpan& lhs, const LitSpan& rhs) { return lhs.size == rhs.size && std::equal(begin(lhs), end(lhs), begin(rhs)); diff --git a/clasp/tests/satelite_test.cpp b/clasp/tests/satelite_test.cpp index 6ca6dd6..73a52d5 100644 --- a/clasp/tests/satelite_test.cpp +++ b/clasp/tests/satelite_test.cpp @@ -27,7 +27,7 @@ #include #include #include -#include "catch.hpp" +#include #ifdef _MSC_VER #pragma warning (disable : 4267) // conversion from 'size_t' to unsigned int #pragma once diff --git a/clasp/tests/solver_test.cpp b/clasp/tests/solver_test.cpp index 5897c20..b4ca2a7 100644 --- a/clasp/tests/solver_test.cpp +++ b/clasp/tests/solver_test.cpp @@ -25,7 +25,7 @@ #include #include #include -#include "catch.hpp" +#include namespace Clasp { namespace Test { using namespace Clasp::mt; struct TestingConstraint : public Constraint { diff --git a/clasp/tests/test_main.cpp b/clasp/tests/test_main.cpp index 5d31d2e..e601bd2 100644 --- a/clasp/tests/test_main.cpp +++ b/clasp/tests/test_main.cpp @@ -22,7 +22,7 @@ // IN THE SOFTWARE. // #define CATCH_CONFIG_RUNNER -#include "catch.hpp" +#include #if defined (_MSC_VER) && _MSC_VER >= 1200 #include #endif diff --git a/clasp/tests/unfounded_check_test.cpp b/clasp/tests/unfounded_check_test.cpp index b55f369..ca7e799 100644 --- a/clasp/tests/unfounded_check_test.cpp +++ b/clasp/tests/unfounded_check_test.cpp @@ -26,7 +26,7 @@ #include #include "lpcompare.h" #include -#include "catch.hpp" +#include namespace Clasp { namespace Test { using namespace Clasp::Asp; diff --git a/clasp/tests/weight_constraint_test.cpp b/clasp/tests/weight_constraint_test.cpp index 25e1d9e..044260a 100644 --- a/clasp/tests/weight_constraint_test.cpp +++ b/clasp/tests/weight_constraint_test.cpp @@ -24,7 +24,7 @@ #include #include #include -#include "catch.hpp" +#include using namespace std; namespace Clasp { namespace Test { diff --git a/libclingo/tests/main.cc b/libclingo/tests/main.cc index b221d9a..c17af0d 100644 --- a/libclingo/tests/main.cc +++ b/libclingo/tests/main.cc @@ -23,4 +23,4 @@ // }}} #define CATCH_CONFIG_MAIN -#include "catch.hpp" +#include diff --git a/libclingo/tests/tests.hh b/libclingo/tests/tests.hh index 07f1147..bed21dc 100644 --- a/libclingo/tests/tests.hh +++ b/libclingo/tests/tests.hh @@ -23,7 +23,7 @@ // }}} #include "clingo.hh" -#include "catch.hpp" +#include namespace Clingo { namespace Test { diff --git a/libgringo/tests/main.cc b/libgringo/tests/main.cc index 5a822a8..efceaa4 100644 --- a/libgringo/tests/main.cc +++ b/libgringo/tests/main.cc @@ -22,4 +22,4 @@ // }}} #define CATCH_CONFIG_MAIN -#include "catch.hpp" +#include diff --git a/libgringo/tests/tests.hh b/libgringo/tests/tests.hh index ea86ba8..25d1143 100644 --- a/libgringo/tests/tests.hh +++ b/libgringo/tests/tests.hh @@ -25,7 +25,7 @@ #ifndef _GRINGO_TEST_TESTS_HH #define _GRINGO_TEST_TESTS_HH -#include "catch.hpp" +#include #include "gringo/utility.hh" #include "gringo/logger.hh" #include "gringo/base.hh" diff --git a/libreify/tests/main.cc b/libreify/tests/main.cc index 0c7c351..4ed06df 100644 --- a/libreify/tests/main.cc +++ b/libreify/tests/main.cc @@ -1,2 +1,2 @@ #define CATCH_CONFIG_MAIN -#include "catch.hpp" +#include diff --git a/libreify/tests/program.cc b/libreify/tests/program.cc index 46122e0..1843036 100644 --- a/libreify/tests/program.cc +++ b/libreify/tests/program.cc @@ -1,4 +1,4 @@ -#include "catch.hpp" +#include #include #include -- 2.30.2