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

"stack build yesod-bin" fails on MacOS 11.0 #1693

Open
enaluz opened this issue Aug 18, 2020 · 10 comments
Open

"stack build yesod-bin" fails on MacOS 11.0 #1693

enaluz opened this issue Aug 18, 2020 · 10 comments

Comments

@enaluz
Copy link

enaluz commented Aug 18, 2020

stack build yesod-bin fails on MacOS 11.0

  • Your OS name and version: MacOS Big Sur Version 11.0 Beta (20A5343i)
  • The versions of tools you're using (e.g. stack, yesod ghc):
    stack: Version 2.3.3, Git revision cb44d51bed48b723a5deb08c3348c0b3ccfc437e x86_64 hpack-0.33.0
    yesod: Not installing
    ghc: The Glorious Glasgow Haskell Compilation System, version 8.8.4
  • The versions of dependencies you're using: Not sure what to put here. Just trying to build yesod-bin right now.
command -v sw_vers && sw_vers # OS X only
command -v uname && uname -a # Kernel version
command -v stack && stack --version
command -v stack && stack ghc -- --version
command -v stack && stack ls dependencies
command -v yesod && yesod version

Output: https://gist.github.com/enaluz/0e19aefa37ca1b787674ae438db312d7

  • Also, is there anything custom or unusual about your setup? i.e. new or prerelease versions of GHC, stack, etc: Running Big Sur Beta.

  • Finally, if possible, please reproduce the error in a small script, or if necessary create a new Github repo with the smallest possible reproducing case. Stack's scripting support might be useful for creating your reproduction example:

Here is what happened when I ran stack build yesod-bin

~/D/c/l/h/y/g ❯❯❯ stack build yesod-bin
yesod-bin> configure
yesod-bin> Configuring yesod-bin-1.6.0.6...
yesod-bin> build
yesod-bin> Preprocessing executable 'yesod' for yesod-bin-1.6.0.6..
yesod-bin> Building executable 'yesod' for yesod-bin-1.6.0.6..
yesod-bin> [1 of 7] Compiling AddHandler
yesod-bin> [2 of 7] Compiling Devel
yesod-bin> <command line>: can't load framework: Cocoa (not found)

--  While building package yesod-bin-1.6.0.6 using:
      /Users/enaluz/.stack/setup-exe-cache/x86_64-osx/Cabal-simple_mPHDZzAJ_3.0.1.0_ghc-8.8.3 --builddir=.stack-work/dist/x86_64-osx/Cabal-3.0.1.0 build --ghc-options " -fdiagnostics-color=always"
    Process exited with code: ExitFailure 1
~/D/c/l/h/y/test-app ❯❯❯ stack --version                                  
Version 2.3.3, Git revision cb44d51bed48b723a5deb08c3348c0b3ccfc437e x86_64 hpack-0.33.0
@enaluz enaluz changed the title stack build yesod-bin fails on MacOS 11.0 "stack build yesod-bin" fails on MacOS 11.0 Aug 18, 2020
@snoyberg
Copy link
Member

This is unlikely to be an issue with yesod-bin itself, I'd recommend reporting the issue to GHC and see if there are any recommendations upstream.

@enaluz
Copy link
Author

enaluz commented Aug 19, 2020

@snoyberg Thanks for the quick response. Upon further investigation, it might be an OS version issue. Will keep this issue posted as I gather more information in case it can be helpful to anyone else.

@Meowcolm024
Copy link

Got the same problem when installing yesod-bin
And this issue is also encountered when installing other packages.

@blackeuler
Copy link

Are there any known workarounds in the mean time?

@marciofrayze
Copy link

I think IHP is having the same issues:
https://stackoverflow.com/questions/64854700/ihp-cant-load-framework-cocoa-not-found

There is a workaround in the link above, but I haven't tested it myself. Waiting for an official fix.

@popara
Copy link

popara commented Feb 19, 2021

Workaround involves pulling IHP repo, which doesn't help Yesod.
This might be more related:

https://gitlab.haskell.org/ghc/ghc/-/issues/18592

@cgoldammer
Copy link

Thanks for the comments. I've added comments to the gitlab issue that was mentioned above.

For a beginner developer like myself, this issue completely prevents me from using Yesod on OSX: The easiest solution I have seen involves monkey-patching Yekyll, which I don't know how to do. I'll update if I find an easier solution. If there's any other workaround you have found, it would be amazing to mention.

Thanks!

@MurakamiKennzo
Copy link

any help? I face with the same problem.

@netseye
Copy link

netseye commented Sep 4, 2021

try
stack config set resolver lts

@craigderington
Copy link

stack config set resolver lts

Thanks, this worked for me.

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

No branches or pull requests

10 participants