Building the Development Version of Emacs on NetBSD

I hadn’t really planned on installing a NetBSD VM (after doing all the other two BSDs), but then a NetBSD-related Emacs bug report arrived.

The first it… years?

So here I am!

Actually finding the correct .iso to install took days, but with the help of some friends I finally found the right set! Go team NetBSD!

I have absolutely no experience with NetBSD, so my build instructions here are probably more involved than necessary: They’re certainly the longest of the BSD instructions.

First, as root:

PKG_PATH=http://ftp.netbsd.org/pub/pkgsrc/packages/NetBSD/amd64/9.0/All/
export PKG_PATH
pkg_add git gnutls xdg-utils dbus libxml2\
 gnutls p11-kit gconfmm libXaw3d fontconfig\
 libotf libXft m17n-lib tiff png gtk3+\
 giflib hicolor-icon-theme desktop-file-utils\
 jansson automake autoconf gmake pkg-config
mozilla-rootcerts install

Then, as your own user:

git clone https://git.savannah.gnu.org/git/emacs.git
cd emacs
LD_LIBRARY_PATH=/usr/X11R7/lib
export LD_LIBRARY_PATH
sh autogen.sh
LDFLAGS=-L/usr/pkg/lib CPPFLAGS=-I/usr/pkg/include\
 ./configure
gmake -j4
./src/emacs

Look! It works!

Hm, I guess there’s something up with the image support, because that logo was supposed to have a black background…

But it otherwise seems to work OK.

Leave a Reply