I’m trying to install erlang version 24.2 on a macbook m1 with macOS 12.3 Monterey and I’m having this compilation error.
Build failed.
/bin/sh: line 1: 55135 Segmentation fault: 11 erlc -W -Werror +debug_info -DUSE_ESOCK=true -DENABLE_MEGACO_FLEX_SCANNER=true -DMEGACO_REENTRANT_FLEX_SCANNER=true -Dmegaco_parser_inline -pa /Users/rrmartins/.asdf/plugins/erlang/kerl-home/builds/asdf_24.2/otp_src_24.2/lib/et/ebin -pa /Users/rrmartins/.asdf/plugins/erlang/kerl-home/builds/asdf_24.2/otp_src_24.2/lib/megaco/ebin +'{parse_transform,sys_pre_attributes}' +'{attribute,insert,app_vsn,"megaco-4.2"}' -I../../include -o../../ebin megaco_flex_scanner.erl
make[5]: *** [../../ebin/megaco_flex_scanner.beam] Error 139
make[5]: *** Waiting for unfinished jobs....
/bin/sh: line 1: 55134 Segmentation fault: 11 erlc -W -Werror +debug_info -DUSE_ESOCK=true -DENABLE_MEGACO_FLEX_SCANNER=true -DMEGACO_REENTRANT_FLEX_SCANNER=true -Dmegaco_parser_inline -pa /Users/rrmartins/.asdf/plugins/erlang/kerl-home/builds/asdf_24.2/otp_src_24.2/lib/et/ebin -pa /Users/rrmartins/.asdf/plugins/erlang/kerl-home/builds/asdf_24.2/otp_src_24.2/lib/megaco/ebin +'{parse_transform,sys_pre_attributes}' +'{attribute,insert,app_vsn,"megaco-4.2"}' -I../../include -o../../ebin megaco_flex_scanner_handler.erl
make[5]: *** [../../ebin/megaco_flex_scanner_handler.beam] Error 139
make[4]: *** [opt] Error 2
make[3]: *** [opt] Error 2
make[2]: *** [opt] Error 2
make[1]: *** [opt] Error 2
make: *** [libs] Error 2
kip
April 1, 2022, 9:21pm
2
rrmartins:
megaco_flex_scanner
These seem to be errors related to megaco
rather than Erlang
? I have no knowledge of megaco
and had to google it. I have had no issues with OTP 24 or OTP 25 RC installs on my M1-based system hence my conjecture about megaco
-related configuration being the issue.
Your error message looks similar to the ones here:
opened 04:37PM - 21 May 21 UTC
Sorry if this is duplicated, but I couldn't find any issue with this specific er… ror.
I'm getting this error when I try to install OTP 24 through asdf. I've tried any solution for any problem reported with OTP 24 on macOS Big Sur that I could find, but nothing works. I've tried installing version 24.0.1 as well, with no success.
```
asdf_24.0 is not a kerl-managed Erlang/OTP installation
The asdf_24.0 build has been deleted
Extracting source code
Building Erlang/OTP 24.0 (asdf_24.0), please wait...
APPLICATIONS DISABLED (See: /Users/leandro/.asdf/plugins/erlang/kerl-home/builds/asdf_24.0/otp_build_24.0.log)
* jinterface : No Java compiler found
* odbc : ODBC library - link check failed
DOCUMENTATION INFORMATION (See: /Users/leandro/.asdf/plugins/erlang/kerl-home/builds/asdf_24.0/otp_build_24.0.log)
* documentation :
* fop is missing.
* Using fakefop to generate placeholder PDF files.
Build failed.
make[3]: *** Waiting for unfinished jobs....
/bin/sh: line 1: 45821 Segmentation fault: 11 erlc -W -Werror +debug_info -DUSE_ESOCK=true -I/Users/leandro/.asdf/plugins/erlang/kerl-home/builds/asdf_24.0/otp_src_24.0/lib/stdlib/include -Werror -o../ebin yecc.erl
make[3]: *** [../ebin/yecc.beam] Error 139
/bin/sh: line 1: 45824 Segmentation fault: 11 erlc -W -Werror +debug_info -DUSE_ESOCK=true -I/Users/leandro/.asdf/plugins/erlang/kerl-home/builds/asdf_24.0/otp_src_24.0/lib/stdlib/include -Werror -o../ebin yeccparser.erl
make[3]: *** [../ebin/yeccparser.beam] Error 139
/bin/sh: line 1: 45820 Segmentation fault: 11 erlc -W -Werror +debug_info -DUSE_ESOCK=true -I/Users/leandro/.asdf/plugins/erlang/kerl-home/builds/asdf_24.0/otp_src_24.0/lib/stdlib/include -Werror -o../ebin leex.erl
make[3]: *** [../ebin/leex.beam] Error 139
make[2]: *** [opt] Error 2
make[1]: *** [opt] Error 2
make: *** [secondary_bootstrap_build] Error 2
```
Make sure you’ve got the latest build of kerl
if you’re using it.