Source: pcre2
Version: 10.44-4
Severity: wishlist
Tags: patch
User: debian-loonga...@lists.debian.org
Usertags: loong64

Dear maintainers,

Compiling the pcre2 10.44-4 successed for loong64 in the Debian Package Auto-Building environment.
But pcre2 source package do not enable JIT on loong64.

Without enable JIT on loong64 in pcre2 source package, the phenomenon caused is python-pcre2 build failure.
The error(test cases fail) log of python-pcre2 is as follows,
```
=========================== short test summary info ============================ FAILED tests/test_pattern.py::test_pattern_jit_compile_success[a+b+c*d*-0-SUCCESS0] FAILED tests/test_pattern.py::test_pattern_jit_compile_success[(?<foo>a+b+)c*d*-0-SUCCESS0] FAILED tests/test_pattern.py::test_pattern_jit_compile_success[\xc3\xa5+\xe2\x88\xab+\xc3\xa7*\xe2\x88\x82*-0-SUCCESS] FAILED tests/test_pattern.py::test_pattern_jit_compile_success[a+b+c*d*-0-SUCCESS1] FAILED tests/test_pattern.py::test_pattern_jit_compile_success[(?<foo>a+b+)c*d*-0-SUCCESS1] FAILED tests/test_pattern.py::test_pattern_jit_compile_success[(?<foo>a+b+)c*d*(?<foo>a+b+)-64-SUCCESS] FAILED tests/test_pattern.py::test_pattern_jit_compile_success[\xe5+\u222b+\xe7*\u2202*-0-SUCCESS] FAILED tests/test_pattern.py::test_pattern_jit_compile_success[(?<\u0192\xf8\xf8>a+b+)c*d*-0-SUCCESS] FAILED tests/test_pattern.py::test_pattern_jit_findall - pcre2.exceptions.Lib... FAILED tests/test_pattern.py::test_pattern_jit_split - pcre2.exceptions.Libra... ======================== 10 failed, 52 passed in 0.37s =========================

```
The error log can be found at https://buildd.debian.org/status/logs.php?pkg=python-pcre2&ver=0.4.0%2Bds-1&arch=loong64.

Pleason consider the patch I attached for pcre2.
1. I have built pcre2 successfully in locally.
```
......
dpkg-deb: building package 'libpcre2-dev' in '../libpcre2-dev_10.44-4+loong64_loong64.deb'. dpkg-deb: building package 'pcre2-utils-dbgsym' in '../pcre2-utils-dbgsym_10.44-4+loong64_loong64.deb'. dpkg-deb: building package 'libpcre2-8-0-udeb' in 'debian/.debhelper/scratch-space/build-libpcre2-8-0-udeb/libpcre2-8-0-udeb_10.44-4+loong64_loong64.deb'.     Renaming libpcre2-8-0-udeb_10.44-4+loong64_loong64.deb to libpcre2-8-0-udeb_10.44-4+loong64_loong64.udeb
 dpkg-genbuildinfo -O../pcre2_10.44-4+loong64_loong64.buildinfo
 dpkg-genchanges -O../pcre2_10.44-4+loong64_loong64.changes

```

2. Base on local libpcre2-dev_10.44-4+loong64_loong64.deb, I have built python-pcre2 successfully in locally.
```
===== 62 passed in 0.49s =====
......
dpkg-deb: building package 'python3-pcre2' in '../python3-pcre2_0.4.0+ds-1_loong64.deb'. dpkg-deb: building package 'python3-pcre2-dbgsym' in '../python3-pcre2-dbgsym_0.4.0+ds-1_loong64.deb'.
 dpkg-genbuildinfo -O../python-pcre2_0.4.0+ds-1_loong64.buildinfo
 dpkg-genchanges -O../python-pcre2_0.4.0+ds-1_loong64.changes
```

Please enable JIT on loong64 in pcre2 source package.

Best Regards,
Dandan Zhang

diff -u pcre2-10.44/debian/changelog pcre2-10.44/debian/changelog
--- pcre2-10.44/debian/changelog
+++ pcre2-10.44/debian/changelog
@@ -1,3 +1,9 @@
+pcre2 (10.44-4+loong64) unreleased; urgency=medium
+
+  * Enable JIT on loong64.
+
+ -- Dandan Zhang <zhangdan...@loongson.cn>  Sat, 07 Dec 2024 21:21:28 +0800
+
 pcre2 (10.44-4) unstable; urgency=medium
 
   * Disable JIT on armel (it requires v7) (Closes: 1087563)
diff -u pcre2-10.44/debian/rules pcre2-10.44/debian/rules
--- pcre2-10.44/debian/rules
+++ pcre2-10.44/debian/rules
@@ -13,7 +13,7 @@
 
 deb_maint_conf_args = --enable-pcre2-16 --enable-pcre2-32 
--disable-pcre2grep-callout
 #enable JIT only on architectures that support it (see pcre2jit.3)
-ifneq ($(filter amd64 armhf arm64 i386 mips mipsel mips64el powerpc ppc64 
ppc64el riscv64 s390x, $(DEB_HOST_ARCH)),)
+ifneq ($(filter amd64 armhf arm64 i386 loong64 mips mipsel mips64el powerpc 
ppc64 ppc64el riscv64 s390x, $(DEB_HOST_ARCH)),)
 deb_maint_conf_args +=--enable-jit
 else
 deb_maint_conf_args +=--disable-jit

Reply via email to