I installed Erlang 24 / Elixir 1.12.0-rc.1-otp-24 under asdf (on Ubuntu 20.04 in wsl) without any build problems yesterday, but subsequent TLS connections (with a self-signed cert) to Phoenix apps fail. I only upgraded out of idle curiosity & being new to Elixir don’t have the knowledge to chase the issue, so just reverted.
Just mentioning in case anyone else experiences the same.
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.
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
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.
./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
You don’t have the file and line number where the error occured?
The (functionally harmless) error is still there in your code, though. Not using 24.0 doesn’t make it go away 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” … )
@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.