Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 876187 - dev-lang/ghc requires <sys-devel/llvm-14
Summary: dev-lang/ghc requires <sys-devel/llvm-14
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo's Haskell Language team
URL: https://gitlab.haskell.org/ghc/ghc/-/...
Whiteboard:
Keywords: PullRequest
Depends on:
Blocks: llvm-14-tracker
  Show dependency tree
 
Reported: 2022-10-08 15:33 UTC by Michał Górny
Modified: 2023-02-01 04:57 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2022-10-08 15:33:43 UTC
LLVM 14.x is the current stable, 15.x is going to become stable soon, LLVM 13.x is on its way out.  Please update the package to support newer LLVM versions.
Comment 1 matoro archtester 2022-10-08 19:03:10 UTC
This is going to be a problem.  Even on git master, the max supported LLVM is 13:  https://gitlab.haskell.org/ghc/ghc/-/blob/master/configure.ac#L552-L557 and we are several major releases behind (due to switch from autotools to in-house Hadrian build system that downloads deps from internet npm-style).

For sure does not work with >=15.x:  https://gitlab.haskell.org/ghc/ghc/-/issues/21936, https://gitlab.haskell.org/ghc/ghc/-/merge_requests/8999

If we were to bump to 9.2, arm64 would no longer require LLVM backend, but riscv still will, and presumably will indefinitely (there has been no attempt to write native codegen for riscv).  I did a lot of work to backport the LLVM codegen also, there was no registerised codegen at all until 9.2.
Comment 2 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2022-12-01 14:02:44 UTC
Ping.  What do we do here?
Comment 3 matoro archtester 2022-12-01 15:10:39 UTC
Going to be ugly since upstream seems to have no interest in bumping the maximum supported version, presumably since all the major distros are perfectly happy maintaining llvm-12, llvm-13, llvm-14 packages etc.  Let me at least open an issue and start discussion on it.
Comment 4 matoro archtester 2022-12-06 15:31:14 UTC
Upstream says they are planning LLVM 14 for 9.6.1:  https://gitlab.haskell.org/ghc/ghc/-/issues/22544#note_466663

That's still a LONG way off from ::gentoo.  Even ::haskell is only at 9.2.x.

Acceptable timeline?  The only other thing I can think of if the maintenance burden is really that high would be to drop arm64 and riscv support, along with revbumping and unkeywording the entire Haskell tree.
Comment 5 matoro archtester 2022-12-15 22:14:48 UTC
Merged upstream now:  https://gitlab.haskell.org/ghc/ghc/-/commit/5fe11fe612e1881bd4d1b9d5950d0d801e08e159

This is still targeted to 9.6.1, so this will need assistance from the haskell overlay folks if we want to up the speed we get more releases in.  We are still on 9.0 in ::gentoo, and 9.2 in ::haskell.
Comment 6 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2023-01-13 08:07:42 UTC
Any chance of backporting the relevant changes?
Comment 7 matoro archtester 2023-01-14 16:36:05 UTC
(In reply to Michał Górny from comment #6)
> Any chance of backporting the relevant changes?

All the change is is bumping the maximum allowed version, but there's no way to know what changes went in before that in order to allow it to happen.  We can, in fact we are already doing that right now (backporting a Debian patch to bump the maximum version to 13) but we can't know for sure whether it will be safe without a complete retest of the Haskell ecosystem on the relevant arches (riscv, and if we stay in 9.0, arm64 also).

Assistance from the arch teams would help.
Comment 8 Larry the Git Cow gentoo-dev 2023-02-01 04:57:14 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2a61a86e6a1416fbb57acff2118552fc1d5471c1

commit 2a61a86e6a1416fbb57acff2118552fc1d5471c1
Author:     Matoro Mahri <matoro@users.noreply.github.com>
AuthorDate: 2023-02-01 02:27:16 +0000
Commit:     Michał Górny <mgorny@gentoo.org>
CommitDate: 2023-02-01 04:56:59 +0000

    dev-lang/ghc: bump maximum LLVM to 14
    
    Validated on arm64.
    
    Closes: https://bugs.gentoo.org/876187
    Signed-off-by: Matoro Mahri <matoro@users.noreply.github.com>
    Closes: https://github.com/gentoo/gentoo/pull/29366
    Signed-off-by: Michał Górny <mgorny@gentoo.org>

 dev-lang/ghc/files/ghc-9.0.2-llvm-14.patch                | 15 +++++++++++++++
 dev-lang/ghc/{ghc-9.0.2-r2.ebuild => ghc-9.0.2-r3.ebuild} |  5 +++--
 2 files changed, 18 insertions(+), 2 deletions(-)