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

Create an alpine image with GHC 8.10.7 + integer-gmp #4

Open
joe-warren-permutive opened this issue Sep 10, 2021 · 4 comments
Open

Comments

@joe-warren-permutive
Copy link
Contributor

I'm trying to run a project based on the latest stackage lts (currently 18.9, GHC 8.10.7).

While the alpine bindist has been intended to be an “integer-simple” build for a while, the release notes for 8.10.6 include:

Many packaging related fixes, including versioned ghc-pkg executables (#20087), and actually distributing GHC versions linked against the integer-simple big integer backend (#18967, #19953) on both Windows and Alpine Linux. Previous releases were still linked against the GMP library due to a misconfiguration of the builders.

So effectively 8.10.6 is the first release for which the alpine build has used the integer-simple backend.
This effectively doesn’t work with stack, because lots of stackage packages are configured to assume “integer-gmp”.
(It's possible to work around this, by configuring and pinning an "integer-simple" version of each package in the extra-deps, but this is a lot of overhead, and kinda defeats the point of using package sets)

While it might be possible to build ghc from source, on alpine, with the integer-gmp backend. I've been struggling to do this myself (due to a combination of linker errors, and slow build times within Docker).

@joe-warren-permutive
Copy link
Contributor Author

joe-warren-permutive commented Sep 10, 2021

It's possible that this (understandably) falls outside of the kind of work that you want to do in maintaining this repo.
If so, I'd appreciate pointers about where else to ask this?
I'm relatively invested in being able to run the latest stackage lts on alpine, but am personally finding it difficult to work out how to do this.

Cheers.

@nh2
Copy link
Member

nh2 commented Sep 11, 2021

As a side info, I wanted to point out this which is going to come out soon and might be relevant/useful for Alpine:

There is also ghc-bignum that might be relevant, a pure-Haskell replacement of integer-simple with BSD license: https://iohk.io/en/blog/posts/2020/07/28/improving-haskells-big-numbers-support/ I haven't used it myself yet though so I'm not sure how useful it'd be for this, or what the current state is.


What exactly do you mean by

lots of stackage packages are configured to assume “integer-gmp”

?

  • Do you mean that some packages' code imports Haskell modules that are only present in integer-simple?
  • Or do you mean packages like blaze-textual which has a Cabal flag integer-simple to "use integer-simple instead of integer-gmp", and that the musl based docker image should perhaps carry a stack config that enables the integer-simple flag for all such packages?

@joe-warren-permutive
Copy link
Contributor Author

What exactly do you mean by "lots of stackage packages are configured to assume “integer-gmp”"

The latter:

Or do you mean packages like blaze-textual which has a Cabal flag integer-simple to "use integer-simple instead of integer-gmp", and that the musl based docker image should perhaps carry a stack config that enables the integer-simple flag for all such packages?

@snoyberg
Copy link
Member

I'd be in favor of creating such an image, but I won't have time myself to try and build GHC with integer-gmp myself.

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

3 participants