Removal of llvm-14.0.6-r4 from the Gentoo ecosystem[^1] breaks dev-lang/ghc on arm/arm64. It's impossible to build ghc without it on arm-based systems. There is a bug open for dev-lang/ghc[^2] about this. There is a request open with the gentoo-haskell GitHub repo[^3] to push out revised versions of the 9.2.8 and 9.0.2-r4 ebuilds to portage that compile with LLVM versions >14. In my view the fastest path to resolution is: 1. Restore sys-devel/llvm-14.0.6-r4. 2. Have the Haskell team push out fixed dev-lang/ghc ebuilds that work with LLVM >14 when they're able. 3. Once the fixed dev-lang/ghc ebuilds have been out for a while, drop sys-devel/llvm-14.0.6-r4 again. --- [1]: <https://gitweb.gentoo.org/repo/gentoo.git/commit/sys-devel/llvm/llvm-14.0.6-r4.ebuild?id=369b3aa2aee476cb3a19ac24cd57db6f9d890199> [2]: Gentoo bug #917641, see comment 3. [3]: https://github.com/gentoo-haskell/gentoo-haskell/issues/1562
# Michał Górny <mgorny@gentoo.org> (2023-12-22) # Requires LLVM 14 that is being removed. <dev-lang/ghc-9.4 llvm <media-gfx/openvdb-11 ax sys-devel/sparse llvm If it's not happened in a year, I suspect it's not going to happen.
I don't see any link to an upstream GHC issue about this.
GHC has native codegen for arm64 since 9.2, so it's not in fact required to build. In the log in 917641 it's trying to use LLVM despite USE=llvm being flipped off, which is a different bug. But LLVM should not be required to build on arm64 since 9.2.
(In reply to matoro from comment #3) > GHC has native codegen for arm64 since 9.2, so it's not in fact required to > build. In the log in 917641 it's trying to use LLVM despite USE=llvm being > flipped off, which is a different bug. But LLVM should not be required to > build on arm64 since 9.2. Okay, I'll give it a try again in the morning without the llvm flag and see what I get.
(In reply to Jeff Gazso from comment #4) > (In reply to matoro from comment #3) > > GHC has native codegen for arm64 since 9.2, so it's not in fact required to > > build. In the log in 917641 it's trying to use LLVM despite USE=llvm being > > flipped off, which is a different bug. But LLVM should not be required to > > build on arm64 since 9.2. > > Okay, I'll give it a try again in the morning without the llvm flag and see > what I get. Sorry - to clarify, you did everything correctly. The log you posted shows that you do not have the llvm flag enabled, yet it is attempting to pull in LLVM anyway. That's a mistake somewhere on our part and I don't yet know where. GHC is sensitive to what backend was used to build it, and also likes to search $PATH an opportunistically enable things. I did my best to try and cripple that but it may not have been enough.
I'm sorry but this isn't going to happen. Upstream is providing support for literally one slot, and everything else requires downstream patching. Keeping LLVM down to 15 is a nightmare, and I really do hope to remove 15 soon, not add even more dead versions.
(In reply to matoro from comment #5) > (In reply to Jeff Gazso from comment #4) > > (In reply to matoro from comment #3) > > > GHC has native codegen for arm64 since 9.2, so it's not in fact required to > > > build. In the log in 917641 it's trying to use LLVM despite USE=llvm being > > > flipped off, which is a different bug. But LLVM should not be required to > > > build on arm64 since 9.2. > > > > Okay, I'll give it a try again in the morning without the llvm flag and see > > what I get. > > Sorry - to clarify, you did everything correctly. The log you posted shows > that you do not have the llvm flag enabled, yet it is attempting to pull in > LLVM anyway. That's a mistake somewhere on our part and I don't yet know > where. GHC is sensitive to what backend was used to build it, and also > likes to search $PATH an opportunistically enable things. I did my best to > try and cripple that but it may not have been enough. Thanks for the feedback. It's good to know I wasn't missing something obvious. I did try again and with the llvm flag disabled I still run into an issue: # emerge --ask dev-lang/ghc [ebuild N ] dev-lang/ghc-9.2.8 [ebuild N ] app-admin/haskell-updater-1.4.1.0 Fails with: * ERROR: dev-lang/ghc-9.2.8::haskell failed (setup phase): * No binary available for 'arm64' arch yet, USE=ghcbootstrap With ghcbootstrap enabled, the following happens: # emerge --ask dev-lang/ghc [ebuild N ] dev-lang/ghc-9.2.8 * ghc not found * ERROR: dev-lang/ghc-9.2.8::haskell failed (pretend phase): I'm going to try unamasking an upstream version of ghc from the gentoo-haskell tree and see if I can build it. Thanks for getting back to me. I genuinely appreciate the help.