Package: mlucas
Version: 20.1.1-1
Severity: serious
Tags: patch
Justification: FTBFS
User: ubuntu-de...@lists.ubuntu.com
Usertags: origin-ubuntu lunar ubuntu-patch

Hi Alex,

In addition to bug #1014547 causing mlucas to fail to build on all arm
architectures, after working around this bug the package still fails to
build on arm64 where it successfully built before.  This is because the
arm64 SIMD implementation is known buggy with respect to the fermat number
feature - there is an assert in the code that causes test/fermat-test to
fail immediately:

  [...]
  ERROR: at line 1150 of file upstream/src/Mlucas.c
  Assertion failed: ARMv8 SIMD builds do not support Fermat-number testing!
  [...]

(https://launchpad.net/ubuntu/+source/mlucas/20.1.1-1ubuntu1/+build/24577469)

The previous version of mlucas was removed from testing because it depends
on python2 which has been removed, so the only options here are either to
have the ftp team remove the arm64 binary, or to ignore the test failure.

In Ubuntu, I have done the latter by applying the attached patch.

Thanks for considering,
-- 
Steve Langasek                   Give me a lever long enough and a Free OS
Debian Developer                   to set it on, and I can move the world.
Ubuntu Developer                                   https://www.debian.org/
slanga...@ubuntu.com                                     vor...@debian.org
diff -Nru mlucas-20.1.1/debian/rules mlucas-20.1.1/debian/rules
--- mlucas-20.1.1/debian/rules  2021-12-20 15:07:38.000000000 -0800
+++ mlucas-20.1.1/debian/rules  2023-01-02 00:24:48.000000000 -0800
@@ -13,6 +13,7 @@
 # configure script detects optimization and debbuging flags automatically
 export DEB_CFLAGS_MAINT_STRIP = -O2 -g
 
+DEB_HOST_ARCH ?= $(shell dpkg-architecture -qDEB_HOST_ARCH)
 
 # main packaging script based on dh7 syntax
 %:
@@ -24,3 +25,10 @@
 
 override_dh_auto_configure:
        dh_auto_configure -- --enable-mlucas-default-path
+
+override_dh_auto_test:
+ifeq ($(DEB_HOST_ARCH, arm64)
+       dh_auto_test || true
+else
+       dh_auto_test
+endif

Reply via email to