haskell-unordered-containers / hashable

A class for types that can be converted to a hash value
BSD 3-Clause "New" or "Revised" License
103 stars 86 forks source link

Hashable 1.4.2.0 fails to build on integer-simple GHC #268

Open pdwhittaker opened 1 year ago

pdwhittaker commented 1 year ago

I'm seeing compilation errors when I try to build Hashable 1.4.2.0 using integer-simple GHC releases, for example integer-simple GHC 8.10.6 on Alpine or integer-simple GHC 8.10.7 on Windows. There were no problems when I added a Cabal constraint to force version ==1.4.1.0 (and tested with integer-simple GHC 8.10.7 on Windows), or when I built using integer-gmp GHC releases on Linux.

I don't have them immediately to hand, but am happy to show my compiler errors and provide steps to reproduce on an Alpine container if this isn't easy to reproduce.

phadej commented 1 year ago

Reproduction steps would be nice. The non-GMP code branches are currently untested.

But FWIW, on GHC-9+ they should be the same as Integer stuff is handled via ghc-bignum

pdwhittaker commented 1 year ago

Thanks for confirming that about GHC-9+. I'd wondered if this flavour of old GHC release would be covered by tests.

Here's the recipe I've been using to reproduce. I'm using LXD on Ubuntu 20.04, and the first two lxc commands bring up a clean Alpine container; I assume you can translate that as necessary if you're on another platform. But after that point, the rest of the commands should run exactly as-is inside the Alpine container.

Towards the end I build the default Cabal project, and run ldd to confirm that this really is an integer-simple (and not a libgmp) build. (I found that some GHC releases labeled as 'integer-simple' were nonetheless libgmp-based.)

Finally, I pull in hashable to demonstrate the build error.