Building Erlang on OpenIndiana isn’t really all that difficult, but does involve a few steps, so worth documenting in order to save time in the future. Why build Erlang? Because it rocks!

Update: A Fabric script for performing everything you see here has been written. If you like using Fabric, feel free to copy code as you see fit. One difference is that the does not copy Apache FOP anywhere, it simply uses it temporarily to perform the build.

Installing Dependencies

Developer Tool Chain

Basic tools for compiling software on OpenIndiana. You might already have half of these, but on a bare-bones OpenIndiana install, these will be needed to compile just about anything.

$ pfexec pkg install developer/illumos-gcc
$ pfexec pkg install developer/gnu-binutils
$ pfexec pkg install system/header
$ pfexec pkg install system/library/math/header-math
$ pfexec pkg install developer/library/lint
$ export PATH=/opt/gcc/4.4.4/bin:$PATH

Java Development Kit

For OpenIndiana, the provided JDK package will suffice.

$ pfexec pkg install developer/java/jdk

Apache FOP

Get the binary for the latest release and extract somewhere, such as /opt. Be sure to add the fop binary to your PATH, perhaps by adding a symlink from /usr/local/bin (just as an example).


Once those are in place, building Erlang/OTP is easy.

$ ./configure
$ make
$ export FOP_OPTS="-Xmx512m"
$ make docs
$ pfexec make install
$ pfexec make install-docs

And now to test it out:

$ erl +V
Erlang (ASYNC_THREADS,HIPE) (BEAM) emulator version 6.1

If that works, terrific. If not, send me email or leave a comment, and I’ll see what I can do.