この資料は定期的に更新される
Erlang/OTP を GitHub にあるソースコードからビルドして利用する方法についてまとめている。
- 株式会社時雨堂 の商用製品向けのビルド設定
- パッケージングに利用する Erlang/OTP は OpenSSL を dynamic link しない
- OpenSSL 最新版を自前ビルドする
- 利用していないモジュールはビルドしない
- jinterface
- odbc
- wx
- debugger
- observer
- et
- tftp
- ftp
- megaco
- eldap
- diameter
- jinterface
- mnesia
- snmp
- ssh
- erl_docgen
- mnesia
- GitHub から clone してきてビルドする
古いカーネルは利用しないほうがいい
- Ubuntu 24.04 x86_64 | arm64
apt install build-essential libncurses5-dev autoconf
- Ubuntu 22.04 x86_64 | arm64
apt install build-essential libncurses5-dev autoconf
- Red Hat Enterprise Linux 10 x86_64
dnf install autoconf gcc glibc-devel make ncurses-devel perl
- Red Hat Enterprise Linux 9 x86_64
dnf install autoconf gcc glibc-devel make ncurses-devel perl
curl -LO https://github.com/openssl/openssl/releases/download/openssl-3.6.0/openssl-3.6.0.tar.gz
tar xvfz openssl-3.6.0.tar.gz
cd openssl-3.6.0
./Configure --prefix=/opt/openssl/3.6.0 no-shared no-module
make -j$(nproc)
make install_swgit clone した otp は pull 専用にしてビルドするのは別リポジトリにする
git clone https://github.com/erlang/otp
git clone otp otp-28.1.1 -b OTP-28.1.1
cd otp-28.1.1
./configure --prefix=/opt/erlang/28.1.1 \
--enable-kernel-poll \
--enable-dirty-schedulers \
--enable-jit \
--disable-sctp \
--disable-dynamic-ssl-lib \
--disable-sharing-preserving \
--with-ssl=/opt/openssl/3.6.0 \
--without-javac \
--without-odbc \
--without-wx \
--without-debugger \
--without-observer \
--without-crashdump_viewer \
--without-et \
--without-tftp \
--without-ftp \
--without-megaco \
--without-eldap \
--without-diameter \
--without-jinterface \
--without-snmp \
--without-ssh \
--without-erl_docgen \
--without-mnesia
make -j$(nproc)
make install- Erlang/OTP 最新版を積極的に利用
- OpenSSL 開発版を積極的に利用
- microstate-accounting を有効化
curl -LO https://www.openssl.org/source/openssl-3.6.0.tar.gz
tar xvfz openssl-3.6.0.tar.gz
cd openssl-3.6.0
./Configure --prefix=/opt/openssl/3.6.0 no-shared no-module
make -j$(nproc)
make install_swgit clone https://github.com/erlang/otp
git clone otp OTP-28.1.1 -b OTP-28.1.1
cd OTP-28.1.1
./configure --prefix=/opt/erlang/28.1.1 \
--enable-kernel-poll \
--enable-dirty-schedulers \
--enable-jit \
--disable-sctp \
--disable-dynamic-ssl-lib \
--disable-sharing-preserving \
--with-ssl=/opt/openssl/3.6.0 \
--with-microstate-accounting=extra \
--without-javac \
--without-odbc \
--without-wx \
--without-debugger \
--without-observer \
--without-crashdump_viewer \
--without-et \
--without-tftp \
--without-ftp \
--without-megaco \
--without-eldap \
--without-diameter \
--without-jinterface \
--without-snmp \
--without-ssh \
--without-erl_docgen \
--without-mnesia
make -j$(nproc)
make installhttps://github.com/shiguredo/docker-erlang-otp/pkgs/container/erlang