Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cabal-install-3.0.0.0 cannot build with ghc 8.8.1 on macOS #6327

Closed
fxcoudert opened this issue Nov 5, 2019 · 11 comments
Closed

cabal-install-3.0.0.0 cannot build with ghc 8.8.1 on macOS #6327

fxcoudert opened this issue Nov 5, 2019 · 11 comments

Comments

@fxcoudert
Copy link

Describe the bug
cabal-install-3.0.0.0 fails to bootstrap with ghc 8.8.1 on macOS

To Reproduce

Running sh bootstrap.sh --sandbox with ghc 8.8.1 on macOS leads to:

Setup: Encountered missing or private dependencies:
base >=4.3.0.0 && <4.13

This prevents all Haskell-based packages in Homebrew to ship on macOS Catalina :(

System information

  • macOS 10.15 Catalina
  • ghc 8.8.1
  • cabal-install-3.0.0.0
@dwijnand
Copy link
Contributor

dwijnand commented Nov 5, 2019

It's good to have a ticket that is explicit like this one. This was basically being tracked as #6280.

@fxcoudert
Copy link
Author

fxcoudert commented Nov 5, 2019

So, checking if I understand correctly: the latest versions of ghc and cabal-install are incompatible, it is known and expected? How are distributors supposed to know this, and how can we ship working Haskell-based software to our users?

@hvr
Copy link
Member

hvr commented Nov 5, 2019

So, checking if I understand correctly: the latest versions of ghc and cabal-install are incompatible, it is known and expected?

Yes; this is going to be addressed with a point release of cabal (probably 3.0.1.0) together with a GHC 8.8 compatible release of hackage-security (which happens to be a major breaking change)

How are distributors supposed to know this

based on the base < 4.13 constraint; which admittedly isn't an obvious thing to those that don't know about the current relationship between base versioning and GHC versioning (due to base being a non-reinstallable library that is fixed to GHC versions)

, and how can we ship working Haskell-based software to our users?

There's for one a binary distribution at http://downloads.haskell.org/~cabal/cabal-install-3.0.0.0/

Or you can build cabal-install with GHC 8.6.5 -- note that it's generally risky to use .1 versions of GHC to build things as they tend to have subtle bugs that are only caught when people actually start using those .1s (notice how it took a .5 minor release to finally reach a reasonably working state of GHC 8.6.*); and the crazy fast release cadence GHC has decided to accelerate to doesn't help either with getting robust and trustworthy GHC releases...

@fxcoudert
Copy link
Author

fxcoudert commented Nov 5, 2019

Thanks @hvr for the information. We will have to decide how to know, in the future, when a GHC release is considered “stable”. Perhaps it is because I do not understand well the Haskell ecosystem, but I do not find this state of things particularly healthy 😢

notice how it took a .5 minor release to finally reach a reasonably working state of GHC 8.6.*

Is there a simple test we could run with a new GHC release, to make sure it is at least capable of install cabal-install? (because it is otherwise pretty much useless to our users).

@hvr
Copy link
Member

hvr commented Nov 5, 2019

@fxcoudert I wasn't aware that distributions are being held up by the need to compile everything with the very same GHC version (many people don't feel the pain as it's idiomatic to have multiple GHC versions installed side-by-side as the ecosystem is typically very inert to update to new GHC versions; it typically takes several months up to a full year for many packages to adapt to a new major GHC version -- if at all); I've created #6328 to make sure we remedy the current pain point asap; and in future I'll try to put more emphasis into making sure cabal-install is buildable with all released GHCs shortly after release of said GHCs.

@fxcoudert
Copy link
Author

@hvr in Homebrew at least, we ship everything with the same version of the compiler. It's true that GHC has been causing us a lot more trouble than C, Fortran, Erlang, and other compilers 😢

@fxcoudert
Copy link
Author

@hvr I am not seeing a path forward for this. Can you provide an estimate for a fix? This is totally blocking for all Haskell software in Homebrew, none of which can be installed from source anymore.

@dwijnand
Copy link
Contributor

Maybe this ship has said, but potentially you could pull the ghc formula back to 8.6 and make 8.8 the "bleeding edge" version, or such. Provided rolling a formula's version back (downgrading) is even an option.

Perhaps I'm mistaken, but I think the issue is the disconnect that you can't build cabal with ghc 8.8, but you can build a project that uses ghc 8.8 using... a 8.6-built cabal. So really cabal doesn't need to be on the same version of ghc as the rest of the Haskell formulas - but I guess it keeps things simple to assume it does.

@fxcoudert
Copy link
Author

Provided rolling a formula's version back is even an option

Not really :(

cabal doesn't need to be on the same version of ghc as the rest of the Haskell formulas

We could do that, actually. I didn't know that was an option (none of the Homebrew maintainers know anything about the haskell ecosystem, I'm afraid).

@fxcoudert
Copy link
Author

Actually, this is not working. The cabal-install compiled with ghc 8.6.5 cannot be run in our simple test:

==> /usr/local/Cellar/cabal-install/3.0.0.0_1/bin/cabal --config-file=/private/tmp/cabal-install-test-20191117-48253-w6x53r/config info Cabal
Config file path source is commandline option.
Config file /private/tmp/cabal-install-test-20191117-48253-w6x53r/config not
found.
Writing default configuration to
/private/tmp/cabal-install-test-20191117-48253-w6x53r/config
cabal: The program 'ghc' version >=7.0.1 is required but it could not be
found.

@gbaz
Copy link
Collaborator

gbaz commented Aug 28, 2021

optimistically closing as obsoleted / resolved

@gbaz gbaz closed this as completed Aug 28, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants