Just an observation: adding the -O0 option here will create an unoptimized build, which will run more slowly. So this is definitely not a patch that should remain more than short-term.
I have no idea what this issue is, by the way. We regularly test pandoc upstream against ghc versions 8.6.5, 8.8.4, 8.10.7, 9.2.3, and 9.4.2, and I've never seen this issue. > On Nov 24, 2022, at 1:39 AM, Debian Bug Tracking System > <ow...@bugs.debian.org> wrote: > > The patch below workarounds the issue, which indicates that it might > be a bug in the compiler and not a problem in pandoc? > > Short-term it might even be good enough to unblock migration of several > packages to testing. > > --- debian/rules.old 2022-10-30 17:52:59.643347191 +0000 > +++ debian/rules 2022-10-30 17:54:14.347251214 +0000 > @@ -192,6 +192,10 @@ > DEB_SETUP_GHC_CONFIGURE_ARGS += --ghc-options="-optc--param > -optcggc-min-expand=10 -O0" > endif > > +ifneq (,$(filter $(DEB_HOST_ARCH_CPU), i386)) > +DEB_SETUP_GHC_CONFIGURE_ARGS += --ghc-options="-O0" > +endif > + > DEB_SETUP_GHC_CONFIGURE_ARGS += $(if $(filter > nocheck,$(DEB_BUILD_OPTIONS)),,-ftests) > > DEB_INSTALL_DOCS_ALL += README.md > 17.1.1-1.1) unstable; urgency=low > . > * Non-maintainer upload. > * Workaround i386 FTBFS with -O0. (Closes: #1023149) > Checksums-Sha1: > b8474b357393a855e985003374b89cf1d8cc566a 9172 pandoc_2.17.1.1-1.1.dsc > 14914bf918799cd45b75e9c71748f5a1c13acc2b 59012 > pandoc_2.17.1.1-1.1.debian.tar.xz > Checksums-Sha256: > ccb354586541dfc3e0b121b527d10bdbc39f8369b3d7072276bee7558f56fa3e 9172 > pandoc_2.17.1.1-1.1.dsc > 07ef9d2654ba4cbdf018ca6c691b5330348ee5c0fd85813cf4dc91d46822127f 59012 > pandoc_2.17.1.1-1.1.debian.tar.xz > Files: > ccfd9b94d62c2efea06540f914c9e8b1 9172 text optional pandoc_2.17.1.1-1.1.dsc > 9d1452b2c9c481ef8740f81480b2b81b 59012 text optional > pandoc_2.17.1.1-1.1.debian.tar.xz > > -----BEGIN PGP SIGNATURE----- > > iQIzBAEBCgAdFiEEOvp1f6xuoR0v9F3wiNJCh6LYmLEFAmN4118ACgkQiNJCh6LY > mLF08Q//e3i2jHi91hJSH7HCyAGhCQq8KrnZWwp99EK/MgdAqDcQtLc3NR/APnUc > DwuzqDUA1cHJb/say/MeU2tdj3k9sBAD+MzhP150u1LZQKxFnpmbQLS42e545r1g > T2lCBNsXUleK5a3fZCjx9gwuvJCTRZX0h6HEWooirCy8e6AY0K2nptWbEiiApSDk > q1rcgyaFjNijYldYfPxPo9DXz6cdK1TTjlyAxxcvM7EJGgGUX7ROB6FKN73Y6mU8 > DjSu4LyrgK9vmGPU55VhiKrfDQy6zQbEzhU+ovmSkul3gVSbGarutvbbfi2/FleJ > 7MKpqgNb0mO/a9vNQ+69BJwVkYje35XtBfNNVoUjAqrgbNuCb5n8wuTYIFDyPudu > MEFWPt615Pxn8395wvQyGBxVLbpOWwH/PPRGBm3G69n6fYXF2NcyLzCyXD7vyIjl > FIH5K76q06E5CkTnFweXxSiDKFs/X30V4BOYiyShrLAAPBVQNYcEGFtPw7RRRrMZ > HYnjShF5J3/+14J5ACBrO4czZhROkwxyeEAaRcGqCQevj+uJuMk3RQiiTr1zcdID > cFYwlj9xXZZwGqGfYgcuc+w4iV1tp6OnrbDfSjEphC0hrT26dxpoT0EUv1+dKChx > MiZsYj/5nkjpLG8MIA/MpIU9mOiAuo/bhf/3fzmw7WQSWDWDxHk= > =PDz7 > -----END PGP SIGNATURE----- >