Erlang OTP-24.0 released!

I just listened to Robert’s interview in this podcast: https://elixirforum.com/t/elixir-wizards-season-6-beam-magic/39465?u=astonj and he talks a little bit about OTP 24 too - well worth a listen! :023:

2 Likes

Does JIT work in Docker?

Running hexpm/elixir:1.11.4-erlang-24.0-alpine-3.13.3 on windows dev machine and ubuntu prod server, both giving [jit:no-native-stack]. I guess it’s lacking some compile time flag, namely NATIVE_ERLANG_STACK.

Question is, CAN it compile with that flag in docker?

The prompt that you see means that the JIT is not able to use the native stack and stack pointer for Erlang processes. That will slightly reduce performance and perfwill not be able to show any information about Erlang functions. You will still get most of performance improvements of the JIT compared to not using the JIT.

The reason that the native stack is not used is that Alpine uses the musl C library which don’t support safely switching stacks when handling signals.

If you really need the native-stack support in Docker, it should work if you use another Linux distribution that uses glibc, for example Ubuntu.

11 Likes

Thank you very much for the reply. That clears it up. Cheers!

1 Like

I can confirm the build works flawlessly, without any of these hacks if you use version 2.69 of autoconf, on MacOs BigSur, both intel and M1. This is also the preferred way proposed by the erlang team.
To install the downgraded version you can use

brew install cjntaylor/personal/autoconf@2.69
brew unlink autoconf
brew link autoconf@2.69
asdf install erlang 24.0
16 Likes

Thank you

There are two issues opened on both asdf-erlang and Erlang OTP repositories, to track these problems.

I’m still not able to install Erlang 24.0 on MacOS Catalina.

1 Like

There is new PR which should help.

We (OTP) have always delivered OTP with already generated configure scripts in the tar file we publish. The tar file is what we have considered the deliverable. Today a lot of people (probably the most) build from a tag in the git repository and do not build from the tar file. It is therefore probably time to consider the tag in the git repository as the deliverable and include already generated configure scripts in git as well. This way old OTP releases wont be broken by new autoconf versions, and we get time to adjust the scripts in the latest release to new autoconf versions.

3 Likes

Hey, I updated as well, but now I am getting these new warnings:

warning: a term is constructed, but never used file_path_here

That I didn’t have before.

Any ideas?

3 Likes

It looks like an error in your code… and it is a warning only.

Somewhere You might have declared a variable, but did not use it.

That might be the case but more details would be nice. I too am getting a ton of these in all dependencies and in some of the app code.

From Errors and Exceptions | Learn You Some Erlang for Great Good!

./module.erl:5: Warning: a term is constructed, but never used
** In one of your functions, you’re doing something such as building a list, declaring a tuple or an anonymous function without ever binding it to a variable or returning it. This warning tells you you’re doing something useless or that you have made some mistake.**

But with only this error stack, it’s complicated to be more precise :slight_smile:

You don’t have the file and line number where the error occured?

I only have the file name, no line number.

I can’t share the code.

I reverted for now.

1 Like

The (functionally harmless) error is still there in your code, though. Not using 24.0 doesn’t make it go away :slight_smile: So perhaps it is better to stick with 24.0 and clear out the issues?

There was one of these warnings in Phoenix that I first noticed when upgrading to 24.0, but it was already fixed in a new release. (A Plug.Conn struct was getting updated, but that updated struct was never being used or returned to the caller, so “never used” … )

1 Like

Yes, that will have to happen eventually.

@tomciopp Do you know what the default KERL_CONFIGURE_OPTIONS when using the asdf command? Are these options for development or production only? I ask this question because I have a lot of these options currently set when building Erlang with asdf. Thanks in advance for any insight that you can regarding these configuration options.

Think different and code well,

-Conrad

Hey All, I was able to resolve my issue by first installing wxWidgets 3.1.5 from source as follows:

git clone git@github.com:wxWidgets/wxWidgets.git
cd wxWidgets
git submodule update --init src/png
git submodule update --init src/jpeg
./configure --with-cocoa --prefix=/usr/local --enable-webview --enable-compat28 --with-macosx-version-min=11.3
make
sudo make install

Then I installed Erlang 24.0 as follows:

export KERL_BUILD_DOCS=yes
export KERL_INSTALL_MANPAGES=yes
export wxUSE_MACOSX_VERSION_MIN=11
export EGREP=egrep
export CC=clang
export CPP="clang -E"
export KERL_USE_AUTOCONF=0

export KERL_CONFIGURE_OPTIONS="--disable-debug \
                               --disable-hipe \
                               --disable-sctp \
                               --disable-silent-rules \
                               --enable-darwin-64bit \
                               --enable-dynamic-ssl-lib \
                               --enable-kernel-poll \
                               --enable-shared-zlib \
                               --enable-smp-support \
                               --enable-threads \
                               --enable-wx \
                               --with-ssl=/opt/local \
                               --with-wx-config=/usr/local/bin/wx-config \
                               --without-javac \
                               --without-jinterface \
                               --without-odbc"
asdf install erlang 24.0
4 Likes

A post was merged into an existing topic: Erlang OTP-24.0.1 released!

Watch Mark’s YT video on how to fixed this asdf issue https://www.youtube.com/watch?v=w7JkhGrjnMY

2 Likes

Relatedly, I asked what to do afterwards. Do we remove “Darwin-disabled”?

Regarding: Erlang OTP-24.0.1 released! - #18 by woohaaha

Alchemist.camp (https://alchemist.camp) posted this video recently: https://www.youtube.com/watch?v=w7JkhGrjnMY :clap:

He suggests editing kerl and changing “Darwin” to “Darwin-disabled”.

I haven’t tried this yet but I’m wondering what to do afterwards? Should we change it back to “Darwin”?