haskell / entropy

Easy entropy source for Haskell users.
Other
24 stars 49 forks source link

Build errors with GHC 8.10.4 on macOS 10.15 #59

Closed lylek closed 3 years ago

lylek commented 3 years ago

The Haskell part builds, but I'm seeing a bunch of errors in building the C bits. It could be a difference between Linux and macOS versions of gcc. My gcc --version outputs:

Configured with: --prefix=/Library/Developer/CommandLineTools/usr --with-gxx-include-dir=/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/4.2.1
Apple clang version 11.0.3 (clang-1103.0.32.29)
Target: x86_64-apple-darwin19.6.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin

The error log is in this file:

entropy_build_errors.txt

maurges commented 3 years ago

I have the same issue with GHC 8.10.7 installed with nix-env on MacOS 11.3.1. But surprisingly I don't have this problem with the same GHC version installed by stack, and neither did I with GHC 8.10.6 via stack. When I try to run stack build --system-ghc --resolver=lts-18.13 entropy, I get exactly the same errors @lylek described. But when I run stack build --resolver=lts-18.13 entropy, it just says:

entropy> using precompiled package

And everything works. What's more interesting is that further builds with --system-ghc are also successful as they use the same precompiled package! Hope this works for whoever reads this.

TomMD commented 3 years ago

The error logs are about the custom Setup.hs testing for the Linux getrandom function. If you'd like to make a PR to quiet down the build then I'd certainly merge.