Building the Development Version of Emacs on Macos (Macports Edition)

A while back, I wrote a how-to for building Emacs on Macos (for people who have no interest in using Macos), but I based that recipe on HomeBrew. There was recently a Macports-related bug report, so I set up a VM with Macports, and I thought I might as well write that up, too.

It turns out that this is even easier than using HomeBrew.

1) Open a Terminal window (by clicking on the spy-glass at the top there and write “Terminal” and then clicking on the icon).

2) Type “gcc” in the terminal. It’ll pop up a dialogue — just answer “yes” to everything.

3) Go to the Macports web page in Safari (it’s the icon that looks vaguely like a compass) and click on the installer for your version of Macos. Then click on the box icon again a couple of times, and answer “yes” some more.

4) Turn on the ssh server by typing “remote login” in the spyglass thing. Switch “Remote login” on for all users.

5) Now you can go back to your free OS, and do the rest via ssh.

sudo port selfupdate
sudo port -N install git `port deps emacs | sed 's/^.*://' | sed 's/,//g' | tail -n 2`
git clone https://git.savannah.gnu.org/git/emacs.git
cd emacs
make -j8
./src/emacs -nw

Presto!

12 thoughts on “Building the Development Version of Emacs on Macos (Macports Edition)”

  1. Two additional questions:

    1. Are these options possible on MacOX ./configure –with-x-toolkit=athena –without-pop –with-mailutils I am doubting athena.

    2. I am not sure, do you have a Mac or did you manage to install it on some virtualbox. If you did on a box, I would be extremely interested to know details. I once tried to install snow-leopard on the virtualbox and never succeeded.

    Uwe Brauer

          1. I haven’t tried. I don’t really use Macos for anything other than building Emacs.

          2. I finally solved my python problems. How much space do you reserve for the VirtualBox? tt recommends 64 GB, that is almost all of free space left on my Laptop.

          3. I don’t use VirtualBox, but I seem to have given the Macos VMs (in qemu) about 40GB disk. Looks like only 10GB is used in the VM.

  2. Fink: I will soon have access to a MacBook Air (2019) (I am a bit confused about your hardware collection, since you talk of installing it on some virtual machine, but then you also seem to posses a real Mac).
    In any case: I also want to compile and install a Dev version of Emacs, I am however more inclined to fink (since it has apt-get and that I am familiar with)
    So did you try fink out?

Leave a Reply to alonsoquixanoCancel reply