asdf-vm/asdf-erlang

macOS Sonoma 14.0 - fails to install erlang < 26 version

belgoros opened this issue · 4 comments

I tried to install a older version of erlang after upgrading to the latest macOS version - Sonoma 14.0.
Steps to reproduce:

  • upgrade to Sonoma 14.0
  • accept XCode licence
  • remove previously installed plugin with asdf plugin remove erlang
  • add erlang plugin again with asdf plugin add erlang
  • install, for example, 25.1.2 version with asdf install erlang 25.1.2

Errors stack trace:

➜  ~ asdf install erlang 25.1.2
asdf_25.1.2 is not a kerl-managed Erlang/OTP installation
The asdf_25.1.2 build has been deleted
Extracting source code
Building Erlang/OTP 25.1.2 (asdf_25.1.2), please wait...
APPLICATIONS DISABLED (See: /Users/serguei/.asdf/plugins/erlang/kerl-home/builds/asdf_25.1.2/otp_build_25.1.2.log)
 * odbc           : ODBC library - link check failed

APPLICATIONS INFORMATION (See: /Users/serguei/.asdf/plugins/erlang/kerl-home/builds/asdf_25.1.2/otp_build_25.1.2.log)
 * wx             : Can not link wx program are all developer packages installed?

DOCUMENTATION INFORMATION (See: /Users/serguei/.asdf/plugins/erlang/kerl-home/builds/asdf_25.1.2/otp_build_25.1.2.log)
 * documentation  : 
 *                  fop is missing.
 *                  Using fakefop to generate placeholder PDF files.

Build failed.
/bin/sh: line 1: 80931 Bus error: 10           erlc -W -Werror +debug_info -DENABLE_MEGACO_FLEX_SCANNER=true -DMEGACO_REENTRANT_FLEX_SCANNER=true -Dmegaco_parser_inline -pa /Users/serguei/.asdf/plugins/erlang/kerl-home/builds/asdf_25.1.2/otp_src_25.1.2/lib/et/ebin -pa /Users/serguei/.asdf/plugins/erlang/kerl-home/builds/asdf_25.1.2/otp_src_25.1.2/lib/megaco/ebin +'{parse_transform,sys_pre_attributes}' +'{attribute,insert,app_vsn,"megaco-4.4.1"}' -I../../include -o../../ebin megaco_flex_scanner_handler.erl
make[5]: *** [../../ebin/megaco_flex_scanner_handler.beam] Error 138
make[5]: *** Waiting for unfinished jobs....
/bin/sh: line 1: 80930 Bus error: 10           erlc -W -Werror +debug_info -DENABLE_MEGACO_FLEX_SCANNER=true -DMEGACO_REENTRANT_FLEX_SCANNER=true -Dmegaco_parser_inline -pa /Users/serguei/.asdf/plugins/erlang/kerl-home/builds/asdf_25.1.2/otp_src_25.1.2/lib/et/ebin -pa /Users/serguei/.asdf/plugins/erlang/kerl-home/builds/asdf_25.1.2/otp_src_25.1.2/lib/megaco/ebin +'{parse_transform,sys_pre_attributes}' +'{attribute,insert,app_vsn,"megaco-4.4.1"}' -I../../include -o../../ebin megaco_flex_scanner.erl
make[5]: *** [../../ebin/megaco_flex_scanner.beam] Error 138
make[4]: *** [opt] Error 2
make[3]: *** [opt] Error 2
make[2]: *** [opt] Error 2
make[1]: *** [opt] Error 2
make: *** [libs] Error 2

Please see /Users/serguei/.asdf/plugins/erlang/kerl-home/builds/asdf_25.1.2/otp_build_25.1.2.log for full details.
Removing all artifacts except the logfile
(Use KERL_AUTOCLEAN=0 to keep build on failure, if desired)
Cleaning up compilation products for asdf_25.1.2
Cleaned up compilation products for asdf_25.1.2 under /Users/serguei/.asdf/plugins/erlang/kerl-home/builds

Installation of the latest erlang version, 26.1.1 was successful:

~ asdf install erlang 26.1.1
asdf_26.1.1 is not a kerl-managed Erlang/OTP installation
No build named asdf_26.1.1
Downloading 26.1.1 to /Users/serguei/.asdf/downloads/erlang/26.1.1...
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100  102M  100  102M    0     0  6055k      0  0:00:17  0:00:17 --:--:-- 6001k
Extracting source code
Building Erlang/OTP 26.1.1 (asdf_26.1.1), please wait...
APPLICATIONS DISABLED (See: /Users/serguei/.asdf/plugins/erlang/kerl-home/builds/asdf_26.1.1/otp_build_26.1.1.log)
 * odbc           : ODBC library - link check failed

DOCUMENTATION INFORMATION (See: /Users/serguei/.asdf/plugins/erlang/kerl-home/builds/asdf_26.1.1/otp_build_26.1.1.log)
 * documentation  : 
 *                  fop is missing.
 *                  Using fakefop to generate placeholder PDF files.

Erlang/OTP 26.1.1 (asdf_26.1.1) has been successfully built
Cleaning up compilation products for 26.1.1
Cleaned up compilation products for 26.1.1 under /Users/serguei/.asdf/plugins/erlang/kerl-home/builds
➜  ~ asdf list erlang
  26.1.1

It seems to be related to #7687.

This is not an asdf issue but simply a bug in OTP. As mentioned in the issue you referenced, the following works:

KERL_CONFIGURE_OPTIONS="--disable-jit"
asdf install erlang 25.1.2

I don't think there is anything asdf can do at this point.

@Sgoettschkes is it possible to update asdf-erlang so that when you try to install Erlang < 26 on macOS Sonoma it refuses to do so and describes why it doesn't work (e.g. maybe link to this issue)?

Erlang already fixed the issue (erlang/otp@ac591a5). Why should asdf refuse the install?

Ah, I didn't realize that there was a fix for this in Erlang. That's great!

In that case asdf definitely shouldn't refuse to install, although if if had a list of known-bad versions then I think emitting a warning would be helpful to avoid user's spending time troubleshooting a version that is known not to work. But maybe this is a better discussion for a separate feature request.