2016-01-24 Building Emacs for the Mac using Homebrew

Yesterday, I ran `brew update` and `brew upgrade`. Today, I have a problem:

alex@Megabombus:~$ emacs
dyld: Library not loaded: /usr/local/opt/gnutls/lib/libgnutls.28.dylib
  Referenced from: /usr/local/bin/emacs
  Reason: image not found
Trace/BPT trap: 5

Apparently, a new version of the TLS library was installed.

alex@Megabombus:~$ brew reinstall emacs-mac
==> Reinstalling railwaycat/emacsmacport/emacs-mac with --with-gnutls --with-imagemagick --with-official-icon --with-xml2
==> Downloading https://github.com/railwaycat/mirror-emacs-mac/archive/emacs-24.5-mac-5.15.tar.gz
Already downloaded: /Library/Caches/Homebrew/emacs-mac-emacs-24.5-z-mac-5.15.tar.gz
`#``#``#``#``#``#``#``#``#``#``#``#``#``#`## 100,0%
==> ./autogen.sh
==> ./configure --prefix=/usr/local/Cellar/emacs-mac/emacs-24.5-z-mac-5.15 --enable-locallisppath=/usr/local/share/
==> make
==> make install
==> Caveats
This is YAMAMOTO Mitsuharu's experimental "Mac port" addition to
GNU Emacs 24. This provides a native GUI support for Mac OS X
10.4 - 10.11. After installing, see README-mac and NEWS-mac
in /usr/local/Cellar/emacs-mac/emacs-24.5-z-mac-5.15 for the port details.

Emacs.app was installed to:
  /usr/local/Cellar/emacs-mac/emacs-24.5-z-mac-5.15

To link the application to default Homebrew App location:
  brew linkapps
or:
  ln -s /usr/local/Cellar/emacs-mac/emacs-24.5-z-mac-5.15/Emacs.app /Applications
Other ways please refer:
  https://github.com/railwaycat/homebrew-emacsmacport/wiki/Alternative-way-of-place-Emacs.app-to-Applications-directory

For an Emacs.app CLI starter, see:
  https://gist.github.com/4043945

.app bundles were installed.
Run `brew linkapps emacs-mac` to symlink these to /Applications.
==> Summary
🍺  /usr/local/Cellar/emacs-mac/emacs-24.5-z-mac-5.15: 3,936 files, 107.4M, built in 16 minutes 40 seconds
alex@Megabombus:~$ brew linkapps emacs-mac
Linking /usr/local/opt/emacs-mac/Emacs.app to /Applications.
alex@Megabombus:~$ emacs

😁✌

Learn more about this port on GitHub. As for the options I used:

on GitHub

alex@Megabombus:~$ brew info emacs-mac
...
==> Dependencies
Build: autoconf βœ”, automake βœ”, pkg-config βœ”
Optional: glib βœ”, gnutls βœ”, imagemagick βœ”
==> Options
--with-ctags
	Don't remove the ctags executable that emacs provides
--with-dbus
	Build with d-bus support
--with-glib
	Build with glib support
--with-gnutls
	Build with gnutls support
--with-imagemagick
	Build with imagemagick support
--with-modern-icon
	Using a modern style Emacs icon by @tpanum
--with-official-icon
	Using offical Emacs icon
--with-official-repo
	install by source code from official git repo (could show, depends on your location)
--with-spacemacs-icon
	Using the spacemacs Emacs icon by Nasser Alshammari
--with-xml2
	Build with libxml2 support

I need TLS support to secure my IRC, SMTP and IMAP connections. And I like to open images in Emacs.

​#Emacs

Comments

(Please contact me if you want to remove your comment.)

⁂

Time to try traditional Emacs again.

`brew reinstall emacs --with-gnutls --with-imagemagick --with-librsvg --with-glib --with-cocoa`

the other port

Ugh! Graphic errors (a weird square in the middle sometimes pops up and looks super zoomed), strange lags (as if the networking code was borked and wasting cycles every now and then, trying to do something impossible or waiting for a timeout).

`brew remove emacs`

`brew install emacs-mac`

– Alex Schroeder 2016-05-12 19:21 UTC

---

As I was running `brew update` I noticed this:

=> Installing gcc
Warning: Building gcc from source:
  The bottle needs the Xcode CLT to be installed.

The build was taking forever. I found How to install and use Homebrew and noticed the following:

How to install and use Homebrew

1. use `brew config` to check whether you have CLT installed. If you see `CLT: N/A` then you need to install it

2. run `xcode-select --install` and if you get a dialog asking whether you want to install the command line tools, proceed

3. run `xcode-select -p` and you should get a directory back

Restart `brew upgrade` and you should see:

==> Upgrading gcc
==> Downloading https://homebrew.bintray.com/bottles/gcc-6.1.0.el_capitan.bottle.tar.gz
`#``#``#``#``#``#``#``#``#``#``#``#``#`###      95,1%

Yay!

– Alex Schroeder 2016-07-05 14:10 UTC