User:Jens3/ghc

ghc is a haskell compiler that cannot be build without a ghc binary. Since September 2022 there is ghc-bin, see Bug 622786 - dev-lang/ghc: arm64 binary request. As of 2021-12-08 there was no binary for arm64 in neither the gentoo nor the haskell repo. If you have an amd64 you can cross compile ghc. You can try a binary from somewhere else.


 * pandoc needs ghc


 * 

Installing didn't work
make[1]: *** [ghc.mk:992: install_packages] Error 127 make: *** Error 2
 * wget https://downloads.haskell.org/~ghc/8.8.2/ghc-8.8.2-aarch64-deb9-linux.tar.xz
 * ./configure
 * su "make install" leads to
 * utils/ghc-cabal/dist-install/build/tmp/ghc-cabal: error while loading shared libraries: libnuma.so.1: cannot open shared object file: No such file or directory

the unclean way: edit the ebuild

 * edit the ebuild
 * ebuild EBUILD_name manifest
 * then build it once and hopefully native builds will just work, so you can then re-build with uneditted ebuild
 * https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-8.8.2-aarch64-unknown-linux-gnu.tbz2
 * ebuild ghc-8.10.6.ebuild manifest

using debian version
/usr/local/lib/ghc-9.0.1/bin/ghc: /usr/lib64/libtinfo.so.5: no version information available (required by /usr/local/lib/ghc-9.0.1/bin/../haskeline-0.8.1.0/libHShaskeline-0.8.1.0-ghc9.0.1.so) /usr/local/lib/ghc-9.0.1/bin/ghc: /usr/lib64/libtinfo.so.5: no version information available (required by /usr/local/lib/ghc-9.0.1/bin/../ghc-9.0.1/libHSghc-9.0.1-ghc9.0.1.so) /usr/local/lib/ghc-9.0.1/bin/ghc: /usr/lib64/libtinfo.so.5: no version information available (required by /usr/local/lib/ghc-9.0.1/bin/../terminfo-0.4.1.4/libHSterminfo-0.4.1.4-ghc9.0.1.so)
 * https://downloads.haskell.org/~ghc/9.0.1/ghc-9.0.1-aarch64-deb9-linux.tar.xz
 * emerge -va sys-process/numactl # since libnuma.so* was missing during make install
 * ./configure
 * emerge -va sys-libs/ncurses-compat # libtinfo.so.5 was missing
 * make install # default target /usr/local/
 * ghc --help #works, from debian in /usr/local, but warns:

You are using an unsupported version of LLVM! Currently only 9 is supported. System LLVM version: 13.0.0 We will try though...
 * USE="-binary +ghcbootstrap"
 * emerge -va =dev-lang/ghc-9.0.1-r1

real   1142m17.026s user   1020m6.627s sys    92m32.404s

Success!

cd /usr/local/bin rm ghc*