Compilation fails on macOS Big Sur: error: use of undeclared identifier '_eventRef'
This is the error:
libtool: compile: clang -DHAVE_CONFIG_H -I. -I.. -I.. -DLOCALEDIR=\"/opt/homebrew/Cellar/gtk-mac-integration/2.1.3_6/share/locale\" -I/opt/homebrew/Cellar/libffi/3.3/include -I/opt/homebrew/Cellar/pcre/8.44/include -I/opt/homebrew/Cellar/glib/2.66.4_1/include -I/opt/homebrew/Cellar/glib/2.66.4_1/include/glib-2.0 -I/opt/homebrew/Cellar/glib/2.66.4_1/lib/glib-2.0/include -I/opt/homebrew/opt/gettext/include -I/opt/homebrew/Cellar/atk/2.36.0/include/atk-1.0 -I/opt/homebrew/Cellar/libpng/1.6.37/include/libpng16 -I/opt/homebrew/Cellar/gdk-pixbuf/2.42.2/include/gdk-pixbuf-2.0 -I/opt/homebrew/opt/freetype/include/freetype2 -I/opt/homebrew/Cellar/fontconfig/2.13.1/include -I/opt/homebrew/Cellar/pixman/0.40.0/include/pixman-1 -I/opt/homebrew/Cellar/cairo/1.16.0_4/include/cairo -I/opt/homebrew/Cellar/fribidi/1.0.10/include/fribidi -I/opt/homebrew/Cellar/graphite2/1.3.14/include -I/opt/homebrew/Cellar/harfbuzz/2.7.4/include/harfbuzz -I/opt/homebrew/Cellar/pango/1.48.0/include/pango-1.0 -I/opt/homebrew/Cellar/gtk+/2.24.33/include/gtk-2.0 -I/opt/homebrew/Cellar/gtk+/2.24.33/lib/gtk-2.0/include -xobjective-c -g -O2 -c GNSMenuBar.c -fno-common -DPIC -o .libs/libgtkmacintegration_gtk2_la-GNSMenuBar.o
250
gtk-mac-menu.c:73:10: error: use of undeclared identifier '_eventRef'
251
return _eventRef;
252
^
253
1 error generated.
This is due to Carbon no longer being supported on Big Sur.
See also: https://github.com/Homebrew/homebrew-core/pull/68450