When building with default USE flags, the build crashes with the error sed: can't read /tmp/portage/dev-lang/ghc-9.0.2/work/usr/bin/ghc-9.0.2: No such file or directory However, if setting USE=ghcbootstrap the ebuild builds fine, with the caveat that the Debian patch "Disable-unboxed-arrays.patch" is still needed. I used dev-lang/ghc-9.0.1-r1 as the system compiler for bootstrapping. Previous ghc ebuilds (which were not keyworded for ppc64) displayed a message requesting the user to enable USE=ghcbootstrap and report success to haskell@gentoo.org instead of crashing. My offer to provide binpkgs that I made last year when reporting bootstrap success for ghc-9.0.1-r1 still stands. :-) Reproducible: Always Steps to Reproduce: 1.On a ppc64 system (big endian profile) 2.emerge =dev-lang/ghc-9.0.2 3. Actual Results: src_prepare bombs out with "No such file or directory" Expected Results: Preferably that the build succeeds, but failing that a message to enable ghcbootstrap like in previous ebuilds would have been preferable.
Created attachment 799795 [details] Complete build log
Created attachment 799797 [details, diff] Debian patch needed for ghc to work correctly on big endian This patch does not fix the "no such file or directory" problem, but it is needed to get a working ghc. In upstreams head, there is a workaround in place but it looks like 9.0.2 still does not contain it.
Created attachment 799799 [details] Output from emerge --info
For completeness, here is the upstreams tracker for the unboxed arrays thing: https://gitlab.haskell.org/ghc/ghc/-/issues/16998 and here is their workaround: https://gitlab.haskell.org/ghc/packages/containers/-/commit/f5a511f1ff2cf16e710342948792cb8d7576e27c
Hi Marcus - if you can provide a link to a binpkg for BE ppc64 I will bring both of those in. I have been keywording the ecosystem but my system runs LE.
binpkg: https://mc.pp.se/ghc-9.0.2-ppc64-package.tar.xz The binpkg is built with the "Disable-unboxed-arrays.patch" patch enabled. Note that this patch disables unboxed arrays generally, so for adding a patch to the ebuild it's better to use the upstreams one which does it for BE only. I can also make a binpkg for arm64 if desired.
Created attachment 799859 [details, diff] Upstreams patch for unboxed containers issue This is a massaged version of the upstreams patch for the unboxed containers issue which applies cleanly. Only the path names have been changed. This patch is needed for all versions currently in tree. Fedora say that they apply it for <9.4.
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=cf7899db70b1379f1633f88e848a0ca3bcd92f62 commit cf7899db70b1379f1633f88e848a0ca3bcd92f62 Author: matoro <matoro@users.noreply.github.com> AuthorDate: 2022-08-19 00:00:22 +0000 Commit: Sam James <sam@gentoo.org> CommitDate: 2022-08-21 02:25:05 +0000 dev-lang/ghc: add big-endian ppc64 binary This requires a patch to work correctly on BE systems. Apply the patch unconditionally since it is already includes the appropriate checks in the code. Delete a few lines of commented-out obsolete patches. Closes: https://bugs.gentoo.org/865311 Thanks-to: Marcus Comstedt <marcus@mc.pp.se> Closes: https://github.com/gentoo/gentoo/pull/26921 Signed-off-by: Sam James <sam@gentoo.org> dev-lang/ghc/Manifest | 1 + .../files/ghc-9.0.2-disable-unboxed-arrays.patch | 39 ++++++++++++++++++++++ dev-lang/ghc/ghc-9.0.2.ebuild | 28 ++++------------ 3 files changed, 46 insertions(+), 22 deletions(-)