Hi Dandan Zhang. Quoting zhangdandan (2024-04-17 14:13:00) > The pandoc is blocked from building by haskell-pandoc and > haskell-pandoc-lua-engine in the Debian Package Auto-Building environment. > I have built haskell-pandoc and haskell-pandoc-lua-engine locally, and > then compiling pandoc for loong64 in my local ENV failed. > > The error message is related to "relocation R_LARCH_B26 overflow ......" > during static linking when built pandoc binary. > The build error log of pandoc from my local ENV is as follows, > ``` > [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 0xfffffffff62f45e4 > 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) > ...... > ``` > > It is recommended to use "--enable-executable-dynamic" in d/rules to > reduce binary size on loong64. > The parameter "--enable-executable-dynamic" means "enable dynamic > linking of executable files". > Please consider the patch I attached. > With the attached patch, the pandoc was built successfully in my local ENV. > ``` > ...... > if grep -q '^Component:[[:space:]]*main' /CurrentlyBuilding 2>/dev/null; > then dh_scour -ppandoc ; fi > dh_md5sums -ppandoc > dh_builddeb -ppandoc > dpkg-deb: building package 'pandoc' in '../pandoc_3.1.3+ds-2_loong64.deb'. > dpkg-genbuildinfo -O../pandoc_3.1.3+ds-2_loong64.buildinfo > dpkg-genchanges -O../pandoc_3.1.3+ds-2_loong64.changes > ``` > > Your opinions are welcome. > In addition, before the pandoc was built for loong64 in the Debian > Package Auto-Building environment, could I dupload the pandoc compiled > locally using "-enable-executable-dynamic" to the > debian-ports/pool-loong64 repository? > Looking forward to your reply.
Unfortunately, Debian treat Haskell libraries as development code, and the option --enable-executable-dynamic works only when development files are also installed. I have instead added loong64 to the list of low-memory architectures, which means these options are applied: --ghc-options="-optc--param -optcggc-min-expand=10 -O0" Hopefully that is enough for the build for loong64 succeeds. Kind regards, - Jonas -- * Jonas Smedegaard - idealist & Internet-arkitekt * Tlf.: +45 40843136 Website: http://dr.jones.dk/ * Sponsorship: https://ko-fi.com/drjones [x] quote me freely [ ] ask before reusing [ ] keep private
signature.asc
Description: signature