Skip to content

Instantly share code, notes, and snippets.

@russelldb
Forked from nivertech/erlang-17.0-rc2-wx-osx.md
Last active September 7, 2017 07:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save russelldb/f631a9244a8c0ff0c217d5f61654a065 to your computer and use it in GitHub Desktop.
Save russelldb/f631a9244a8c0ff0c217d5f61654a065 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

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 --with-macosx-version-min=10.9 --disable-shared
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment