asdf-vm / asdf-erlang

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

Unable to install erlang 21.0 on Arch Linux #318

Open semanavasco opened 3 months ago

semanavasco commented 3 months 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 3 months ago

The same trouble here...

garazdawi commented 2 months 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.

garazdawi commented 2 months 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.

warmwaffles commented 1 month ago

I'm getting this for OTP 26 as well.

EDIT I just found a comment I made back in May https://github.com/asdf-vm/asdf-erlang/issues/286#issuecomment-2093563063

garazdawi commented 1 month ago

What is the "this" that you are getting?

warmwaffles commented 1 month ago

I meant to say I was receiving the same issue that https://github.com/asdf-vm/asdf-erlang/issues/318#issuecomment-2332863770 referenced. I resolved this by installing some missing wx components. And then reinstalling OTP 26 with the following exported:

export KERL_CONFIGURE_OPTIONS="--without-javac --with-odbc=/var/lib/pacman/local/unixodbc-$(pacman -Q unixodbc | cut -d' ' -f2)"

Installed just fine.

I can install OTP27 without having to do any exports.

xeruf commented 2 weeks ago

which wx components specifically?

warmwaffles commented 2 weeks ago

I installed wxwidgets-common and wxwidgets-gtk3

xeruf commented 2 weeks ago

Already installed, to no avail, same for the flag :c Stuck with the same error as @garazdawi