Package: ghc
Version: 9.6.6-2
Severity: important
Tags: ftbfs help
User: debian-loonga...@lists.debian.org
Usertags: loong64

Hi Ilias and LocutusOfBorg,

Based on ghc 9.6.6-2(use extra --ghc-options does not reduce binary size), compiling haskell-pandoc still throws errors.
1. extra --ghc-options in d/rules is as follows,
```
ifneq (,$(filter loong64, $(DEB_HOST_ARCH)))
  EXTRA_HADRIAN_FLAGS += "*.*.ghc.*.opts += -optc-mcmodel=medium"
endif

```

2. error log of haskell-pandoc is as follows,
```
Building test suite 'test-pandoc' for pandoc-3.1.11.1..
[58 of 58] Linking dist-ghc/build/test-pandoc/test-pandoc
/usr/bin/ld: dist-ghc/build/test-pandoc/test-pandoc-tmp/Tests/Helpers.o: relocation R_LARCH_B26 overflow 0x89f8bbc
Dump relocate record:
stack top        relocation name        symbol
......
dist-ghc/build/test-pandoc/test-pandoc-tmp/Tests/Helpers.o:(.text+0x4): relocation truncated to fit: R_LARCH_B26 against symbol `stg_ap_0_fast' defined in .text section in /usr/lib/ghc/lib/../lib/loongarch64-linux-ghc-9.6.6/rts-1.0.2/libHSrts-1.0.2_thr.a(Apply.thr_o)
/usr/bin/ld: final link failed: bad value
collect2: error: ld returned 1 exit status
ghc-9.6.6: `loongarch64-linux-gnu-gcc' failed in phase `Linker'. (Exit code: 1) -e: error: debian/hlibrary.setup build --builddir=dist-ghc returned exit code 1
......

```

For ghc, the full build log can be found at https://buildd.debian.org/status/logs.php?pkg=ghc&arch=loong64. For haskell-pandoc, the full build log can be found at https://buildd.debian.org/status/logs.php?pkg=haskell-pandoc&arch=loong64.

Please give us some suggestions.
Let's discuss and solve the problem together under this bug.
Your opinions are welcome.

Dandan

Reply via email to