[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#1071205: marked as done (pandoc: Use extra --ghc-options in d/rules on loong64)



Your message dated Tue, 15 Oct 2024 10:56:48 +0000
with message-id <E1t0fEO-008D1J-Gl@fasolo.debian.org>
and subject line Bug#1071205: fixed in pandoc 3.1.11.1+ds-1
has caused the Debian Bug report #1071205,
regarding pandoc: Use extra --ghc-options in d/rules on loong64
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact owner@bugs.debian.org
immediately.)


-- 
1071205: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1071205
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems
--- Begin Message ---
Source: pandoc
Version: 3.1.3+ds-3
Severity: important
Tags: ftbfs patch
User: debian-loongarch@lists.debian.org
Usertags: loong64
X-Debbugs-Cc: wanghonghu@loongson.cn, lixing@loongson.cn, fanpeng@loongson.cn

Dear maintainers,

Compiling the pandoc failed for loong64 in the Debian Package Auto-Building environment.
The build error is still related to "relocation R_LARCH_B26 overflow......".
Please see the below error log,
```
Preprocessing executable 'pandoc' for pandoc-cli-0.1.1..
Building executable 'pandoc' for pandoc-cli-0.1.1..
[1 of 3] Compiling PandocCLI.Lua
[2 of 3] Compiling PandocCLI.Server
[3 of 3] Compiling Main
[4 of 4] Linking dist-ghc/build/pandoc/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 0xfffffffff62fb154
......
```
The full build log can be found at https://buildd.debian.org/status/logs.php?pkg=pandoc&ver=3.1.3%2Bds-3&arch=loong64

There are three suggestions to solve "relocation R_LARCH_B26 overflow ......" during static linking.
1.Add loong64 to the list of low-memory architectures.
2.Use "--enable-executable-dynamic" in d/rules to reduce binary size on loong64. 3.Add extra --ghc-options in d/rules on loong64 to increase jump-instructions' range.

It is recommended to use '--ghc-options="-optc-mcmodel=medium"' in d/rules for loong64.
Please consider the patch I attached.
- Add --ghc-options="-optc-mcmodel=medium" in d/rules for loong64.
- Remove loong64 from the list of low-memory architectures.

With the attached patch, the pandoc was built successfully in my local ENV.
And I have uploaded a native pandoc to debian ports.
```
......
dh_md5sums -ppandoc
dh_builddeb -ppandoc
dpkg-deb: building package 'pandoc' in '../pandoc_3.1.3+ds-3_loong64.deb'.
 dpkg-genbuildinfo -O../pandoc_3.1.3+ds-3_loong64.buildinfo
 dpkg-genchanges -O../pandoc_3.1.3+ds-3_loong64.changes
dpkg-genchanges: info: not including original source code in upload
 dpkg-source --after-build .
```

The end, the compilation order of the relevant packages are as follows,
- ghc
- haskell-isocline
- haskell-lua
- haskell-primitive
- haskell-splitmix
- haskell-zlib
- haskell-pandoc
- haskell-pandoc-lua-engine
- pandoc

Meanwhile, we have submitted bugs to the above 9 packages to suggest to use --ghc-options="-optc-mcmodel=medium".
Your opinions are welcome.

Thanks,
Dandan Zhang
diff -Nru pandoc-3.1.3+ds/debian/rules pandoc-3.1.3+ds/debian/rules
--- pandoc-3.1.3+ds/debian/rules	2024-04-20 23:16:47.000000000 +0000
+++ pandoc-3.1.3+ds/debian/rules	2024-04-20 23:16:47.000000000 +0000
@@ -50,10 +50,14 @@
 DEB_SETUP_GHC_CONFIGURE_ARGS += --ghc-options="+RTS -V0 -RTS"
 
 # Reduce compile-time memory utilization on low-memory architectures
-ifneq (,$(filter $(DEB_BUILD_ARCH),armel armhf hppa loong64 mips mipsel))
+ifneq (,$(filter $(DEB_BUILD_ARCH),armel armhf hppa mips mipsel))
 DEB_SETUP_GHC_CONFIGURE_ARGS += --ghc-options="-optc--param -optcggc-min-expand=10 -O0"
 endif
 
+ifneq (,$(filter $(DEB_BUILD_ARCH),loong64))
+  DEB_SETUP_GHC_CONFIGURE_ARGS += --ghc-options="-optc-mcmodel=medium"
+endif
+
 ifneq (,$(filter $(DEB_HOST_ARCH_CPU), i386))
 DEB_SETUP_GHC_CONFIGURE_ARGS += --ghc-options="-O0"
 endif

--- End Message ---
--- Begin Message ---
Source: pandoc
Source-Version: 3.1.11.1+ds-1
Done: Jonas Smedegaard <dr@jones.dk>

We believe that the bug you reported is fixed in the latest version of
pandoc, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 1071205@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Jonas Smedegaard <dr@jones.dk> (supplier of updated pandoc package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@ftp-master.debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

Format: 1.8
Date: Tue, 15 Oct 2024 12:09:54 +0200
Source: pandoc
Architecture: source
Version: 3.1.11.1+ds-1
Distribution: unstable
Urgency: medium
Maintainer: Debian Haskell Group <debian-haskell@lists.debian.org>
Changed-By: Jonas Smedegaard <dr@jones.dk>
Closes: 1068734 1071205 1084227 1084772 1085135
Changes:
 pandoc (3.1.11.1+ds-1) unstable; urgency=medium
 .
   [ upstream ]
   * new release(s);
     closes: bug#1084227, #1084772, #1068734, #1085135,
     thanks to Bjarni Ingi Gislason, Fab Stz and Sylvestre Ledru
 .
   [ Gianfranco Costamagna ]
   * work around linking issue on loong64,
     and stop treat loong64 as low-memory architecture;
     closes: bug#1071205, thanks to Dandan Zhang
 .
   [ Jonas Smedegaard ]
   * tighten build-dependency on libghc-pandoc-dev
   * update rule to generate man page,
     apparently no longer needing filter files existing ahead of build
Checksums-Sha1:
 cedc95ddf600f477d157c82a25bf21fe7bfc36f9 2522 pandoc_3.1.11.1+ds-1.dsc
 1ecd9ee7e22f20507a32cc52f5b9726f3085da30 119724 pandoc_3.1.11.1+ds.orig.tar.xz
 8225633b360f42784e1bbf98eb2371a1522d4017 40168 pandoc_3.1.11.1+ds-1.debian.tar.xz
 73b4719d033958bcb6bfe107c5b83a25a220d675 22094 pandoc_3.1.11.1+ds-1_amd64.buildinfo
Checksums-Sha256:
 a56f0dc4629ea968a5cc4ba7a9355619db362eee0100297296bab5fb8988b486 2522 pandoc_3.1.11.1+ds-1.dsc
 d1d70d1cf2846456c60b89e4a2bd662b9feea231db28270031a098ee91c09f93 119724 pandoc_3.1.11.1+ds.orig.tar.xz
 b000fa624f7bdc3c98161e4b1314e2b1ca36b1f489cea12fcdcfe477970aa15c 40168 pandoc_3.1.11.1+ds-1.debian.tar.xz
 56a63027ef787df8fdf0524c32517587ba3ae93fc1ce8deae9ac4fc7f07062cb 22094 pandoc_3.1.11.1+ds-1_amd64.buildinfo
Files:
 d651e08e9081ad44f797e13e32f05f90 2522 text optional pandoc_3.1.11.1+ds-1.dsc
 11897ef7c304e118d34143cc899c06ff 119724 text optional pandoc_3.1.11.1+ds.orig.tar.xz
 fa65e06fd21b9955e92b24955f5b31db 40168 text optional pandoc_3.1.11.1+ds-1.debian.tar.xz
 5b050e611e527df252edae99a2be3b3f 22094 text optional pandoc_3.1.11.1+ds-1_amd64.buildinfo

-----BEGIN PGP SIGNATURE-----

iQJABAEBCgAqFiEEn+Ppw2aRpp/1PMaELHwxRsGgASEFAmcOQAAMHGRyQGpvbmVz
LmRrAAoJECx8MUbBoAEhdKMP/R6mBNTCGqZ4xqjvpZOatMAgw1GnXaK/MBrdhq3G
MV5EakpDv/MXwSsaqSgefFsWmJFKKw0k/PVLlzKujdzBTLbqifdTCldKnfJnp8Jl
kp1gO3Z2dMe9fpSwzRv7zT5nsSDgk+vClMaci+Slzp88qElRopn3TVqNf7KqAm7s
DdmLkXYSXnXwYH6udyVNSjof6Mc/koL/SyzHldeHCMZOU8yCLrq8AZ1gi2RDUYK2
ICKDJu9i3Jyft8YZ50E8h1xhNGsJhoWH/ysJOu1WU9fbAIuxVgndnnMgAY1g7pXi
4Y/PvpkS3Ryi+pFyn452WLhsfOTjmPykTvzQniuz61m7TxfXpn2wzJoOS9lPpYzB
lHZjL1Vu4RrkL0NWrXAuhnGXJMQCtTcJcZcW7I01PsWmdNxsQBNisa5qgGCK+xw9
2ejF/E1m4hHlWECq6Vcn96WnyLdth0K5XcBLfjYjQEzh69w91IddC2DrOjKq0YwD
MYidtQMPj9yZynftd4bUKGvLWXSOjoBK3P+0whg2Dvwafd1Do95A7c4z3giZ/5Ip
r8Nc/p1TbrDxpOj4D3Y9Zy6CXJet35mtFUStHCVy43ucEKjnoCYxcMVRdSElG0Fj
SaZeTXmnkRgVYu2SGob2IHTEA6iY5Tss2cvTTkpG/nRy/5vSiNU09cNKA/AcAxbH
79Ll
=5tHn
-----END PGP SIGNATURE-----

Attachment: pgpGhJJInmnM1.pgp
Description: PGP signature


--- End Message ---

Reply to: