asdf-vm / asdf-erlang

Erlang plugin for asdf version manager
https://github.com/asdf-vm/asdf
MIT License
474 stars 118 forks source link

Unable to install erlang 21.0 on Arch Linux #318

Open semanavasco opened 1 month ago

semanavasco commented 1 month ago

I am unable to install erlang 21.0 on Arch Linux.

Here is my log file :

otp_build_21.0.log

Here is my error message :

Downloading kerl...
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 82830  100 82830    0     0  3524k      0 --:--:-- --:--:-- --:--:-- 3676k
ERROR: 'asdf_21.0' is not a kerl-managed Erlang/OTP installation.
Build 'asdf_21.0' has been deleted.
Extracting source code for normal build...
Building (normal) Erlang/OTP 21.0 (asdf_21.0); please wait...
Initializing (build) log file at /home/svasco/.asdf/plugins/erlang/kerl-home/builds/asdf_21.0/otp_build_21.0.log.
automake: error: 'configure.ac' is required
autoconf: error: no input file
APPLICATIONS INFORMATION (See: /home/svasco/.asdf/plugins/erlang/kerl-home/builds/asdf_21.0/otp_build_21.0.log)
 * wx             : Can not link the wx driver, wx will NOT be useable

ERROR: build failed.
 8311 |   branch_chain *bcptr, compile_data *cd, int *lengthptr)
      |                        ~~~~~~~~~~~~~~^~
make[4]: Leaving directory '/home/svasco/.asdf/plugins/erlang/kerl-home/builds/asdf_21.0/otp_src_21.0/erts/emulator'
make[3]: *** [/home/svasco/.asdf/plugins/erlang/kerl-home/builds/asdf_21.0/otp_src_21.0/make/run_make.mk:35: opt] Error 2
make[3]: Leaving directory '/home/svasco/.asdf/plugins/erlang/kerl-home/builds/asdf_21.0/otp_src_21.0/erts/emulator'
make[2]: *** [Makefile:45: opt] Error 2
make[2]: Leaving directory '/home/svasco/.asdf/plugins/erlang/kerl-home/builds/asdf_21.0/otp_src_21.0/erts'
make[1]: *** [Makefile:54: smp] Error 2
make[1]: Leaving directory '/home/svasco/.asdf/plugins/erlang/kerl-home/builds/asdf_21.0/otp_src_21.0/erts'
make: *** [Makefile:470: emulator] Error 2

Please see /home/svasco/.asdf/plugins/erlang/kerl-home/builds/asdf_21.0/otp_build_21.0.log for full details.
Auto cleaning all artifacts except the log file...
(use KERL_AUTOCLEAN=0 to keep build on failure, if desired)
Cleaning up compilation products for 'asdf_21.0' under:
  - /home/svasco/.asdf/plugins/erlang/kerl-home/builds...
  - /home/svasco/.asdf/downloads/erlang/21.0...
... done.

For the record, I have followed the "Before asdf install" until this part : "Older OTP builds may require wxgtk2, in that case install wxgtk2-dev from AUR." because wxgtk2-dev does not exist on the AUR.

Thanks !

Tyrn commented 2 weeks ago

The same trouble here...

garazdawi commented 2 weeks ago

The build.log shows this error:

drivers/common/inet_drv.c:1419:30: error: static declaration of ‘in6addr_loopback’ follows non-static declaration
 1419 | static const struct in6_addr in6addr_loopback =
      |                              ^~~~~~~~~~~~~~~~

which suggests that the compiler in the system is more stict than what was used when developing Erlang/OTP 21. I suggest using an Erlang version that is still supported (24+), or disable that check in gcc using the relevant CFLAGS.

Hentioe commented 1 week ago

I used mise installation on NixOS and it also contained the following two errors:

automake: error: 'configure.ac' is required
autoconf: error: no input file

But it still built/installed and worked fine.

garazdawi commented 1 week ago

If you have the time, the kerl maintainers would appriciate help to fix the issue: https://github.com/kerl/kerl/issues/546. kerl is what is used by mise and asdf under the hood to build Erlang.