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

Bootstrap fails on macOS 11 with can't load framework: Cocoa (not found) #5491

Closed
essandess opened this issue Feb 22, 2021 · 4 comments · Fixed by macports/macports-ports#10859

Comments

@essandess
Copy link

I've implemented the macOS 11 workaround in #5456 and yairchu/macos11-haskell-workaround, but have hit this issue building stack itself.

This uses the MacPorts stack port, itself based on stack's own build instructions, and is confirm to work on macOS 10.15 and previous.

:info:build Linking /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_stack/stack/work/stack-2.5.1/.stack-work/dist/x86_64-osx/Cabal-2.4.0.1/setup/setup ...
:info:build Configuring stack-2.5.1...
:info:build stack                 > build (lib + exe)
:info:build Preprocessing library for stack-2.5.1..
:info:build Building library for stack-2.5.1..
:info:build [  1 of 109] Compiling Network.HTTP.StackClient
:info:build [  2 of 109] Compiling Path.Extended
…
:info:build [ 39 of 109] Compiling System.Permissions
:info:build [ 40 of 109] Compiling Stack.Constants
:info:build <command line>: can't load framework: Cocoa (not found)
:info:build Completed 161 action(s).
:info:build --  While building package stack-2.5.1 (scroll up to its section to see the error) using:
:info:build       /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_stack/stack/work/stack-2.5.1/.stack-work/dist/x86_64-osx/Cabal-2.4.0.1/setup/setup --builddir=.stack-work/dist/x86_64-osx/Cabal-2.4.0.1 build lib:stack exe:stack --ghc-options ""
:info:build     Process exited with code: ExitFailure 1
:info:build Command failed:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_stack/stack/work/stack-2.5.1" && /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_stack/stack/work/bin/stack build --with-gcc /usr/bin/clang --allow-different-user 
:info:build Exit code: 1
@WillSewell
Copy link
Contributor

This happens for me when I run stack upgrade --git.

According to https://gitlab.haskell.org/ghc/ghc/-/merge_requests/3689#note_328885, it should be fixed for newer version of GHC.

I think I'm using GHC 8.10.4, so I'm not sure what this issue is...

$ stack ghc -- --version
The Glorious Glasgow Haskell Compilation System, version 8.10.4

@essandess
Copy link
Author

Also exhibited on rc/v2.7.0.1: #5516 (comment)

@borsboom
Copy link
Contributor

I've just made another release candidate: https://github.com/commercialhaskell/stack/releases/tag/rc%2Fv2.7.0.3. The only change from the previous release candidate is that it's built with GHC 8.10.4 and so should be fix the issues with building it on macOS Big Sur.

@essandess
Copy link
Author

Thanks! This works. PR on MacPorts for this bootstrappable version: macports/macports-ports#10859

I believe this ticket may be closed.

essandess added a commit to essandess/macports-ports that referenced this issue Apr 30, 2021
* Version bump to rc/v2.7.0.3
* Bootstrap build
* Fixes: commercialhaskell/stack#5491
cjones051073 pushed a commit to macports/macports-ports that referenced this issue May 1, 2021
* Version bump to rc/v2.7.0.3
* Bootstrap build
* Fixes: commercialhaskell/stack#5491
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants