Skip to content

Instantly share code, notes, and snippets.

@jj1bdx
Last active August 29, 2015 13:56
Show Gist options
  • Star 4 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save jj1bdx/9262726 to your computer and use it in GitHub Desktop.
Save jj1bdx/9262726 to your computer and use it in GitHub Desktop.
Installation of Erlang R16B03-1 and 17.0-rc2 to OS X 10.9.2 with Xcode and wxWidgets 3.0.0

Installation of Erlang R16B03-1 and 17.0-rc2 to OS X 10.9.2 with Xcode and wxWidgets 3.0.0

Installing wxWidgets

# normal user
sudo zsh
# superuser
umask 022
xcode-select -s /Applications/Xcode.app/Contents/Developer
exit
# normal user
umask 022
curl -O http://optimate.dl.sourceforge.net/project/wxwindows/3.0.0/wxWidgets-3.0.0.tar.bz2
tar xvjf wxWidgets-3.0.0.tar.bz2
cd wxWidgets-3.0.0
./configure --with-cocoa --prefix=/usr/local
make
sudo zsh
# superuser
umask 022
make install
exit
# normal user
rehash # make sure /usr/local/bin in the PATH
wx-config --version-full # see 3.0.0.0 here

Installing Erlang with kerl

Set .kerlrc as follows and enable one of the OPTIONS (note: gcc-4.7 can be installed from Homebrew)

# since .kerl is a dot file for /bin/sh, exporting inside the environment will define the env variables
# NOTE WELL: the export commands will affect *your login environment* when activating curl!
# without wx
#KERL_CONFIGURE_OPTIONS="CC=/usr/local/opt/ccache/libexec/gcc-4.7 CXX=/usr/local/opt/ccache/libexec/g++-4.7 --enable-darwin-64bit --disable-hipe --enable-vm-probes --with-dynamic-trace=dtrace --disable-native-libs --enable-kernel-poll --without-odbc --enable-threads --enable-smp-support --without-wx"
# with wx
#KERL_CONFIGURE_OPTIONS="CC=/usr/local/opt/ccache/libexec/gcc-4.7 CXX=/usr/local/opt/ccache/libexec/g++-4.7 --enable-darwin-64bit --disable-hipe --enable-vm-probes --with-dynamic-trace=dtrace --disable-native-libs --enable-kernel-poll --without-odbc --enable-threads --enable-smp-support --with-wx"
# with wx, but original C compiler
KERL_CONFIGURE_OPTIONS="CC=/usr/local/opt/ccache/libexec/cc CXX=/usr/local/opt/ccache/libexec/c++ --enable-darwin-64bit --disable-hipe --enable-vm-probes --with-dynamic-trace=dtrace --disable-native-libs --enable-kernel-poll --without-odbc --enable-threads --enable-smp-support --with-wx"
# for reference only: see http://blog.equanimity.nl/blog/2014/02/09/erlang-r17-rc1-on-osx-with-wx-and-a-working-observer/
#KERL_CONFIGURE_OPTIONS="--disable-debug --without-javac --enable-shared-zlib --enable-dynamic-ssl-lib --enable-hipe --enable-smp-support --enable-threads --enable-kernel-poll --with-wx"

Then do (for 17.0-rc2, you can do it on R16B03-1 too):

kerl update releases
# parallel make shortens the build time
# (-j12 is for a Core i7 Mac Mini, use smaller numbers for MBA, MBP, etc.) 
env MAKEFLAGS=-j12 kerl build 17.0-rc2 17.0-rc2 # change the build name as you like
kerl install 17.0-rc2 /Users/kenji/otp/17.0-rc2
@dch
Copy link

dch commented Mar 12, 2014

A couple of useful tricks:

https://gist.github.com/dch/7699886

and also I've submitted a homebrew update for erlang + wx support using --devel, see https://gist.github.com/dch/9267866

@jj1bdx
Copy link
Author

jj1bdx commented Apr 11, 2014

Late thx @dch !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment