Emacs-mac no longer buildable


I’ve been using emacs-mac for quite a while. Today when I’m trying to upgrade all formulas this one get upgraded too, and the build is failing.

Surprisingly, the build process still fails when I’m trying to switch back to the original version. It seems like some mechanism in homebrew has changed. However, building from source directly (clone the repo, copy configure from verbose output, and then run make) work without any problem. Could anyone give some hint?

I’m using High Sierra 10.13.6. I have only command line tools without Xcode.app. The error message is appended below.

Last 15 lines from /Users/someone/Library/Logs/Homebrew/emacs-mac/03.make:
  CC       fontset.o
  CC       fringe.o
  CC       image.o
  CC       macappkit.o
  CC       macfont.o
  CC       terminfo.o
  CC       lastfile.o
  CCLD     temacs
Undefined symbols for architecture x86_64:
  "_IODisplayMatchDictionaries", referenced from:
      ___mac_display_copy_info_dictionary_for_cgdisplay_block_invoke in macappkit.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[1]: *** [temacs] Error 1
make: *** [src] Error 2


See also issue

This suggest that the binarys resides in homebrew’s library is outdated, which is the problem.


It turns out that the choice of /usr/bin/clang or /usr/bin/gcc makes a difference. I’m not sure if this is true before, but using /usr/bin/gcc succeeds the build but the other one doesn’t.