Compiling Erlang on Snow Leopard
This assumes you have Xcode installed so you have gcc and friends in
/Developer/SDKs/MacOSX10.6.sdk/usr/bin and are using sh or bash. I don’t think ARCHFLAGS does anything here, but I generally have it in my environment when I compile stuff.
Download and untar the Erlang source code from http://erlang.org/download.html. I used otp_src_R14B.tar.gz. Take a gander at the INSTALL.md file then run these commands:
export ARCHFLAGS='-arch x86_64' export LDFLAGS="-L/Developer/SDKs/MacOSX10.6.sdk/usr/lib" export CFLAGS="$ARCHFLAGS -I/Developer/SDKS/MacOSX10.6.sdk/usr/include $LDFLAGS" export CXXFLAGS=$CFLAGS export CPPFLAGS=$CFLAGS ./configure && make && sudo make install