https://launchpad.net/ubuntu/+source/ghc/8.0.2-0~build1/+build/11904219 add alt binary as option. might be more useful option on low memory devices.. * Package: dev-lang/ghc-8.0.2 * Repository: gentoo * Maintainer: haskell@gentoo.org * USE: arm64 binary elibc_glibc gmp kernel_linux profile userland_GNU * FEATURES: compressdebug distcc distcc-pump preserve-libs sandbox splitdebug userpriv usersandbox >>> ^[[1m^[[37mcfg-update-1.8.2-r1^[[0m^[[0m: Skipping checksum index updating... >>> Unpacking source... >>> Unpacking ghc-bin-8.0.2-arm64.tbz2 to /var/tmp/portage/dev-lang/ghc-8.0.2/work bzip2: /var/tmp/portage/dev-lang/ghc-8.0.2/distdir/ghc-bin-8.0.2-arm64.tbz2: trailing garbage after EOF ignored >>> Source unpacked in /var/tmp/portage/dev-lang/ghc-8.0.2/work >>> Preparing source in /var/tmp/portage/dev-lang/ghc-8.0.2/work/ghc-8.0.2 ... * PT_PAX marking -m /var/tmp/portage/dev-lang/ghc-8.0.2/work/usr/lib64/ghc-8.0.2/bin/ghc with paxctl * PT_PAX marking -m /var/tmp/portage/dev-lang/ghc-8.0.2/work/usr/lib64/ghc-8.0.2/bin/ghc with scanelf * XATTR_PAX marking -me /var/tmp/portage/dev-lang/ghc-8.0.2/work/usr/lib64/ghc-8.0.2/bin/ghc with setfattr * Failed to set XATTR_PAX markings -me /var/tmp/portage/dev-lang/ghc-8.0.2/work/usr/lib64/ghc-8.0.2/bin/ghc. >>> Source prepared. distcc[10116] (dcc_parse_hosts) Warning: /etc/distcc/hosts contained no hosts; can't distribute work distcc[10116] (dcc_show_hosts) CRITICAL! Failed to get host list /usr/bin/pump: error: pump mode requested, but distcc hosts list does not contain any hosts with ',cpp' option >>> Configuring source in /var/tmp/portage/dev-lang/ghc-8.0.2/work/ghc-8.0.2 ... >>> Source configured. distcc[10173] (dcc_parse_hosts) Warning: /etc/distcc/hosts contained no hosts; can't distribute work distcc[10173] (dcc_show_hosts) CRITICAL! Failed to get host list /usr/bin/pump: error: pump mode requested, but distcc hosts list does not contain any hosts with ',cpp' option >>> Compiling source in /var/tmp/portage/dev-lang/ghc-8.0.2/work/ghc-8.0.2 ... >>> Source compiled. distcc[10231] (dcc_parse_hosts) Warning: /etc/distcc/hosts contained no hosts; can't distribute work distcc[10231] (dcc_show_hosts) CRITICAL! Failed to get host list /usr/bin/pump: error: pump mode requested, but distcc hosts list does not contain any hosts with ',cpp' option >>> Test phase [not enabled]: dev-lang/ghc-8.0.2 distcc[10286] (dcc_parse_hosts) Warning: /etc/distcc/hosts contained no hosts; can't distribute work distcc[10286] (dcc_show_hosts) CRITICAL! Failed to get host list /usr/bin/pump: error: pump mode requested, but distcc hosts list does not contain any hosts with ',cpp' option
Michael, I have severe difficulties to understand the bug report. I guess, that you wish a new binary ebuild. If possible, please discuss the rest if the ticket with someone and add a short, but precise text with complete sentences. Hint: Imagine you have only one chance in your life to write this very important bug report and you know only that the recipient can read English, but it is not his native language. https://wiki.gentoo.org/wiki/Bugzilla/Bug_report_guide#Best_practice
I have a https://github.com/sakaki-/gentoo-on-rpi3-64bit install yes a ghc-bin ebuild for embedded devices would be of use.. or a distfile-bin for arm64-generic.. honestly , i need a better RPI clone board. ie bannanpi-64 with more ram or a Softiron Server. as you can use far more ram... ghc less you have a distcc host the compile will fail. RAM will tax. I could rig a usb stick for 8-16 gigs of swap... https://launchpad.net/ubuntu/+source/ghc/8.0.2-0~build1/+build/11904219 however there are patches etc. I possibly could try. a hand build. however doing an ALIEN run on that dep yields thus. /usr/local and symlink... nuts... /usr/lib/ghc/bin/ghc: /usr/lib64/libtinfo.so.5: no version information available (required by /usr/lib/ghc/bin/../haskeline-0.7.3.0/libHShaskeline-0.7.3.0-ghc8.0.2.so) /usr/lib/ghc/bin/ghc: /usr/lib64/libtinfo.so.5: no version information available (required by /usr/lib/ghc/bin/../terminfo-0.4.0.2/libHSterminfo-0.4.0.2-ghc8.0.2.so) /usr/lib/ghc/package.conf.d/package.cache: openBinaryFile: does not exist (No such file or directory) terminfo-0.4.0.2 is part of ncurses... i have 5.x.... on this one. anyhow if the dist-files for gentoo GHC binaries , might be able to use some of the debian/ubuntu binaries or patches. https://launchpad.net/ubuntu/+source/ghc/8.0.2-0~build1 patches.
OK I adjusted the title. That would fit in 1 to 3 lines. Please prepare the next bug report together with other gentoo users. If you see me on IRC #gentoo, you may contact me and we will optimize your next report together before submission.
https://downloads.haskell.org/~ghc/8.4.2/ghc-8.4.2-aarch64-deb8-linux.tar.xz could be useful in also bootstrapping dev-lang/ghc.. https://medium.com/@zw3rk/ghc-cross-compiler-binary-distributions-490bb2c0c411
Created attachment 535826 [details] portage logs...
The original bug report was a bit unclear but it'd be great to have an arm64 binary added to SRC_URI for bootstrap. Upstream seem to provide them for both armv7 and arm64 here: https://www.haskell.org/ghc/download_ghc_8_10_2.html (for Debian, anyway). If those aren't suitable, it is possible we could sort out access to a VM to prepare these binaries, or the arm{,64} team could help out.
Haskell overlay has bins pinned on a few. Rpi4 with 4 gigs ram doable, however slow.. Thus you could compile a newer ghc w/o bins.. However 8 gigs or an arm64 server recommended. Mainline gentoo, however often hasn't had the bin uri available on many more modern ghc releases, least historically (hx)
Gentoo provides gentoo-built binaries of ghc for various reasons including non-default toolchain setup. arm/arm64 specifically adds into the mix very specific version of llvm needed to be used for ghc. The binaries can be built but I expect high maintenance burden for arm64. I'm fine with adding Gentoo-built ghc into SRC_URI built with https://github.com/gentoo-haskell/gentoo-haskell/blob/master/projects/build-ghc-bin.sh on a default chroot but i'll probably not get to it building binaries myself. Cross-building ghc to get initial seed should be very simple: https://trofi.github.io/posts/200-ghc-as-a-crosscompiler-update.html Tying llvm into it will complicate the task somewhat but should be achievable.
Created attachment 683227 [details, diff] llvm version fix example (In reply to Sergei Trofimovich from comment #8) > Gentoo provides gentoo-built binaries of ghc for various reasons including > non-default toolchain setup. arm/arm64 specifically adds into the mix very > specific version of llvm needed to be used for ghc. [...] > Tying llvm into it will complicate the task somewhat but should be > achievable. It seems to me that all that needs to be done is to configure GHC with LLC=/path/to/correct/version and OPT=/path/to/correct/version, using absolute paths. These paths get baked into the installed GHC settings file, and it will continue to use them. With that I was able to bootstrap 8.10.3 on ARMv7 without too much trouble, using the uptstream-provided ARMv7 binaries as a starting point. (ghc-8.8.x, currently keyworded on other arches, unfortunately requires an llvm version which is not in the tree). The only real problem encountered was that the stage2 compiler segfaults in the ebuild environment, commenting out BOTH the --disable-ld-override and the LD=blah configure option in the ebuild corrected this problem (configure script seems to do the right thing automatically: not sure what's up there). Then modulo a handful of packages that need minor updates to build with GHC 8.10.3, I was able to install pandoc and git-annex no problem (and also rebootstrap GHC).
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=fb9f9f4fb59e743120eb54d32ee450ae0c56cb33 commit fb9f9f4fb59e743120eb54d32ee450ae0c56cb33 Author: Sam James <sam@gentoo.org> AuthorDate: 2021-02-05 00:26:44 +0000 Commit: Sam James <sam@gentoo.org> CommitDate: 2021-02-05 00:27:38 +0000 profiles/arch/arm64: mask media-sound/bluez-alsa[man] Neeeds pandoc but we don't yet have Haskell on arm64. Bug: https://bugs.gentoo.org/622786 Bug: https://bugs.gentoo.org/768738 Signed-off-by: Sam James <sam@gentoo.org> profiles/arch/arm64/package.use.mask | 5 +++++ 1 file changed, 5 insertions(+)
Created attachment 765328 [details, diff] ghc 8.10.6 llvm fixes for arm since ghc 8.10.3 doesn't support any llvm version of the tree, I updated the patch against ghc 8.10.6 which (according to the release notes) supports llvm versions up to 12. I built this one with llvm:11 installed and everything seems fully functional on ARMv7.
Please find binpkgs of ghc 8.10.6 and 9.0.2 for arm64 here: https://mc.pp.se/ghc-packages-arm64.tar.xz They were built natively with USE=ghcbootstrap and the llvm used was sys-devel/llvm:14 8.10.6 was bootstrapped using 8.10.6, but 9.0.2 was bootsrapped using 9.0.1-r1. Both boostrap compilers were in turn built from the ebuilds with USE=ghcbootstrap.
All done in https://github.com/gentoo/gentoo/pull/27048. commit 4f2b75c28da601e734f44f93381b88b59f0233ca Author: matoro <matoro@users.noreply.github.com> Date: Wed Aug 24 13:11:45 2022 -0400 dev-lang/ghc: keyword 9.0.2 for ~arm64 Thanks-to: Marcus Comstedt <marcus@mc.pp.se> Signed-off-by: Sam James <sam@gentoo.org>