Bug#995317: apertium broken on s390x due to missing endianness definition

Steve Langasek steve.langasek at canonical.com
Wed Sep 29 16:33:46 BST 2021


Package: apertium
Version: 3.7.1-1
Severity: grave
Tags: patch
Justification: ships a binary package that's effectively unusable on an architecture
User: ubuntu-devel at lists.ubuntu.com
Usertags: origin-ubuntu impish ubuntu-patch

Dear maintainers,

The apertium-br-fr autopkgtests have been failing on s390x in Debian and
Ubuntu.  Although this is not considered a regression in Debian because
there was never a test that passed, and therefore apertium-br-fr 0.5.1-1 is
in Debian testing (and stable), in Ubuntu the tests were previously run with
apertium-br-fr 0.5.0~r61325-4 which passed, so the new apertium-br-fr has
been blocked from reaching an Ubuntu release.

Digging into the failure, the apertium invocation of pcre is failing with
the error:
  Error: Unknown error matching regexp (code -29)

-29 in pcre maps to PCRE_ERROR_BADENDIANNESS.

There is code in apertium to detect the host endianness and set the correct
option to the pcre engine, but a missing header include means that the code
in question doesn't know the host endianness, so doesn't set it.

The attached patch fixes the omission, and when rebuilt with this flag, the
apertium-br-fr autopkgtest now passes with both 0.5.1-1 and 0.5.0~r61325-4
versions of the data files.

I'm marking this bug as grave because to my understanding this makes
apertium completely unusable on s390x with any current data files - it's
just that only 3 of the apertium dictionary packages have autopkgtests.

-- 
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/
slangasek at ubuntu.com                                     vorlon at debian.org
-------------- next part --------------
diff -Nru apertium-3.7.1/debian/patches/endianness.patch apertium-3.7.1/debian/patches/endianness.patch
--- apertium-3.7.1/debian/patches/endianness.patch	1969-12-31 16:00:00.000000000 -0800
+++ apertium-3.7.1/debian/patches/endianness.patch	2021-09-29 08:12:26.000000000 -0700
@@ -0,0 +1,20 @@
+Description: include the necessary header to configure the code for endianness
+ This source file has code to configure the regexp engine for the correct
+ host endianness, however, it is missing the include that allows the code to
+ know what the host endianness is.  Correct this omission.
+Author: Steve Langasek <steve.langasek at ubuntu.com>
+Last-Update: 2021-09-29
+Forwarded: no
+
+Index: apertium-3.7.1/apertium/apertium_re.cc
+===================================================================
+--- apertium-3.7.1.orig/apertium/apertium_re.cc
++++ apertium-3.7.1/apertium/apertium_re.cc
+@@ -14,6 +14,7 @@
+  * You should have received a copy of the GNU General Public License
+  * along with this program; if not, see <http://www.gnu.org/licenses/>.
+  */
++#include "apertium/apertium_config.h"
+ #include <apertium/apertium_re.h>
+ #include <lttoolbox/compression.h>
+ #include <iostream>
diff -Nru apertium-3.7.1/debian/patches/series apertium-3.7.1/debian/patches/series
--- apertium-3.7.1/debian/patches/series	1969-12-31 16:00:00.000000000 -0800
+++ apertium-3.7.1/debian/patches/series	2021-09-29 08:07:34.000000000 -0700
@@ -0,0 +1 @@
+endianness.patch


More information about the debian-science-maintainers mailing list