kerl 2.2.1 fails to build OTP < 23.2 on macOS Big Sur and above
lnikkila opened this issue · comments
This doesn't look like an issue with asdf-erlang, but opening this for visibility.
kerl was recently updated to 2.2.1 in cebcf62, and there seems to be a regression with some of the included patches that results in behaviour similar to #161, where older versions of OTP < 23.2 fail to build due to some version checks on macOS Big Sur and above:
$ asdf install erlang 22.3.1
No build named asdf_22.3.1
Downloading 22.3.1 to /Users/user/.asdf/plugins/erlang/kerl-home/archives...
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 623 100 623 0 0 3893 0 --:--:-- --:--:-- --:--:-- 3893
100 87.1M 100 87.1M 0 0 9563k 0 0:00:09 0:00:09 --:--:-- 9743k
Extracting source code
Building Erlang/OTP 22.3.1 (asdf_22.3.1), please wait...
Build failed.
You are natively building Erlang/OTP for a later version of MacOSX
than current version (11.4). You either need to
cross-build Erlang/OTP, or set the environment variable
MACOSX_DEPLOYMENT_TARGET to 11.4 (or a lower version).
ERROR: /Users/user/.asdf/plugins/erlang/kerl-home/builds/asdf_22.3.1/otp_src_22.3.1/make/configure failed!
make: *** No rule to make target `is_cross_configured'. Stop.
make: *** No rule to make target `all'. Stop.
Please see /Users/user/.asdf/plugins/erlang/kerl-home/builds/asdf_22.3.1/otp_build_22.3.1.log for full details.
There were some patches included in kerl earlier to fix this, in kerl/kerl@622e66e, however kerl 2.2.1 includes an unrelated change that causes these patches to have no effect.
I've reported this as kerl/kerl#384, and there's a workaround with asdf that downgrades asdf-erlang to an older version and uses some specific versions of dependencies:
$ asdf plugin-update erlang 26321a566fc6f59d3edbdce6e737d7bf469df845
$ brew install autoconf@2.69 openssl@1.1
$ brew link --overwrite autoconf@2.69
$ KERL_CONFIGURE_OPTIONS="--with-ssl=$(brew --prefix openssl@1.1)" asdf install
It looks like #227 was an earlier report about the same root cause.