Tried it on Mac OS Mojave:
$ asdf install erlang 22.0-rc1
Downloading OTP-22.0-rc1.tar.gz to /Users/rodrigues/.asdf/plugins/erlang/kerl-home/archives
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 124 0 124 0 0 361 0 --:--:-- --:--:-- --:--:-- 362
100 52.0M 0 52.0M 0 0 204k 0 --:--:-- 0:04:20 --:--:-- 325k
Extracting source code
Building Erlang/OTP 22.0-rc1 (asdf_22.0-rc1), please wait...
Configure failed.
configure: WARNING: Check for large file support flags failed; getconf failed
checking if we can add -Werror=return-type to WERRORFLAGS (via CFLAGS)... yes
checking if we can add -Werror=implicit to WERRORFLAGS (via CFLAGS)... yes
checking if we can add -Werror=undef to WERRORFLAGS (via CFLAGS)... yes
checking CFLAGS for -O switch... configure: error:
CFLAGS must contain a -O flag. If you need to edit the CFLAGS you probably
also want to add the default CFLAGS. The default CFLAGS are "-O2 -g".
If you want to build erts without any optimization, pass -O0 to CFLAGS.
ERROR: /Users/rodrigues/.asdf/plugins/erlang/kerl-home/builds/asdf_22.0-rc1/otp_src_22.0-rc1/erts/configure failed!
./configure: line 341: kill: (-96754) - No such process
Please see /Users/rodrigues/.asdf/plugins/erlang/kerl-home/builds/asdf_22.0-rc1/otp_build_22.0-rc1.log for full details.
detailed log
$ cat /Users/rodrigues/.asdf/plugins/erlang/kerl-home/builds/asdf_22.0-rc1/otp_build_22.0-rc1.log
=== running autoconf in lib/common_test
=== running autoconf in lib/crypto
=== running autoconf in lib/erl_interface
=== running autoheader in lib/erl_interface
=== running autoconf in lib/megaco
=== running autoconf in lib/odbc
=== running autoconf in lib/snmp
=== running autoconf in lib/wx
=== running autoconf in lib/common_test/test_server
=== running autoconf in make
=== running autoconf in erts
=== running autoheader in erts
=== creating ./configure
/Users/rodrigues/.asdf/plugins/erlang/kerl-home/builds/asdf_22.0-rc1/otp_src_22.0-rc1/configure --cache-file=/dev/null CC=clang CFLAGS=-I/usr/local/opt/openssl/include/\ -I/opt/local/include CPPFLAGS=-I/usr/local/opt/openssl/include\ -I/usr/local/opt/ruby/include LDFLAGS=-L/usr/local/opt/openssl/lib\ -L/opt/local/lib\ -L/usr/local/opt/ruby/lib DED_LD=clang DED_LDFLAGS=-m64\ -bundle\ -bundle_loader\ /Users/rodrigues/\.asdf/plugins/erlang/kerl-home/builds/asdf_22\.0-rc1/otp_src_22\.0-rc1/bin/x86_64-apple-darwin18\.2\.0/beam\.smp --enable-darwin-64bit --with-ssl=/usr/local/opt/openssl
=== Running configure in /Users/rodrigues/.asdf/plugins/erlang/kerl-home/builds/asdf_22.0-rc1/otp_src_22.0-rc1/erts ===
./configure 'CC=clang' 'CPPFLAGS=-I/usr/local/opt/openssl/include -I/usr/local/opt/ruby/include' 'DED_LD=clang' 'DED_LDFLAGS=-m64 -bundle -bundle_loader /Users/rodrigues/.asdf/plugins/erlang/kerl-home/builds/asdf_22.0-rc1/otp_src_22.0-rc1/bin/x86_64-apple-darwin18.2.0/beam.smp' '--enable-darwin-64bit' '--with-ssl=/usr/local/opt/openssl' CFLAGS='-I/usr/local/opt/openssl/include/ -I/opt/local/include' LDFLAGS='-L/usr/local/opt/openssl/lib -L/opt/local/lib -L/usr/local/opt/ruby/lib' --disable-option-checking --cache-file=/dev/null --srcdir="/Users/rodrigues/.asdf/plugins/erlang/kerl-home/builds/asdf_22.0-rc1/otp_src_22.0-rc1/erts"
checking build system type... x86_64-apple-darwin18.2.0
checking host system type... x86_64-apple-darwin18.2.0
checking for gcc... clang
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether clang accepts -g... yes
checking for clang option to accept ISO C89... none needed
checking for library containing strerror... none required
checking OTP release... 22
checking OTP version... 22.0-rc1
checking for gcc... (cached) clang
checking whether we are using the GNU C compiler... (cached) yes
checking whether clang accepts -g... (cached) yes
checking for clang option to accept ISO C89... (cached) none needed
checking for mixed cygwin or msys and native VC++ environment... no
checking for mixed cygwin and native MinGW environment... no
checking if we mix cygwin with any native compiler... no
checking if we mix msys with another native compiler... no
checking for getconf... getconf
checking for large file support CFLAGS... failed
configure: WARNING: Check for large file support flags failed; getconf failed
checking if we can add -Werror=return-type to WERRORFLAGS (via CFLAGS)... yes
checking if we can add -Werror=implicit to WERRORFLAGS (via CFLAGS)... yes
checking if we can add -Werror=undef to WERRORFLAGS (via CFLAGS)... yes
checking CFLAGS for -O switch... configure: error:
CFLAGS must contain a -O flag. If you need to edit the CFLAGS you probably
also want to add the default CFLAGS. The default CFLAGS are "-O2 -g".
If you want to build erts without any optimization, pass -O0 to CFLAGS.
ERROR: /Users/rodrigues/.asdf/plugins/erlang/kerl-home/builds/asdf_22.0-rc1/otp_src_22.0-rc1/erts/configure failed!
./configure: line 341: kill: (-93096) - No such process
make: *** No rule to make target `clean'. Stop.
/Users/rodrigues/.asdf/plugins/erlang/kerl-home/builds/asdf_22.0-rc1/otp_src_22.0-rc1/configure --cache-file=/dev/null CC=clang CFLAGS=-I/usr/local/opt/openssl/include/\ -I/opt/local/include CPPFLAGS=-I/usr/local/opt/openssl/include\ -I/usr/local/opt/ruby/include LDFLAGS=-L/usr/local/opt/openssl/lib\ -L/opt/local/lib\ -L/usr/local/opt/ruby/lib DED_LD=clang DED_LDFLAGS=-m64\ -bundle\ -bundle_loader\ /Users/rodrigues/\.asdf/plugins/erlang/kerl-home/builds/asdf_22\.0-rc1/otp_src_22\.0-rc1/bin/x86_64-apple-darwin18\.2\.0/beam\.smp --enable-darwin-64bit --with-ssl=/usr/local/opt/openssl
=== Running configure in /Users/rodrigues/.asdf/plugins/erlang/kerl-home/builds/asdf_22.0-rc1/otp_src_22.0-rc1/erts ===
./configure 'CC=clang' 'CPPFLAGS=-I/usr/local/opt/openssl/include -I/usr/local/opt/ruby/include' 'DED_LD=clang' 'DED_LDFLAGS=-m64 -bundle -bundle_loader /Users/rodrigues/.asdf/plugins/erlang/kerl-home/builds/asdf_22.0-rc1/otp_src_22.0-rc1/bin/x86_64-apple-darwin18.2.0/beam.smp' '--enable-darwin-64bit' '--with-ssl=/usr/local/opt/openssl' CFLAGS='-I/usr/local/opt/openssl/include/ -I/opt/local/include' LDFLAGS='-L/usr/local/opt/openssl/lib -L/opt/local/lib -L/usr/local/opt/ruby/lib' --disable-option-checking --cache-file=/dev/null --srcdir="/Users/rodrigues/.asdf/plugins/erlang/kerl-home/builds/asdf_22.0-rc1/otp_src_22.0-rc1/erts"
checking build system type... x86_64-apple-darwin18.2.0
checking host system type... x86_64-apple-darwin18.2.0
checking for gcc... clang
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether clang accepts -g... yes
checking for clang option to accept ISO C89... none needed
checking for library containing strerror... none required
checking OTP release... 22
checking OTP version... 22.0-rc1
checking for gcc... (cached) clang
checking whether we are using the GNU C compiler... (cached) yes
checking whether clang accepts -g... (cached) yes
checking for clang option to accept ISO C89... (cached) none needed
checking for mixed cygwin or msys and native VC++ environment... no
checking for mixed cygwin and native MinGW environment... no
checking if we mix cygwin with any native compiler... no
checking if we mix msys with another native compiler... no
checking for getconf... getconf
checking for large file support CFLAGS... failed
configure: WARNING: Check for large file support flags failed; getconf failed
checking if we can add -Werror=return-type to WERRORFLAGS (via CFLAGS)... yes
checking if we can add -Werror=implicit to WERRORFLAGS (via CFLAGS)... yes
checking if we can add -Werror=undef to WERRORFLAGS (via CFLAGS)... yes
checking CFLAGS for -O switch... configure: error:
CFLAGS must contain a -O flag. If you need to edit the CFLAGS you probably
also want to add the default CFLAGS. The default CFLAGS are "-O2 -g".
If you want to build erts without any optimization, pass -O0 to CFLAGS.
ERROR: /Users/rodrigues/.asdf/plugins/erlang/kerl-home/builds/asdf_22.0-rc1/otp_src_22.0-rc1/erts/configure failed!
./configure: line 341: kill: (-96754) - No such process
Not sure what the issue is. I have not tried install Erlang 22 on any OS yet. Looks like getconf is failing even though it's found?
After doing the following (fish), it worked:
set CFLAGS "-O2 -g" $CFLAGS
In bash use:
CFLAGS="-O2 -g" asdf install erlang 22.3
Most helpful comment
After doing the following (fish), it worked:
set CFLAGS "-O2 -g" $CFLAGS