<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <p>Close +1<br>
    </p>
    <p>Please close the bug.<br>
    </p>
    <p>On Wed, 17 Apr 2024 19:08:11 +0800 zhangdandan <zhangdandan@loongson.cn>
        wrote:</zhangdandan@loongson.cn></p>
    <p><zhangdandan@loongson.cn></zhangdandan@loongson.cn></p>
    <zhangdandan@loongson.cn>> Source: haskell-pandoc-lua-engine<br>
      > Version: 0.2.0.1-1<br>
      > Severity: important<br>
      > Tags: ftbfs patch<br>
      > User: <a class="moz-txt-link-abbreviated" href="mailto:debian-loongarch@lists.debian.org">debian-loongarch@lists.debian.org</a><br>
      > Usertags: loong64<br>
      > <br>
      > Dear maintainers,<br>
      > <br>
      > The haskell-pandoc-lua-engine is blocked from building by
      haskell-pandoc <br>
      > in the Debian Package Auto-Building environment.<br>
      > Compiling the haskell-pandoc-lua-engine failed for loong64 in
      my local ENV.<br>
      > The error message is consistent with haskel-pandoc, and both
      are related <br>
      > to "relocation R_LARCH_B26 overflow ......" during static
      linking in the <br>
      > test-pandoc stage.<br>
      > The build error log of haskell-pandoc-lua-engine from my
      local ENV is as <br>
      > follows,<br>
      > ```<br>
      > [6 of 6] Linking <br>
      > dist-ghc/build/test-pandoc-lua-engine/test-pandoc-lua-engine<br>
      > /usr/bin/ld.bfd: <br>
      >
/usr/lib/ghc/lib/../lib/loongarch64-linux-ghc-9.4.7/rts-1.0.2/libHSrts-1.0.2.a(NonMovingMark.o):
      <br>
      > relocation R_LARCH_B26 overflow 0xfffffffff61da41c<br>
      > Dump relocate record:<br>
      > stack top        relocation name        symbol<br>
      > at <br>
      >
/usr/lib/ghc/lib/../lib/loongarch64-linux-ghc-9.4.7/rts-1.0.2/libHSrts-1.0.2.a(NonMovingMark.o)(.text+0xae4):<br>
      > ...<br>
      > 0x0000000000000000 R_LARCH_B16    `.L172'<br>
      > ......<br>
      > ```<br>
      > <br>
      > There are two suggestions to solve "relocation R_LARCH_B26
      overflow <br>
      > ......" during static linking.<br>
      > 1.Add build rules to reduce binary size.<br>
      > 2.Disable tests in d/rules on loong64.<br>
      > The detailed information can be found from haskell-pandoc's
      Bug <br>
      > (#1069165) I just submitted.<br>
      > <br>
      > It is recommended to use "DEB_ENABLE_TESTS = no" in d/rules
      for loong64.<br>
      > Please consider the patch I attached.<br>
      > With the attached patch, the haskell-pandoc-lua-engine was
      built <br>
      > successfully in my local ENV.<br>
      > ```<br>
      > ......<br>
      > if grep -q '^Component:[[:space:]]*main' /CurrentlyBuilding
      2>/dev/null; <br>
      > then dh_scour -plibghc-pandoc-lua-engine-prof ; fi<br>
      > dh_md5sums -plibghc-pandoc-lua-engine-prof<br>
      > dh_builddeb -plibghc-pandoc-lua-engine-prof<br>
      > dpkg-deb: building package 'libghc-pandoc-lua-engine-prof' in
      <br>
      > '../libghc-pandoc-lua-engine-prof_0.2.0.1-1_loong64.deb'.<br>
      >  dpkg-genbuildinfo <br>
      > -O../haskell-pandoc-lua-engine_0.2.0.1-1_loong64.buildinfo<br>
      >  dpkg-genchanges
      -O../haskell-pandoc-lua-engine_0.2.0.1-1_loong64.changes<br>
      > ```<br>
      > <br>
      > Your opinions are welcome.<br>
      > <br>
      > Thanks,<br>
      > Dandan Zhang<br>
    </zhangdandan@loongson.cn><br>
  </body>
</html>