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

Purescript project does not build on macOS Big Sur #3960

Closed
jvliwanag opened this issue Nov 27, 2020 · 2 comments
Closed

Purescript project does not build on macOS Big Sur #3960

jvliwanag opened this issue Nov 27, 2020 · 2 comments

Comments

@jvliwanag
Copy link

Description

Older versions of GHC does not load system frameworks properly on macOS Big Sur. This causes a failure when building the purescript project on the Big Sur.

Details here - https://gitlab.haskell.org/ghc/ghc/-/issues/18446

Looks like there are fixes for GHC 8.8 and 8.10. But purescript project is on 8.6.5.

To Reproduce

$ make install
STACK_YAML="stack.yaml" stack install
Getting project config file from STACK_YAML environment
Cabal file warning in/Users/jvliwanag/workspace/haskell/purescript/purescript.cabal@10:27: version with tags
Building all executables for `purescript' once. After a successful build of all of them, only specified executables will be rebuilt.
purescript> configure (lib + exe)
purescript> Warning: purescript.cabal:0:0: version with tags
purescript> Configuring purescript-0.14.0...
purescript> build (lib + exe)
purescript> Preprocessing library for purescript-0.14.0..
purescript> Building library for purescript-0.14.0..
purescript> [ 22 of 132] Compiling Language.PureScript.Docs.Css
purescript> <command line>: can't load framework: Cocoa (not found)

--  While building package purescript-0.14.0 (scroll up to its section to see the error) using:
      /Users/jvliwanag/.stack/setup-exe-cache/x86_64-osx/Cabal-simple_mPHDZzAJ_2.4.0.1_ghc-8.6.5 --builddir=.stack-work/dist/x86_64-osx/Cabal-2.4.0.1 build lib:purescript exe:purs --ghc-options " -fdiagnostics-color=always"
    Process exited with code: ExitFailure 1
make: *** [install] Error 1

Expected behavior

Build success

PureScript version

0.14.0-rc3

@jvliwanag
Copy link
Author

Workaround for building on big sur:

  1. Clean up .stack-work and rm -Rf ~/.stack/setup-exe-cache/x86_64-osx that may have been carried over from pre big sur
  2. Run stack build until failure of compiling Language.PureScript.Docs.Css with the Cocoa error referenced above
  3. Checkout and build - https://github.com/yairchu/macos11-haskell-workaround .
  4. Re-run stack build with workaround - DYLD_INSERT_LIBRARIES=<path>/macos11-haskell-workaround/macos11ghcwa.dylib stack build

@jvliwanag
Copy link
Author

Works now! Fixed by #4013 .

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

No branches or pull requests

1 participant