Bug#1069165: haskell-pandoc: Disable tests on loong64
zhangdandan
zhangdandan at loongson.cn
Wed Apr 17 10:00:53 BST 2024
Source: haskell-pandoc
Version: 3.1.3-1
Severity: important
Tags: ftbfs patch
User: debian-loongarch at lists.debian.org
Usertags: loong64
Dear maintainers,
Compiling the haskell-pandoc failed for loong64 in the Debian Package
Auto-Building environment.
The error log is as follows,
```
[58 of 58] Linking dist-ghc/build/test-pandoc/test-pandoc
/usr/bin/ld.bfd:
/usr/lib/ghc/lib/../lib/loongarch64-linux-ghc-9.4.7/rts-1.0.2/libHSrts-1.0.2_thr.a(NonMovingMark.thr_o):
relocation R_LARCH_B26 overflow 0xfffffffff5fec6a4
Dump relocate record:
stack top relocation name symbol
at
/usr/lib/gcc/loongarch64-linux-gnu/13/../../../loongarch64-linux-gnu/crt1.o(.text+0x0):
...
0x0000000000000000 R_LARCH_NONE `<nameless>' + 3(0x3)
......
```
The Full log can be found at
https://buildd.debian.org/status/logs.php?pkg=haskell-pandoc&ver=3.1.3-1&arch=loong64.
The reason for the above error is that "relocation R_LARCH_B26 overflow
......" occurs during static linking in the test-pandoc stage.
Currently we have two suggestions to solve "relocation R_LARCH_B26
overflow ......" during static linking.
1.Add build rules to reduce binary size.
Use "DEB_SETUP_GHC_CONFIGURE_ARGS += --enable-executable-dynamic -O2"
when compiling haskell-pandoc for loong64.
The parameters are explained as follows,
"--enable-executable-dynamic" means "Enable Executable dynamic linking".
"-O, --enable-optimization[=n]" means "Build with optimization (n is
0--2, default is 1)".
2.Disable tests in d/rules on loong64.
The error "relocation R_LARCH_B26 overflow ......" occurs during the
testing stage.
It is recommended to use "DEB_ENABLE_TESTS = no" in d/rules for loong64.
The haskell-pandoc was built successfully in my local ENV.
About disable tests in d/rules on loong64, please consider the below patch,
```
diff --git a/debian/rules b/debian/rules
index 6fbf01d..385f58e 100755
--- a/debian/rules
+++ b/debian/rules
@@ -1,6 +1,10 @@
#!/usr/bin/make -f
DEB_ENABLE_TESTS = yes
+ifneq (,$(filter $(DEB_HOST_ARCH_CPU), loong64))
+DEB_ENABLE_TESTS = no
+endif
+
```
The haskel-pandoc blocks the construction of pandoc.
And pandoc blocks the compilation of 103 packages.
Please help us to choose 1 of the 2 solutions I provided above.
Or help us to solve "relocation R_LARCH_B26 overflow ......".
Looking forward to your reply.
Thanks,
Dandan Zhang
More information about the Pkg-haskell-maintainers
mailing list