Skip to content
This repository has been archived by the owner on Nov 24, 2022. It is now read-only.

Building on OS X with Nix fails #810

Open
boggle opened this issue Nov 2, 2020 · 1 comment
Open

Building on OS X with Nix fails #810

boggle opened this issue Nov 2, 2020 · 1 comment

Comments

@boggle
Copy link

boggle commented Nov 2, 2020

Describe the bug
I'm trying to build a clean checkout of asterius on Mac OS X.

My setup is:

  • 10.15.7
  • cabal 3.2.0.0
  • ghc 8.8.3
  • stack 2.5.1

installed via nix.

I also manually setup binaryen 98 and WASI-SDK.

To Reproduce

  • git checkout
  • stack build asterius
stack build asterius
Preparing to install GHC (custom-asterius) to an isolated location.
This will not interfere with any system-level installation.
Already downloaded.
ld: unknown option: --version
sed: RE error: illegal byte sequence
dyld: Library not loaded: /usr/local/opt/gmp/lib/libgmp.10.dylib
  Referenced from: /Users/stepup/.stack/programs/x86_64-osx/ghc-custom-asterius-8.8.4/lib/ghc-8.8.4/bin/ghc-pkg
  Reason: image not found
make: *** [Makefile:122: update_package_db] Abort trap: 6
Received ExitFailure 2 when running
Raw command: /Users/stepup/.nix-profile/bin/make install
Run from: /Users/stepup/.stack/programs/x86_64-osx/ghc-custom-asterius-8.8.4.temp/ghc-8.8.4/

To me this looks like your custom build of ghc is expecting libgmp in /usr/local (perhaps assuming the use of homebrew). While many people use homebrew, this isn't documented and leaves everyone who doesn't out in the cold.

Expected behavior

  • This should work, right?

Environment

  • OS name + version:
  • Version of the code:

Additional context
This is the third time I'm trying to simply build your project. I think it would help asterius if this was generally easier. A description of how to do create the custom ghc build from scratch and how to continue from there might also help.

@TerrorJack
Copy link
Member

Sorry for the frustration. We don't have official nix build support yet; as for how to build the custom ghc, it's a part of the documentation: https://asterius.netlify.app/building.html#about-the-custom-ghc-fork. I'm not enough familiar with nix yet to say how to continue from there, since the official build system is still based on stack.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants