Bug#1004022: clasp: Clasp FTBFS with glibc 2.34

Lukas Märdian slyon at ubuntu.com
Wed Jan 19 13:41:59 GMT 2022


Package: clasp
Version: 3.3.5-4
Severity: normal
Tags: patch
User: ubuntu-devel at lists.ubuntu.com
Usertags: origin-ubuntu jammy ubuntu-patch
X-Debbugs-Cc: slyon at ubuntu.com

Dear Maintainer,

Once glibc will be upgraded to 2.34+ clasp will FTBFS.

In Ubuntu, the attached patch was applied to fix this issue:

  * d/p/use-system-catch-for-glibc-2.34-compat.patch: Fix FTBFS with glibc-2.34
    - Add catch v1 build-dependency
    - Make use of system provided catch v1 (CTest) library


Thanks for considering the patch.

Cheers,
  Lukas


-- System Information:
Debian Release: 11.0
  APT prefers impish-updates
  APT policy: (500, 'impish-updates'), (500, 'impish-security'), (500, 'impish'), (100, 'impish-backports')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 5.13.0-23-generic (SMP w/4 CPU threads)
Kernel taint flags: TAINT_PROPRIETARY_MODULE, TAINT_WARN, TAINT_OOT_MODULE
Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8), LANGUAGE=de_DE:en_GB:en
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled
-------------- next part --------------
diff -Nru clasp-3.3.5/debian/control clasp-3.3.5/debian/control
--- clasp-3.3.5/debian/control	2020-12-26 22:25:24.000000000 +0100
+++ clasp-3.3.5/debian/control	2022-01-19 14:36:04.000000000 +0100
@@ -6,6 +6,7 @@
 Build-Depends: debhelper-compat (= 13),
  dpkg-dev (>= 1.16.1~),
  g++-10 (>= 10.2.1),
+ catch,
  cmake (>= 3.1.0)
 Rules-Requires-Root: no
 Standards-Version: 4.5.1
diff -Nru clasp-3.3.5/debian/patches/series clasp-3.3.5/debian/patches/series
--- clasp-3.3.5/debian/patches/series	2020-12-26 21:49:38.000000000 +0100
+++ clasp-3.3.5/debian/patches/series	2022-01-19 14:24:03.000000000 +0100
@@ -1,2 +1,3 @@
 clasp-manpage.patch
 link-libatomic-check-gcc.patch
+use-system-catch-for-glibc-2.34-compat.patch
diff -Nru clasp-3.3.5/debian/patches/use-system-catch-for-glibc-2.34-compat.patch clasp-3.3.5/debian/patches/use-system-catch-for-glibc-2.34-compat.patch
--- clasp-3.3.5/debian/patches/use-system-catch-for-glibc-2.34-compat.patch	1970-01-01 01:00:00.000000000 +0100
+++ clasp-3.3.5/debian/patches/use-system-catch-for-glibc-2.34-compat.patch	2022-01-19 14:35:31.000000000 +0100
@@ -0,0 +1,296 @@
+Description: Fix 'catch' (CTest) compatibility with glibc-2.34
+ The clasp package contains an embedded copy of the 'catch' v1 (CTest)
+ library. That copy is outdated and incompatible with glibc-2.34.
+ This patch updates the test sources to use the system provided versions of
+ 'catch' instead, to fix this issue.
+ C.f.: https://github.com/catchorg/Catch2/issues/2178
+Author: Lukas M?rdian <slyon at ubuntu.com>
+Origin: vendor, Ubuntu
+Forwarded: no
+Bug: https://github.com/potassco/clasp/issues/73
+Last-Update: 2022-01-18
+---
+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
+--- clasp-3.3.5.orig/libpotassco/tests/main.cpp
++++ clasp-3.3.5/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 <catch/catch.hpp>
+--- clasp-3.3.5.orig/libpotassco/tests/test_application.cpp
++++ clasp-3.3.5/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 <catch/catch.hpp>
+ #include <potassco/application.h>
+ #include <potassco/program_opts/typed_value.h>
+ #include <signal.h>
+--- clasp-3.3.5.orig/libpotassco/tests/test_aspif.cpp
++++ clasp-3.3.5/libpotassco/tests/test_aspif.cpp
+@@ -24,7 +24,7 @@
+ #ifdef _MSC_VER
+ #pragma warning (disable : 4996)
+ #endif
+-#include "catch.hpp"
++#include <catch/catch.hpp>
+ #include "test_common.h"
+ #include <potassco/aspif.h>
+ #include <potassco/rule_utils.h>
+--- clasp-3.3.5.orig/libpotassco/tests/test_options.cpp
++++ clasp-3.3.5/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 <catch/catch.hpp>
+ #include <potassco/program_opts/program_options.h>
+ #include <potassco/program_opts/typed_value.h>
+ #include <potassco/program_opts/errors.h>
+--- clasp-3.3.5.orig/libpotassco/tests/test_smodels.cpp
++++ clasp-3.3.5/libpotassco/tests/test_smodels.cpp
+@@ -22,7 +22,7 @@
+ // IN THE SOFTWARE.
+ //
+ 
+-#include "catch.hpp"
++#include <catch/catch.hpp>
+ #include "test_common.h"
+ #include <potassco/convert.h>
+ #include <sstream>
+--- clasp-3.3.5.orig/libpotassco/tests/test_string_convert.cpp
++++ clasp-3.3.5/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 <catch/catch.hpp>
+ #include <potassco/string_convert.h>
+ #include <string>
+ #include <vector>
+--- clasp-3.3.5.orig/libpotassco/tests/test_text.cpp
++++ clasp-3.3.5/libpotassco/tests/test_text.cpp
+@@ -22,7 +22,7 @@
+ // IN THE SOFTWARE.
+ //
+ 
+-#include "catch.hpp"
++#include <catch/catch.hpp>
+ #include "test_common.h"
+ #include <potassco/aspif_text.h>
+ #include <potassco/aspif.h>
+--- clasp-3.3.5.orig/libpotassco/tests/test_value.cpp
++++ clasp-3.3.5/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 <catch/catch.hpp>
+ #include <potassco/program_opts/value_store.h>
+ #include <potassco/program_opts/mapped_value.h>
+ #include <potassco/program_opts/typed_value.h>
+--- clasp-3.3.5.orig/tests/clause_creator_test.cpp
++++ clasp-3.3.5/tests/clause_creator_test.cpp
+@@ -24,7 +24,7 @@
+ #include <clasp/clause.h>
+ #include <clasp/solver.h>
+ #include <algorithm>
+-#include "catch.hpp"
++#include <catch/catch.hpp>
+ namespace Clasp { namespace Test {
+ using namespace Clasp::mt;
+ 
+--- clasp-3.3.5.orig/tests/clause_test.cpp
++++ clasp-3.3.5/tests/clause_test.cpp
+@@ -24,7 +24,7 @@
+ #include <clasp/clause.h>
+ #include <clasp/solver.h>
+ #include <algorithm>
+-#include "catch.hpp"
++#include <catch/catch.hpp>
+ #ifdef _MSC_VER
+ #pragma warning (disable : 4267) //  conversion from 'size_t' to unsigned int
+ #pragma once
+--- clasp-3.3.5.orig/tests/cli_test.cpp
++++ clasp-3.3.5/tests/cli_test.cpp
+@@ -26,7 +26,7 @@
+ #include <clasp/unfounded_check.h>
+ #include <clasp/logic_program.h>
+ #include <fstream>
+-#include "catch.hpp"
++#include <catch/catch.hpp>
+ 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;
+--- clasp-3.3.5.orig/tests/decision_heuristic_test.cpp
++++ clasp-3.3.5/tests/decision_heuristic_test.cpp
+@@ -27,7 +27,7 @@
+ #include <clasp/clause.h>
+ #include <clasp/solver.h>
+ #include "lpcompare.h"
+-#include "catch.hpp"
++#include <catch/catch.hpp>
+ namespace Clasp { namespace Test {
+ using namespace Clasp::Asp;
+ /////////////////////////////////////////////////////////////////////////////////////////
+--- clasp-3.3.5.orig/tests/dependency_graph_test.cpp
++++ clasp-3.3.5/tests/dependency_graph_test.cpp
+@@ -24,7 +24,7 @@
+ #include <clasp/dependency_graph.h>
+ #include <clasp/solver.h>
+ #include "lpcompare.h"
+-#include "catch.hpp"
++#include <catch/catch.hpp>
+ namespace Clasp { namespace Test {
+ using namespace Clasp::Asp;
+ 
+--- clasp-3.3.5.orig/tests/dlp_builder_test.cpp
++++ clasp-3.3.5/tests/dlp_builder_test.cpp
+@@ -26,7 +26,7 @@
+ #include <clasp/unfounded_check.h>
+ #include "lpcompare.h"
+ #include <sstream>
+-#include "catch.hpp"
++#include <catch/catch.hpp>
+ using namespace std;
+ namespace Clasp { namespace Test {
+ using namespace Clasp::Asp;
+--- clasp-3.3.5.orig/tests/enumerator_test.cpp
++++ clasp-3.3.5/tests/enumerator_test.cpp
+@@ -28,7 +28,7 @@
+ #include <clasp/model_enumerators.h>
+ #include "lpcompare.h"
+ #include <sstream>
+-#include "catch.hpp"
++#include <catch/catch.hpp>
+ using namespace std;
+ namespace Clasp { namespace Test {
+ using namespace Clasp::Asp;
+--- clasp-3.3.5.orig/tests/facade_test.cpp
++++ clasp-3.3.5/tests/facade_test.cpp
+@@ -35,7 +35,7 @@
+ #endif
+ #include "lpcompare.h"
+ #include <signal.h>
+-#include "catch.hpp"
++#include <catch/catch.hpp>
+ namespace Clasp { namespace Test {
+ using namespace Clasp::mt;
+ 
+--- clasp-3.3.5.orig/tests/literal_test.cpp
++++ clasp-3.3.5/tests/literal_test.cpp
+@@ -22,7 +22,7 @@
+ // IN THE SOFTWARE.
+ //
+ #include <clasp/solver_types.h>
+-#include "catch.hpp"
++#include <catch/catch.hpp>
+ namespace Clasp { namespace Test {
+ 
+ static bool testBin(const Literal& p) {
+--- clasp-3.3.5.orig/tests/minimize_test.cpp
++++ clasp-3.3.5/tests/minimize_test.cpp
+@@ -28,7 +28,7 @@
+ #include <clasp/solver.h>
+ #include <clasp/solve_algorithms.h>
+ #include <algorithm>
+-#include "catch.hpp"
++#include <catch/catch.hpp>
+ namespace Clasp { namespace Test {
+ namespace {
+ struct BranchAndBoundTest {
+--- clasp-3.3.5.orig/tests/parser_test.cpp
++++ clasp-3.3.5/tests/parser_test.cpp
+@@ -29,7 +29,7 @@
+ #include <potassco/smodels.h>
+ #include <potassco/string_convert.h>
+ #include "lpcompare.h"
+-#include "catch.hpp"
++#include <catch/catch.hpp>
+ namespace Clasp { namespace Test {
+ 
+ template <class Api>
+--- clasp-3.3.5.orig/tests/program_builder_test.cpp
++++ clasp-3.3.5/tests/program_builder_test.cpp
+@@ -27,7 +27,7 @@
+ #include <clasp/unfounded_check.h>
+ #include <clasp/minimize_constraint.h>
+ #include "lpcompare.h"
+-#include "catch.hpp"
++#include <catch/catch.hpp>
+ using namespace std;
+ namespace Clasp { namespace Test {
+ using namespace Clasp::Asp;
+--- clasp-3.3.5.orig/tests/rule_test.cpp
++++ clasp-3.3.5/tests/rule_test.cpp
+@@ -27,7 +27,7 @@
+ #include <clasp/solver.h>
+ #include "lpcompare.h"
+ #include <utility>
+-#include "catch.hpp"
++#include <catch/catch.hpp>
+ namespace Potassco {
+ static bool operator==(const LitSpan& lhs, const LitSpan& rhs) {
+ 	return lhs.size == rhs.size && std::equal(begin(lhs), end(lhs), begin(rhs));
+--- clasp-3.3.5.orig/tests/satelite_test.cpp
++++ clasp-3.3.5/tests/satelite_test.cpp
+@@ -27,7 +27,7 @@
+ #include <clasp/clause.h>
+ #include <clasp/parser.h>
+ #include <algorithm>
+-#include "catch.hpp"
++#include <catch/catch.hpp>
+ #ifdef _MSC_VER
+ #pragma warning (disable : 4267) //  conversion from 'size_t' to unsigned int
+ #pragma once
+--- clasp-3.3.5.orig/tests/solver_test.cpp
++++ clasp-3.3.5/tests/solver_test.cpp
+@@ -25,7 +25,7 @@
+ #include <clasp/clause.h>
+ #include <clasp/statistics.h>
+ #include <clasp/weight_constraint.h>
+-#include "catch.hpp"
++#include <catch/catch.hpp>
+ namespace Clasp { namespace Test {
+ using namespace Clasp::mt;
+ struct TestingConstraint : public Constraint {
+--- clasp-3.3.5.orig/tests/test_main.cpp
++++ clasp-3.3.5/tests/test_main.cpp
+@@ -22,7 +22,7 @@
+ // IN THE SOFTWARE.
+ //
+ #define CATCH_CONFIG_RUNNER
+-#include "catch.hpp"
++#include <catch/catch.hpp>
+ #if defined (_MSC_VER) && _MSC_VER >= 1200
+ #include <crtdbg.h>
+ #endif
+--- clasp-3.3.5.orig/tests/unfounded_check_test.cpp
++++ clasp-3.3.5/tests/unfounded_check_test.cpp
+@@ -26,7 +26,7 @@
+ #include <clasp/clause.h>
+ #include "lpcompare.h"
+ #include <memory>
+-#include "catch.hpp"
++#include <catch/catch.hpp>
+ namespace Clasp { namespace Test {
+ using namespace Clasp::Asp;
+ 
+--- clasp-3.3.5.orig/tests/weight_constraint_test.cpp
++++ clasp-3.3.5/tests/weight_constraint_test.cpp
+@@ -24,7 +24,7 @@
+ #include <clasp/weight_constraint.h>
+ #include <clasp/solver.h>
+ #include <algorithm>
+-#include "catch.hpp"
++#include <catch/catch.hpp>
+ using namespace std;
+ 
+ namespace Clasp { namespace Test {


More information about the debian-science-maintainers mailing list