You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A recent GHC bug (#20520) brought to light the fact that Cabal includes knowledge of internal implementation details of GHC (specifically, the particular file name of libHSrts). This appears to have been introduced by 382143a and 1c07f83.
This naming is unstable and has indeed changed in recent releases, hence the ghc#20520.
It's quite unclear to me why Cabal is trying to compute the name of libHSrts. It should rather be depending upon GHC's -flink-rts flag to instruct GHC to choose the correct RTS itself.
I see the reason: -flink-rts is actually a somewhat new flag (introduced in 9.0). I think the solution here is to teach Cabal to rely on this flag when available. Linking is a tricky thing and only GHC has the information to manage it robustly. We should avoid making Cabal responsible for it.
Activity
bgamari commentedon Oct 20, 2021
It's quite unclear to me why Cabal is trying to compute the name of
libHSrts. It should rather be depending upon GHC's-flink-rtsflag to instruct GHC to choose the correct RTS itself.bgamari commentedon Oct 20, 2021
I see the reason:
-flink-rtsis actually a somewhat new flag (introduced in 9.0). I think the solution here is to teachCabalto rely on this flag when available. Linking is a tricky thing and only GHC has the information to manage it robustly. We should avoid making Cabal responsible for it.fgaz commentedon Oct 20, 2021
Does this mean Cabal is unusable with ghc post-#20520?
bgamari commentedon Oct 20, 2021
Cabalis currently unable to build foreign libraries with GHC 9.0 or 9.2.Mikolaj commentedon Oct 20, 2021
I guess this implies cabal-install 3.6.3 (or at least Cabal 3.6.3).
Edit: scratch that, we seem not to be ready for GHC 9.0 for other reasons: #7747.
Mikolaj commentedon Jan 29, 2022
@bgamari: any news? #7747 is nearing completion, so soon we should be able to test foreign libraries with master branch.
Bodigrim commentedon Feb 1, 2022
@bgamari it would be nice to fix this in time for GHC 9.2.2, otherwise Windows users are likely to be stuck with GHC 8.10 indefinitely.
Bodigrim commentedon Apr 18, 2022
@Mikolaj could Cabal maintainers please take the lead in resolving this?
Mikolaj commentedon Apr 19, 2022
Easily said. Let me beg @bgamari some more... :)
Bodigrim commentedon Apr 19, 2022
@Mikolaj see https://gitlab.haskell.org/ghc/ghc/-/issues/20520#note_411402, I believe Ben can use help from the core team.
Add changelog for haskell#7763, haskell#7764 and haskell#8111
Unmark foreign lib test as broken for win and ghc >= 9.0 (#8111)
hasufell commentedon May 7, 2023
Which Cabal (library) version includes this fix?
Kleidukos commentedon May 7, 2023
@hasufell according to GH the PR (#7764) is included in 3.8.1.0