OTP 24.0 has been released

918 views
Skip to first unread message

Henrik Nord X

unread,
May 12, 2021, 7:06:04 AM5/12/21
to erlang-q...@erlang.org

OTP 24

Erlang/OTP 24 is a new major release with new features, improvements as well as a few incompatibilities.

Below are some of the highlights of the release:

Highlights

compiler

  • The compiler will now inline funs that are used only once immediately after their definition.
  • Compiler warnings and errors now include column numbers in addition to line numbers.
  • Variables bound between the keywords 'try' and 'of' can now be used in the clauses following the 'of' keyword
    (that is, in the success case when no exception was raised).
  • Generators in list and binary comprehensions will now
    raise a {bad_generator,Generator} exception if the
    generator has an incorrect type
    Similarly, when a
    filter does not evaluate to a boolean, a
    {bad_filter,Filter} exception will be raised.
  • Warnings for expressions whose result was ignored that could be suppressed by
    using the anonymous variable '_' can now be suppressed with a variable beginning with '_'.
  • Selective receive optimization will now be applied much
    more often.
    The new recv_opt_info compile flag can be used to print
    diagnostics relating to this optimization.
    You can read more about the selective receive
    optimization in the Efficiency Guide.

erts, kernel, stdlib

  • hex encoding and decoding functions added in the binary module

  • The BeamAsm JIT-compiler has been added to Erlang/OTP and will give a significant performance boost for many applications.
    The JIT-compiler is enabled by default on most x86 64-bit platforms that have a C++ compiler that can compile C++17.
    To verify that a JIT enabled emulator is running you can use erlang:system_info(emu_flavor).

  • A compatibility adaptor for gen_tcp to use the new socket API has been implemented (gen_tcp_socket).

  • Extended error information for failing BIF calls as proposed in EEP 54 has been implemented.

  • Process aliases as outlined by EEP 53 has been introduced.

  • Implementation of EEP 56 in supervisor. It adds the concept of significant children as well as the auto_shutdown supervisor flag. See the supervisor manual page for more information.

ftp

  • Add support for FTPES (explicit FTP over TLS).

ssl

  • Make TLS handshakes in Erlang distribution concurrent.
  • TLS connections now support EdDSA certificates.

wx

  • The application has been completely rewritten in order
    to use wxWidgets version 3 as its base.
  • Added support for wxWebView.

edoc

  • EDoc is now capable of emitting EEP-48 doc chunks. This means that, with some
    configuration, community projects can now provide documentation for shell_docs
    the same way that OTP libraries did since OTP 23.0.

For more details about new features and potential incompatibilities see

Pre built versions for Windows can be fetched here:
https://erlang.org/download/otp_win32_24.0.exe
https://erlang.org/download/otp_win64_24.0.exe

Online documentation can be browsed here:

The Erlang/OTP source can also be found at GitHub on the official Erlang repository,
https://github.com/erlang/otp

Many thanks to all the contributors.


Frank Muller

unread,
May 12, 2021, 10:28:59 AM5/12/21
to Henrik Nord X, erlang-q...@erlang.org
Well done guys.

I’m getting an error about a missing 'netinet/sctp.h’ header.

$ sw_vers                                                                                                                                                           
ProductName:    macOS
ProductVersion: 11.2.3
BuildVersion:   20D91

$ kerl build git https://github.com/erlang/otp.git OTP-24.0 24.0 

Checking out Erlang/OTP git repository from https://github.com/erlang/otp.git...
Building Erlang/OTP 24.0 from git, please wait...
Configure failed.
checking for getrusage... yes
checking for sys/event.h... yes
checking for sys/epoll.h... no
checking for sys/devpoll.h... no
checking for sys/timerfd.h... no
checking for netpacket/packet.h... no
checking for netinet/sctp.h... no
configure: error: sctp support requested, but cannot be enabled since 'netinet/sctp.h' is missing
ERROR: /Users/frank/.kerl/builds/24.0/otp_src_git/erts/configure failed!
./configure: line 362: kill: (-67762) - No such process

/Frank

Luke Bakken

unread,
May 12, 2021, 10:57:39 AM5/12/21
to Frank Muller, erlang-q...@erlang.org
Hi Frank,

I see the same error on my OS X system -

$ sw_vers
ProductName: macOS
ProductVersion: 11.3
BuildVersion: 20E232

May I suggest reporting it here as it appears to be a legitimate bug?

https://github.com/erlang/otp/issues

FWIW, here are the flags I pass to the top-level configure script
(using asdf/kerl):

--disable-hipe --disable-sctp --with-microstate-accounting=extra
--enable-darwin-64bit --enable-dynamic-ssl-lib --enable-kernel-poll
--enable-sctp --enable-shared-zlib --enable-smp-support
--enable-threads --enable-wx --with-ssl=$(brew --prefix openssl)
--without-docs --without-javac

Note that "--disable-sctp" does not appear to have the desired effect
during the configure stage.

I also tried downgrading autoconf to version 2.69 (from 2.71) but
still see the same error. I also tried running "autoupdate" on all of
the configure.in scripts first, but that just resulted in more errors.

Thanks,
Luke

Rickard Green

unread,
May 12, 2021, 12:00:00 PM5/12/21
to Luke Bakken, erlang-q...@erlang.org
As of OTP 24.0 configure will fail if you request sctp support, by passing --enable-sctp, when configure is not able to enable it. If you remove --enable-sctp from the command line it will build without sctp support.

Luke: Although you added --disable-sctp, you still have --enable-sctp on the command line. If you remove --enable-sctp it will build without sctp support.

Regards,
Rickard
--
Rickard Green, Erlang/OTP, Ericsson AB

Luke Bakken

unread,
May 12, 2021, 12:34:02 PM5/12/21
to Rickard Green, erlang-q...@erlang.org
Hi Rickard,

That sound you heard was me facepalming over and over again. I don't
even remember adding "--enable-sctp" to my configure options in the
past!

Thank you for the careful examination of what I reported.
Luke

Frank Muller

unread,
May 12, 2021, 12:52:11 PM5/12/21
to Luke Bakken, Rickard Green, erlang-q...@erlang.org
New issue with libcrypto which is available on my system but couldn’t be found by configure script.

$ ls -1 /usr/local/opt/openssl@1.1/lib
engines-1.1
libcrypto.1.1.dylib
libcrypto.a
libcrypto.dylib
libssl.1.1.dylib
libssl.a
libssl.dylib
pkgconfig

$ kerl build git https://github.com/erlang/otp.git OTP-24.0 24.0
[...]
checking size of void *... 8
checking for static zlib... no
checking for OpenSSL header in /usr/local/opt/openssl@1.1... yes
checking for OpenSSL in /usr/local/opt/openssl@1.1... configure: error: static linking against crypto library disabled by user, but no dynamic library found in /usr/local/opt/openssl@1.1
ERROR: /Users/frank/.kerl/builds/24.0/otp_src_git/lib/crypto/configure failed!

Please see /Users/frank/.kerl/builds/24.0/otp_build_git.log for full details.

My "kerl" config:
--disable-hipe --disable-sctp --with-microstate-accounting=extra
--enable-darwin-64bit --enable-dynamic-ssl-lib --enable-kernel-poll
--enable-shared-zlib --enable-smp-support
--enable-threads --enable-wx --with-ssl=$(brew --prefix openssl)
/Frank

Luke Bakken

unread,
May 12, 2021, 1:21:48 PM5/12/21
to Frank Muller, erlang-q...@erlang.org
Hi Frank,

Keep an eye out here: https://github.com/erlang/otp/issues/4821

Kaiduan Xie

unread,
May 12, 2021, 3:40:24 PM5/12/21
to Luke Bakken, erlang-q...@erlang.org
Does OTP24 have DTLS/SRTP support for webrtc?

/Kaiduan
--
Founder of Goodstartsoft

Frank Muller

unread,
May 12, 2021, 3:44:57 PM5/12/21
to erlang-q...@erlang.org
I’ve a build issue on Ubuntu 20.04 LTS

$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 20.04.2 LTS
Release:        20.04
Codename:       focal

$ kerl build git https://github.com/erlang/otp.git OTP-24.0 24.0
Checking out Erlang/OTP git repository from https://github.com/erlang/otp.git...
Building Erlang/OTP 24.0 from git, please wait...
APPLICATIONS DISABLED (See: /home/frank/.kerl/builds/24.0/otp_build_git.log)
 * debugger       : User gave --without-debugger option

DOCUMENTATION INFORMATION (See: /home/frank/.kerl/builds/24.0/otp_build_git.log)
 * documentation  : 
 *                  xmllint is missing.
 *                  Using fakefop to generate placeholder PDF files.

Build failed.

*********************************************************************
Makefile:1235: warning: overriding recipe for target 'dialyzer'
Makefile:510: warning: ignoring old recipe for target 'dialyzer'
Makefile:467: /home/frank/.kerl/builds/24.0/otp_src_git/make/x86_64-pc-linux-gnu/otp.mk: No such file or directory
make: *** No rule to make target '/home/frank/.kerl/builds/24.0/otp_src_git/make/x86_64-pc-linux-gnu/otp.mk'.  Stop.
Makefile:1235: warning: overriding recipe for target 'dialyzer'
Makefile:510: warning: ignoring old recipe for target 'dialyzer'
Makefile:467: /home/frank/.kerl/builds/24.0/otp_src_git/make/x86_64-pc-linux-gnu/otp.mk: No such file or directory
make: *** No rule to make target '/home/frank/.kerl/builds/24.0/otp_src_git/make/x86_64-pc-linux-gnu/otp.mk'.  Stop.

Please see /home/frank/.kerl/builds/24.0/otp_build_git.log for full details.

Frank Muller

unread,
May 14, 2021, 7:34:48 PM5/14/21
to erlang-q...@erlang.org
Am I alone getting this error on Ubuntu ?

Roger Lipscombe

unread,
May 15, 2021, 4:33:53 AM5/15/21
to Frank Muller, erlang-q...@erlang.org
On Sat, 15 May 2021 at 00:34, Frank Muller <frank.mu...@gmail.com> wrote:
>
> Am I alone getting this error on Ubuntu ?

Maybe? It builds fine for me on Ubuntu 20.04.

Frank Muller

unread,
May 15, 2021, 4:55:43 AM5/15/21
to Roger Lipscombe, erlang-q...@erlang.org
Hi Roger,

Do you use kerl? If yes, would you mind sharing your kerlrc?

/Frank

Dieter Schön

unread,
May 15, 2021, 5:14:31 AM5/15/21
to erlang-q...@erlang.org

Hi Frank,

I just built 24 with exactly your commandline:


dieter@zed:~$ lsb_release -a


No LSB modules are available.
Distributor ID:    Ubuntu
Description:    Ubuntu 20.04.2 LTS
Release:    20.04
Codename:    focal

dieter@zed:~$ kerl build git https://github.com/erlang/otp.git OTP-24.0 24.0


Checking out Erlang/OTP git repository from https://github.com/erlang/otp.git...
Building Erlang/OTP 24.0 from git, please wait...

APPLICATIONS DISABLED (See: /home/dieter/.kerl/builds/24.0/otp_build_git.log)
 * odbc           : ODBC library - link check failed

APPLICATIONS INFORMATION (See: /home/dieter/.kerl/builds/24.0/otp_build_git.log)
 * wx             : wxWidgets was not compiled with --enable-webview or wxWebView developer package is not installed, wxWebView will NOT be available

Building docs...
Erlang/OTP 24.0 from git has been successfully built


It seems that I do not have a kerlrc (Normally I use asdf to manage my packages).


Btw, this was a "green" build:

Regards,
Dieter

Roger Lipscombe

unread,
May 16, 2021, 8:47:56 AM5/16/21
to Frank Muller, erlang-q...@erlang.org
On Sat, 15 May 2021 at 09:55, Frank Muller <frank.mu...@gmail.com> wrote:
> Do you use kerl? If yes, would you mind sharing your kerlrc?

Yes I use kerl. I don't have a kerlrc.

Frank Muller

unread,
May 16, 2021, 8:04:46 PM5/16/21
to Roger Lipscombe, erlang-q...@erlang.org
Thanks guys. Working perfectly now. 

Frank Muller

unread,
May 17, 2021, 2:16:49 PM5/17/21
to Erlang-Questions Questions, Luke Bakken
Hi guys,

Back to macOS. 

Luke's suggestion to use "--disable-parallel-configure" helped a lot on Mac but I'm facing a new error during "crypto" module compilation.


$ sw_vers
ProductName:    macOS
ProductVersion: 11.2.3
BuildVersion:   20D91

$ readlink (brew --prefix openssl)
../Cellar/openssl@1.1/1.1.1k

$ cat $HOME/.kerlrc
KERL_CONFIGURE_OPTIONS="--disable-parallel-configure --disable-sctp --without-sctp --with-ssl=$(brew --prefix openssl)"


$ kerl build git https://github.com/erlang/otp.gitOTP-24.0 24.0
[...]
sed -e 's;%VSN%;4.19.1;' mnesia.app.src > ../ebin/mnesia.app
sed -e 's;%VSN%;4.19.1;' mnesia.appup.src > ../ebin/mnesia.appup
gmake[3]: Leaving directory '/Users/frank/.kerl/builds/24.0/otp_src_24.0/lib/mnesia/src'
gmake[3]: Entering directory '/Users/frank/.kerl/builds/24.0/otp_src_24.0/lib/mnesia/include'
gmake[3]: Nothing to be done for 'opt'.
gmake[3]: Leaving directory '/Users/frank/.kerl/builds/24.0/otp_src_24.0/lib/mnesia/include'
gmake[3]: Entering directory '/Users/frank/.kerl/builds/24.0/otp_src_24.0/lib/mnesia/examples'
gmake[3]: Nothing to be done for 'opt'.
gmake[3]: Leaving directory '/Users/frank/.kerl/builds/24.0/otp_src_24.0/lib/mnesia/examples'
gmake[3]: Entering directory '/Users/frank/.kerl/builds/24.0/otp_src_24.0/lib/mnesia/doc/src'
gmake[3]: Nothing to be done for 'opt'.
gmake[3]: Leaving directory '/Users/frank/.kerl/builds/24.0/otp_src_24.0/lib/mnesia/doc/src'
=== Leaving application mnesia
gmake[2]: Leaving directory '/Users/frank/.kerl/builds/24.0/otp_src_24.0/lib/mnesia'
gmake[2]: Entering directory '/Users/frank/.kerl/builds/24.0/otp_src_24.0/lib/crypto'
=== Entering application crypto
gmake[3]: Entering directory '/Users/frank/.kerl/builds/24.0/otp_src_24.0/lib/crypto/src'
erlc -W  -Werror +debug_info -DUSE_ESOCK=true -DCRYPTO_VSN=\"5.0\" -Werror -I../include -o../ebin crypto.erl
erlc -W  -Werror +debug_info -DUSE_ESOCK=true -DCRYPTO_VSN=\"5.0\" -Werror -I../include -o../ebin crypto_ec_curves.erl
sed -e 's;%VSN%;5.0;' crypto.app.src > ../ebin/crypto.app
sed -e 's;%VSN%;5.0;' crypto.appup.src > ../ebin/crypto.appup
gmake[3]: Leaving directory '/Users/frank/.kerl/builds/24.0/otp_src_24.0/lib/crypto/src'
gmake[3]: Entering directory '/Users/frank/.kerl/builds/24.0/otp_src_24.0/lib/crypto/c_src'
gmake -f x86_64-apple-darwin20.3.0/Makefile TYPE=opt
gmake[4]: Entering directory '/Users/frank/.kerl/builds/24.0/otp_src_24.0/lib/crypto/c_src'
gmake[4]: x86_64-apple-darwin20.3.0/Makefile: No such file or directory
gmake[4]: *** No rule to make target 'x86_64-apple-darwin20.3.0/Makefile'.  Stop.
gmake[4]: Leaving directory '/Users/frank/.kerl/builds/24.0/otp_src_24.0/lib/crypto/c_src'
gmake[3]: *** [/Users/frank/.kerl/builds/24.0/otp_src_24.0/make/run_make.mk:35: opt] Error 2
gmake[3]: Leaving directory '/Users/frank/.kerl/builds/24.0/otp_src_24.0/lib/crypto/c_src'
gmake[2]: *** [/Users/frank/.kerl/builds/24.0/otp_src_24.0/make/otp_subdir.mk:29: opt] Error 2
gmake[2]: Leaving directory '/Users/frank/.kerl/builds/24.0/otp_src_24.0/lib/crypto'
gmake[1]: *** [/Users/frank/.kerl/builds/24.0/otp_src_24.0/make/otp_subdir.mk:29: opt] Error 2
gmake[1]: Leaving directory '/Users/frank/.kerl/builds/24.0/otp_src_24.0/lib'

Help appreciated
/Frank

Luke Bakken

unread,
May 17, 2021, 3:16:06 PM5/17/21
to Frank Muller, Erlang-Questions Questions
Hi Frank,

Scroll to the latest comments in the discussion here:

https://github.com/erlang/otp/issues/4821

TL;DR - use the source package to build, not git.

On Mon, May 17, 2021 at 11:16 AM Frank Muller

Frank Muller

unread,
May 17, 2021, 4:44:40 PM5/17/21
to Luke Bakken, Erlang-Questions Questions
After installing autoconf-2.69 (temporary fix) as explained here:
https://github.com/erlang/otp/issues/4821#issuecomment-840338129

i was able to build/install Erlang 24 from GIT on macOS.

Thanks Luke.
/Frank

<lu...@bakken.io> wrote :

Frank Muller

unread,
May 18, 2021, 12:03:25 PM5/18/21
to Erlang-Questions Questions
And for those looking to install Erlang 24 (from GIT) on macOS (BigSur) with "wx" support:

1. uninstall Erlang 24
kerl delete build 24.0
kerl delete installation ~/erlang/24.0 

2. uninstall wxmac
brew uninstall wxmac

3. rebuild wxmac v3.1.4 from source (see [1] for details):

Edit wxmac.rb to read:
$ nano /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/Formula/wxmac.rb

url "https://github.com/wxWidgets/wxWidgets/releases/download/v3.1.4/wxWidgets-3.1.4.tar.bz2"
sha256 "3ca3a19a14b407d0cdda507a7930c2e84ae1c8e74f946e0144d2fa7d881f1a94"

"--enable-compat28",

4. rebuild Erlang 24 using kerl (see .kerlrc [2]):

kerl build git https://github.com/erlang/otp.git OTP-24.0 24.0
kerl install …

Thanks again Luke for pointing me the right direction.

/Frank

[1] https://dev.to/hugomatinho/setting-up-elixir-for-mac-with-erlang-observer-working-17pg

[2] cat ~/.kerlrc
KERL_CONFIGURE_OPTIONS="--disable-hipe --disable-sctp --with-microstate-accounting=extra --enable-darwin-64bit --enable-dynamic-ssl-lib --enable-kernel-poll --enable-shared-zlib --enable-smp-support --enable-threads --enable-wx --with-ssl=$(brew --prefix openssl) --without-docs"
export CFLAGS="-g -O2 -fstack-protector"
export EGREP=egrep
export CC=clang
export CPP='clang -E'

Frank Muller

unread,
May 19, 2021, 3:41:06 AM5/19/21
to Erlang-Questions Questions
Dan Gudmunsson explained me that wx v3.1.5 is the one want to go with on BigSur.

Thus, edit wxmac.rb to read:
$ nano /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/Formula/wxmac.rb

url "https://github.com/wxWidgets/wxWidgets/releases/download/v3.1.5/wxWidgets-3.1.5.tar.bz2"
sha256 "749f3a389b1e9ef8ba1121551a9901623ae328dc2133d0c7a1ed75ef"

def install
    args = [
      "--prefix=#{prefix}",
      "--enable-compat28", <------ add this one

/Frank
Reply all
Reply to author
Forward
0 new messages