Bug#884190: graphite2: FTBFS on x32: Test #78: bits: Failed
Source: graphite2
Version: 1.3.11-2
Followup-For: Bug #884190
I’ve discovered the root of the issue: a check for __x86_64__
without a corresponding check for __ILP32__ makes x32 being
misdetected as amd64.
The actual test failed because the preparation of the test data
uses UL not ULL, and long is only 32 bit on x32.
Please also forward this upstream, although they’ll want to use…
#if (defined(__x86_64__) && !defined(__ILP32__)) || defined(_WIN64)
… instead.
diff -Nru graphite2-1.3.11/debian/changelog graphite2-1.3.11/debian/changelog
--- graphite2-1.3.11/debian/changelog 2018-03-11 13:22:48.000000000 +0100
+++ graphite2-1.3.11/debian/changelog 2018-08-01 17:39:17.000000000 +0200
@@ -1,3 +1,10 @@
+graphite2 (1.3.11-2+x32.1) unreleased; urgency=medium
+
+ * Non-maintainer upload.
+ * Fix x32 being misdetected as amd64 in tests. (Closes: #884190)
+
+ -- Thorsten Glaser <tg@mirbsd.de> Wed, 01 Aug 2018 17:39:17 +0200
+
graphite2 (1.3.11-2) unstable; urgency=medium
* backport upstream commit db132b4731a9b4c9534144ba3a18e65b390e9ff6
diff -Nru graphite2-1.3.11/debian/patches/fix-x32.diff graphite2-1.3.11/debian/patches/fix-x32.diff
--- graphite2-1.3.11/debian/patches/fix-x32.diff 1970-01-01 01:00:00.000000000 +0100
+++ graphite2-1.3.11/debian/patches/fix-x32.diff 2018-08-01 17:39:09.000000000 +0200
@@ -0,0 +1,22 @@
+# DP: x32 is not amd64, fix FTBFS
+
+--- a/tests/bittwiddling/bits.cpp
++++ b/tests/bittwiddling/bits.cpp
+@@ -65,7 +65,7 @@ namespace
+ patterns(8);
+ patterns(16);
+ patterns(32);
+-#ifdef __x86_64__
++#if defined(__x86_64__) && !defined(__ILP32__)
+ patterns(64);
+ #endif
+
+@@ -124,7 +124,7 @@ int main(int argc , char *argv[])
+ test_bit_set_count(s16_pat);
+ test_bit_set_count(u32_pat);
+ test_bit_set_count(s32_pat);
+-#ifdef __x86_64__
++#if defined(__x86_64__) && !defined(__ILP32__)
+ test_bit_set_count(u64_pat);
+ test_bit_set_count(s64_pat);
+ #endif
diff -Nru graphite2-1.3.11/debian/patches/series graphite2-1.3.11/debian/patches/series
--- graphite2-1.3.11/debian/patches/series 2018-03-11 13:22:11.000000000 +0100
+++ graphite2-1.3.11/debian/patches/series 2018-08-01 17:37:51.000000000 +0200
@@ -6,3 +6,4 @@
reproducible-build.diff
PYTHON_EXECUTABLE.diff
db132b4731a9b4c9534144ba3a18e65b390e9ff6.diff
+fix-x32.diff
Reply to: