Source: haskell-pandoc
Version: 3.1.3-1
Severity: normal
Tags: ftbfs
Usertags: loong64
X-Debbugs-Cc: zhangjial...@loongson.cn, fanp...@loongson.cn 
zhangdan...@loongson.cn

Dear Maintainer,

The haskell-pandoc build failed in buildd.debian.org for loong64 , The error 
log is  
https://buildd.debian.org/status/fetch.php?pkg=haskell-pandoc&arch=loong64&ver=3.1.3-1&stamp=1709428706&raw=0

The compile error is:

"
/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)

at 
/usr/lib/gcc/loongarch64-linux-gnu/13/../../../loongarch64-linux-gnu/crt1.o(.text+0x4):
0x0000000000000000 R_LARCH_GOT_PC_HI20  `main'
0x0000000000000000 R_LARCH_RELAX        `<nameless>'

...


/usr/lib/ghc/lib/../lib/loongarch64-linux-ghc-9.4.7/rts-1.0.2/libHSrts-1.0.2_thr.a(NonMovingMark.thr_o):
 in function `.LVL4':
(.text+0x38): relocation truncated to fit: R_LARCH_B26 against symbol 
`pthread_mutex_lock@@GLIBC_2.36' defined in .plt section in 
/usr/lib/gcc/loongarch64-linux-gnu/13/../../../loongarch64-linux-gnu/crt1.o
/usr/bin/ld.bfd: final link failed: bad value
collect2: error: ld returned 1 exit status
ghc-9.4.7: `loongarch64-linux-gnu-gcc' failed in phase `Linker'. (Exit code: 1)
-e: error: debian/hlibrary.setup build --builddir=dist-ghc returned exit code 1
 at /usr/share/perl5/Debian/Debhelper/Dh_Lib.pm line 880.
        Debian::Debhelper::Dh_Lib::error("debian/hlibrary.setup build 
--builddir=dist-ghc returned exit"...) called at 
/usr/share/perl5/Debian/Debhelper/Dh_Lib.pm line 610
        Debian::Debhelper::Dh_Lib::error_exitcode("debian/hlibrary.setup build 
--builddir=dist-ghc") called at /usr/share/perl5/Debian/Debhelper/Dh_Lib.pm 
line 473
        Debian::Debhelper::Dh_Lib::doit("debian/hlibrary.setup", "build", 
"--builddir=dist-ghc") called at 
/usr/share/perl5/Debian/Debhelper/Buildsystem/Haskell/Recipes.pm line 656
        Debian::Debhelper::Buildsystem::Haskell::Recipes::build_recipe() called 
at -e line 1
make: *** [/usr/share/cdbs/1/class/hlibrary.mk:158: build-ghc-stamp] Error 25

"

When links there will have a "relocation R_LARCH_B26 overflow" for the binary 
too large . When we use 
DEB_SETUP_GHC_CONFIGURE_ARGS=--enable-executable-dynamic -O2  to build , this 
will build fine . 

Please , If we chould add this build options in Debian/rules ? If no ,How 
chould I do for this problem?


-- System Information:
Debian Release: trixie/sid
  APT prefers unreleased
  APT policy: (500, 'unreleased'), (500, 'unstable')
Architecture: loong64 (loongarch64)

Kernel: Linux 5.10.0-60.96.0.126.oe2203.loongarch64 (SMP w/32 CPU threads)
Locale: LANG=C, LC_CTYPE=C.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: unable to detect

Reply via email to