Coder Social home page Coder Social logo

Failed with integer-gmp about ghc-musl HOT 3 CLOSED

nodew avatar nodew commented on May 29, 2024
Failed with integer-gmp

from ghc-musl.

Comments (3)

utdemir avatar utdemir commented on May 29, 2024 3

Thanks @nodew.

So, the error you are getting is expected (does not mean that it is not annoying): A few dependencies (hashable, cryptonite) of haskell-realworld-example pull in integer-gmp, which is not supported by this project. This is by design, as libgmp has licensing restrictions when linked statically.

However, this is not a big issue:

  • Before GHC 9, GHC supports two integer implementations integer-gmp and integer-simple. Usually, libraries which depend on integer-gmp has flags to make them depend on integer-simple instead. eg: hashable.cabal
  • After GHC 9, GHC comes with a single library called ghc-bignum, which has two implementations (gmp-backend and native-backend). So the libraries can depend on ghc-bignum unconditionally and it should just work.

So, there are two solutions that can get you past the issue:

  1. Keep using 8.x, and figure out how to get your dependencies use integer-simple instead. It should be an exercise of figuring out the correct flags to pass (on cabal.project or stack.yml).
  2. Use a GHC version newer than 9.0. Then, the dependencies would use ghc-bignum which should work without any headaches.

Unfortunately, even after the above changes haskell-realworld-example does not build, as it depends on libpq which has problems with static linking. We already have an issue for that: #15

Let me know if you can get past the gmp issue (or happy with the explanation), then I suggest we close this issue. If you also get the libpq error, feel free to pitch in to #15; or create another issue if you get another error.

Thanks again for the issue.

from ghc-musl.

utdemir avatar utdemir commented on May 29, 2024

That is interesting. The images usually use integer-simple, so I think it might not be possible to build things that depend on integer-gmp specifically.

Can you share your code, and if that's not public, the build-dependencies field of your .cabal file?

from ghc-musl.

nodew avatar nodew commented on May 29, 2024

That is interesting. The images usually use integer-simple, so I think it might not be possible to build things that depend on integer-gmp specifically.

Can you share your code, and if that's not public, the build-dependencies field of your .cabal file?

@utdemir Sure, it's an open source project haskell-realworld-example

from ghc-musl.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.