Skip to content

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

@essandess

Description

@essandess

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions