Building Erlang on Snow Leopard
August 17th, 2009
The macports install of CouchDB requires Erlang (naturally) and Erlang requires WxWidgets and Tk, which are probably pointless for most uses, and won’t compile on 10.6.
Here is a patch for the Erlang Portfile that will let you build on pre-GM 10.6.
Save the patch to ~/Desktop/erlang.diff
Patching icu
You might also have to patch icu. To test, run:
sudo port install icu
If it errors, grab the unified diff patch file and save it to your ~/Desktop as “icu.diff” and run:
cd /opt/local/var/macports/sources/rsync.macports.org/release/ports/devel/icu
sudo patch < ~/Desktop/icu.diff
sudo port install icu
Patching Erlang
To run the Erlang patch and install the port, just do the following:
cd /opt/local/var/macports/sources/rsync.macports.org/release/ports/lang/erlang
patch < ~/Desktop/erlang.diff
sudo port install erlang
CouchDB?
I can get CouchDB to build, but not to run. I think I'll let someone else solve this one. Maybe you?

