- 対象: R15B03-1, R16B, R16B02
- 参考にした情報: http://23min.com/2013/01/erlang-observer-debugger-on-mountain-lion/
- ここの情報だけだとビルドできなかった分を補足しています
- Mountain Lion (OS X 10.8.x 使ったのは 10.8.3 / 10.8.5)
- Xquartz http://xquartz.macosforge.org/landing/ からダウンロードしてインストール
- HomeBrew http://mxcl.github.io/homebrew/
- 入れ方は
ruby -e "$(curl -fsSL https://raw.github.com/mxcl/homebrew/go)"
- 入れ方は
- kerl https://github.com/spawngrid/kerl
- ダウンロードは
curl -O https://raw.github.com/spawngrid/kerl/master/kerl
- 落としてきたバイナリを適当なところに置いて chmod u+x kerl しておけばOK
- ダウンロードは
- git
- brew install git
- brew install wxgtk.rb
- これで /usr/local/Cellars/wxgtk/2.8.12 の下にインストールされる
- kerl を使って,必要なパッチの当たった R15B03-1 を持ってくる.
- kerl は git 経由でのインストールに対応している.
- インストール時に configure に与えるパラメータは 環境変数 KERL_CONFIGURE_OPTIONS で指定できる
- 実際のコマンドは以下の通り (R15B03-1の場合,R16BやR16B02の時は kr-r16b-osx-wx / kr-r16b02-osx-wx に変更)
env KERL_CONFIGURE_OPTIONS="--enable-darwin-64bit \ --disable-hipe \ --enable-vm-probes \ --with-dynamic-trace=dtrace \ --disable-native-libs \ --disable-hipe \ --enable-kernel-poll \ --without-odbc \ --enable-threads \ --enable-smp-support \ --with-wxdir=/usr/local/Cellar/wxgtk/2.8.12 \ --with-wx-config=/usr/local/Cellar/wxgtk/2.8.12/bin/wx-config" \ kerl build git https://github.com/jj1bdx/otp kr-r15b03-1-osx-wx kr-r15b03-1-osx-wx
- これで ~/.kerl/builds/kr-r15b03-1-osx-wx の下にビルドした実体ができるので,インストールする.
- たとえば /Users/kenji/otp/r15b03-1 の下に入れたい時は以下のようにする
kerl install kr-r15b03-1-osx-wx /Users/kenji/otp/r15b03-1
- このkerlで入れたディストリビューションを有効にしたいときは,シェルから
. /Users/kenji/otp/r15b03-1/activate
とすればよい.
- Erlangのプロンプトが出てきたら wx:demo(). と実行
- brew install wxmac を実行するとwxWidgets 2.9 が入る
- R16Bなら
--with-wxdir
--with-wx-config
なしでインストールすればOK - wxmac 2.9.5.0 はリンクはできるが起動しないという問題がある
- 詳細はここ → https://github.com/jj1bdx/otp/blob/kr-r15b03-1-osx-wx/osx-wxgtk-patches/lib_wx_configure.in.diff
- 内容の解説
- X11のヘッダはなんと
/opt/X11/include
にある (/usr/local/X11とかにしてくれればいいのに) - X11のライブラリは
/opt/X11/lib
にある - そのままリンクすると objc なんたらのシンボルがないと言われるので LDFLAGS に
-framework Appkit
が必要
- X11のヘッダはなんと
[以上]
if have problems with this error message:
make: *** [.pch/wxprec_advdll/wx/wxprec.h.gch] Error 1
clang: error: cannot specify -o when generating multiple output files
make: *** [.pch/wxprec_htmldll/wx/wxprec.h.gch] Error 1
clang: error: cannot specify -o when generating multiple output files
make: *** [.pch/wxprec_qadll/wx/wxprec.h.gch] Error 1
Try to add the argument:
-disable-precomp-headers
In the args of the formula.