Re: Bug#1023649: ghc: FTBFS haskell-random powerpc (ghc Segmentation fault)

John Paul Adrian Glaubitz <[email protected]> Thu, 30 Jul 2026 20:41:54 +0200
Newsgroups gmane.linux.debian.ports.powerpc
Message-ID <31875a114b81b78b7125d3ce31625ff99f55a555.camel@physik.fu-berlin.de>
Hi,

On Fri, 2024-06-14 at 10:33 +0200, John Paul Adrian Glaubitz wrote:
> GHC 9.6.5 still fails on powerpc with the NGC enabled:
>=20
> # rts/include/rts/prof/LDV.h
> > Run Ghc CompileHs Stage1: rts/HeapStackCheck.cmm =3D> _build/stage1/rts=
/build/cmm/HeapStackCheck.debug_o
> > Run Ghc CompileHs Stage1: rts/PrimOps.cmm =3D> _build/stage1/rts/build/=
cmm/PrimOps.p_o
> > Run Ghc CompileHs Stage1: rts/Updates.cmm =3D> _build/stage1/rts/build/=
cmm/Updates.thr_p_o
> > Run Ghc CompileHs Stage1: rts/Compact.cmm =3D> _build/stage1/rts/build/=
cmm/Compact.thr_p_o
> > Run Ghc CompileHs Stage1: rts/Exception.cmm =3D> _build/stage1/rts/buil=
d/cmm/Exception.o
> > Run Ghc CompileHs Stage1: rts/PrimOps.cmm =3D> _build/stage1/rts/build/=
cmm/PrimOps.debug_o
> > Run Ghc CompileHs Stage1: rts/StgStartup.cmm =3D> _build/stage1/rts/bui=
ld/cmm/StgStartup.debug_p_o
> > Run Ghc CompileHs Stage1: rts/HeapStackCheck.cmm =3D> _build/stage1/rts=
/build/cmm/HeapStackCheck.p_o
> > Run Ghc CompileHs Stage1: rts/StgStartup.cmm =3D> _build/stage1/rts/bui=
ld/cmm/StgStartup.thr_debug_p_o
> > Run Ghc CompileHs Stage1: rts/StgMiscClosures.cmm =3D> _build/stage1/rt=
s/build/cmm/StgMiscClosures.debug_o
> > Run Ghc CompileHs Stage1: rts/StgMiscClosures.cmm =3D> _build/stage1/rt=
s/build/cmm/StgMiscClosures.p_o
> > Run Ghc CompileHs Stage1: rts/ContinuationOps.cmm =3D> _build/stage1/rt=
s/build/cmm/ContinuationOps.debug_p_o
> > Run Ghc CompileHs Stage1: rts/Updates.cmm =3D> _build/stage1/rts/build/=
cmm/Updates.debug_p_o
> > Run Ghc CompileHs Stage1: rts/StgStartup.cmm =3D> _build/stage1/rts/bui=
ld/cmm/StgStartup.thr_p_o
> > Run Ghc CompileHs Stage1: rts/Apply.cmm =3D> _build/stage1/rts/build/cm=
m/Apply.o
> > Run Ghc CompileHs Stage1: rts/Exception.cmm =3D> _build/stage1/rts/buil=
d/cmm/Exception.debug_o
> > Run Ghc CompileHs Stage1: rts/Apply.cmm =3D> _build/stage1/rts/build/cm=
m/Apply.thr_dyn_o
> Command line: _build/stage0/bin/ghc -Wall -Wcompat -hisuf debug_p_hi -osu=
f debug_p_o -hcsuf debug_p_hc -static -prof -DDEBUG -optc-DDEBUG -hide-all-=
packages -no-user-package-db '-package-env -' '-
> package-db _build/stage1/inplace/package.conf.d' '-this-unit-id rts-1.0.2=
' -i -i/home/glaubitz/ghc-deb-9.6.5-new/ghc-9.6.5/_build/stage1/rts/build -=
i/home/glaubitz/ghc-deb-9.6.5-new/ghc-
> 9.6.5/_build/stage1/rts/build/autogen -i/home/glaubitz/ghc-deb-9.6.5-new/=
ghc-9.6.5/rts -Irts/include -I_build/stage1/rts/build -I_build/stage1/rts/b=
uild/include
> -I_build/stage1/rts/build/@FFIIncludeDir@ -I_build/stage1/rts/build/@Libd=
wIncludeDir@ -Irts/include -Irts/@FFIIncludeDir@ -Irts/@LibdwIncludeDir@ -o=
ptP-include -
> optP_build/stage1/rts/build/autogen/cabal_macros.h -ghcversion-file=3Drts=
/include/ghcversion.h -outputdir _build/stage1/rts/build -fdiagnostics-colo=
r=3Dalways -Wnoncanonical-monad-instances -optc-Wno-
> error=3Dinline -optP-Wno-nonportable-include-path -c rts/ContinuationOps.=
cmm -o _build/stage1/rts/build/cmm/ContinuationOps.debug_p_o -O2 -H32m -thi=
s-unit-id rts -XHaskell98 -no-global-package-db -
> package-db=3D/home/glaubitz/ghc-deb-9.6.5-new/ghc-9.6.5/_build/stage1/inp=
lace/package.conf.d -ghcversion-file=3Drts/include/ghcversion.h -ghcversion=
-file=3Drts/include/ghcversion.h -haddock -Irts -
> I_build/stage1/rts/build '-DRtsWay=3D"rts_debug_p"' -DFS_NAMESPACE=3Drts =
-DCOMPILING_RTS -DPROFILING -Wno-deprecated-flags -Wcpp-undef
> =3D=3D=3D> Command failed with error code: 1
> ghc: panic! (the 'impossible' happened)
>   GHC version 9.6.5:
>         PPC.Ppr.pprInstr: JMP to ForeignLabel
>   CallStack (from HasCallStack):
>     panic, called at compiler/GHC/CmmToAsm/PPC/Ppr.hs:591:30 in ghc:GHC.C=
mmToAsm.PPC.Ppr
>=20
>=20
> Please report this as a GHC bug:  https://www.haskell.org/ghc/reportabug
>=20
> Error when running Shake build system:
>   at want, called at src/Main.hs:124:44 in main:Main
> * Depends on: binary-dist-dir
>   at need, called at src/Rules/BinaryDist.hs:130:9 in main:Rules.BinaryDi=
st
> * Depends on: _build/stage1/lib/package.conf.d/rts-1.0.2.conf
>   at need, called at src/Rules/Register.hs:134:5 in main:Rules.Register
> * Depends on: _build/stage1/rts/build/stamp-rts-1.0.2_debug_p
>   at need, called at src/Rules/Library.hs:144:3 in main:Rules.Library
> * Depends on: _build/stage1/rts/build/libHSrts-1.0.2_debug_p.a
>   at need, called at src/Rules/Library.hs:220:5 in main:Rules.Library
> * Depends on: _build/stage1/rts/build/cmm/ContinuationOps.debug_p_o
>   at cmd', called at src/Builder.hs:387:23 in main:Builder
>   at cmdArgs, called at src/Builder.hs:540:8 in main:Builder
>   at cmdArgs, called at src/Builder.hs:564:18 in main:Builder
>   at cmdArgs, called at src/Builder.hs:564:18 in main:Builder
>   at error, called at src/Builder.hs:609:13 in main:Builder
> * Raised the exception:
> Command failed
>=20
> Build failed.

This was fixed upstream in [1][2][3][4], closing.

There is another unrelated issue with runghc on powerpc though, see [5].

Adrian

> [1] https://gitlab.haskell.org/ghc/ghc/-/merge_requests/12926
> [2] https://gitlab.haskell.org/ghc/ghc/-/merge_requests/12881
> [3] https://gitlab.haskell.org/ghc/ghc/-/merge_requests/15423
> [4] https://gitlab.haskell.org/ghc/ghc/-/merge_requests/15440
> [5] https://gitlab.haskell.org/ghc/ghc/-/work_items/26837

--=20
 .''`.  John Paul Adrian Glaubitz
: :' :  Debian Developer
`. `'   Physicist
  `-    GPG: 62FF 8A75 84E0 2956 9546  0006 7426 3B37 F5B5 F913