Bug#1069171: haskell-pandoc-lua-engine: Disable tests on loong64

zhangdandan zhangdandan at loongson.cn
Wed Apr 17 12:08:11 BST 2024


Source: haskell-pandoc-lua-engine
Version: 0.2.0.1-1
Severity: important
Tags: ftbfs patch
User: debian-loongarch at lists.debian.org
Usertags: loong64

Dear maintainers,

The haskell-pandoc-lua-engine is blocked from building by haskell-pandoc 
in the Debian Package Auto-Building environment.
Compiling the haskell-pandoc-lua-engine failed for loong64 in my local ENV.
The error message is consistent with haskel-pandoc, and both are related 
to "relocation R_LARCH_B26 overflow ......" during static linking in the 
test-pandoc stage.
The build error log of haskell-pandoc-lua-engine from my local ENV is as 
follows,
```
[6 of 6] Linking 
dist-ghc/build/test-pandoc-lua-engine/test-pandoc-lua-engine
/usr/bin/ld.bfd: 
/usr/lib/ghc/lib/../lib/loongarch64-linux-ghc-9.4.7/rts-1.0.2/libHSrts-1.0.2.a(NonMovingMark.o): 
relocation R_LARCH_B26 overflow 0xfffffffff61da41c
Dump relocate record:
stack top        relocation name        symbol
at 
/usr/lib/ghc/lib/../lib/loongarch64-linux-ghc-9.4.7/rts-1.0.2/libHSrts-1.0.2.a(NonMovingMark.o)(.text+0xae4):
...
0x0000000000000000 R_LARCH_B16    `.L172'
......
```

There are two suggestions to solve "relocation R_LARCH_B26 overflow 
......" during static linking.
1.Add build rules to reduce binary size.
2.Disable tests in d/rules on loong64.
The detailed information can be found from haskell-pandoc's Bug 
(#1069165) I just submitted.

It is recommended to use "DEB_ENABLE_TESTS = no" in d/rules for loong64.
Please consider the patch I attached.
With the attached patch, the haskell-pandoc-lua-engine was built 
successfully in my local ENV.
```
......
if grep -q '^Component:[[:space:]]*main' /CurrentlyBuilding 2>/dev/null; 
then dh_scour -plibghc-pandoc-lua-engine-prof ; fi
dh_md5sums -plibghc-pandoc-lua-engine-prof
dh_builddeb -plibghc-pandoc-lua-engine-prof
dpkg-deb: building package 'libghc-pandoc-lua-engine-prof' in 
'../libghc-pandoc-lua-engine-prof_0.2.0.1-1_loong64.deb'.
  dpkg-genbuildinfo 
-O../haskell-pandoc-lua-engine_0.2.0.1-1_loong64.buildinfo
  dpkg-genchanges -O../haskell-pandoc-lua-engine_0.2.0.1-1_loong64.changes
```

Your opinions are welcome.

Thanks,
Dandan Zhang

-------------- next part --------------
diff -Nru haskell-pandoc-lua-engine-0.2.0.1/debian/rules haskell-pandoc-lua-engine-0.2.0.1/debian/rules
--- haskell-pandoc-lua-engine-0.2.0.1/debian/rules	2024-01-04 00:32:40.000000000 +0000
+++ haskell-pandoc-lua-engine-0.2.0.1/debian/rules	2024-01-04 00:32:40.000000000 +0000
@@ -1,6 +1,9 @@
 #!/usr/bin/make -f
 
 DEB_ENABLE_TESTS = yes
+ifneq (,$(filter $(DEB_HOST_ARCH_CPU), loong64))
+DEB_ENABLE_TESTS = no
+endif
 
 include /usr/share/cdbs/1/rules/debhelper.mk
 include /usr/share/cdbs/1/class/hlibrary.mk


More information about the Pkg-haskell-maintainers mailing list