Edit:
I'm trying to install it on macOS Catalina 10.15.6 (19G73) but I'm getting an error related to inet_drv:
# CMD OUTPUT
asdf_23.0.3 is not a kerl-managed Erlang/OTP installation
The asdf_23.0.3 build has been deleted
Extracting source code
Building Erlang/OTP 23.0.3 (asdf_23.0.3), please wait...
/Users/rwillians/.asdf/plugins/erlang/kerl: line 661: /Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild: No such file or directory
APPLICATIONS DISABLED (See: /Users/rwillians/.asdf/plugins/erlang/kerl-home/builds/asdf_23.0.3/otp_build_23.0.3.log)
* jinterface : Java compiler disabled by user
Build failed.
extern const struct in6_addr in6addr_loopback;
^
CC obj/x86_64-apple-darwin19.6.0/opt/smp/prim_buffer_nif.o
2 errors generated.
make[4]: *** [obj/x86_64-apple-darwin19.6.0/opt/smp/inet_drv.o] Error 1
make[4]: *** Waiting for unfinished jobs....
make[3]: *** [opt] Error 2
make[2]: *** [opt] Error 2
make[1]: *** [smp] Error 2
make: *** [emulator] Error 2
Please see /Users/rwillians/.asdf/plugins/erlang/kerl-home/builds/asdf_23.0.3/otp_build_23.0.3.log for full details.
# LOG FRAGMENT
drivers/common/inet_drv.c:1484:30: error: static declaration of 'in6addr_any' follows non-static declaration
static const struct in6_addr in6addr_any = { { IN6ADDR_ANY_INIT } };
^
/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/netinet6/in6.h:211:30: note: previous declaration is here
extern const struct in6_addr in6addr_any;
^
drivers/common/inet_drv.c:1493:30: error: static declaration of 'in6addr_loopback' follows non-static declaration
static const struct in6_addr in6addr_loopback =
^
/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/netinet6/in6.h:212:30: note: previous declaration is here
extern const struct in6_addr in6addr_loopback;
^
CC obj/x86_64-apple-darwin19.6.0/opt/smp/prim_buffer_nif.o
2 errors generated.
make[4]: *** [obj/x86_64-apple-darwin19.6.0/opt/smp/inet_drv.o] Error 1
make[4]: *** Waiting for unfinished jobs....
make[3]: *** [opt] Error 2
make[2]: *** [opt] Error 2
make[1]: *** [smp] Error 2
make: *** [emulator] Error 2
Full log: otp_build_23.0.3.log
I have tried with all the following versions and had the same error:
Here's the deps I've installed and the flags I set:
brew install autoconf wxmac openssl fop coreutils automake libyaml readline libxslt libtool unixodbc unzip curl
export CFLAGS="-O2 -g -fno-stack-check"
export KERL_CONFIGURE_OPTIONS="--disable-hipe --without-javac --with-ssl=$(brew --prefix openssl)"
asdf install erlang <version>
I searched around and I found a ref to this error in an old thread where it says the possible solution is to rebuild erlang from scratch: http://erlang.org/pipermail/erlang-questions/2012-September/069262.html
I've tried installing from git (asdf install erlang ref:OTP-22.3.4.5) but got the same error 馃槶
Has anyone managed to workaround this?
PS: around late November of last year I was able to install 22.1.8 with no hassle at all
Had the same issue fixed it by
1) git config --global http.postBuffer 157286400
2) remove the tar file from ~/.asdf/plugins/erlang/kerl-home/archives/
3) and then restart the process asdf install erlang 23.0.3
Strange, I've not seen this error before. I'm not really sure what is wrong, but are you certain you installed all the dependencies correctly on OSX?
It may be worth opening an issue on the kerl issue tracker (asdf-erlang relies on kerl for builds) https://github.com/kerl/kerl/
@zubairshokh I tried that but didn't work for me 馃槶
@Stratus3D hm I'm pretty sure I did, I even installed more stuff that I had the last time I was able to build 22.1.8. I've also tried with javac but got same outcome.
At this point I just gave up and installed the latest version I could find on homebrew -- which, lucky me, is 22.1.8 -- so at least I can get back to work.
Thanks anyways, I'll open the issue on kerl as well.
I guess I can keep this issue open for a few more days in case someone here has any information regarding this error and hopefully an easy workaround.
Oddly it works on my machine (OSX 10.15.5, I'll try upgrading tomorrow).
```
asdf_23.0.3 is not a kerl-managed Erlang/OTP installation
The asdf_23.0.3 build has been deleted
Extracting source code
Building Erlang/OTP 23.0.3 (asdf_23.0.3), please wait...
DOCUMENTATION INFORMATION (See: /Users/
Erlang/OTP 23.0.3 (asdf_23.0.3) has been successfully built
Installing Erlang/OTP 23.0.3 (asdf_23.0.3) in /Users/
You can activate this installation running the following command:
. /Users/
Later on, you can leave the installation typing:
kerl_deactivate
Cleaning up compilation products for
Cleaned up compilation products for under /Users/
ln: ./erl_call: File exists
Erlang 23.0.3 has been installed. Activate globally with:
asdf global erlang 23.0.3
Activate locally in the current folder with:
asdf local erlang 23.0.3
Maybe the "solution" in Ruby's puma somehow relates to this problem? See puma/puma#2304. See this comment for the implicit declaration changes in Apple's gcc.
I was running into the same problem as @rwillians, following @nbibler's comment, I was able to install Erlang/OTP 23.0.3 successfully using export CFLAGS="-02 -Wno-error=implicit-function-declaration".
Installing xcode was _most likely_ the solution for me.
Hey guys
Good news: I was able to install it now.
Bad news: my environment isn't exactly the same as how it was when I reported the error, therefore it's harder to assert which exact change did the trick.
The main changes that I can remember are:
First, after @jswanner said that @nbibler suggestion worked for him, I tried it:
export CFLAGS="-02 -Wno-error=implicit-function-declaration"
export KERL_BUILD_DOCS="no"
export KERL_CONFIGURE_OPTIONS="--without-javac --with-ssl=$(brew --prefix openssl)"
asdf install erlang 23.0.3
That actually worked for the problem which I opened this issue for -- I no longer see that non-static declaration error --, but I got another error related to xcodebuid.
Then I tried using javac (I was half sure it wouldn't work but I really wanted to avoid installing xcode):
export CFLAGS="-02 -Wno-error=implicit-function-declaration"
export KERL_BUILD_DOCS="no"
export KERL_CONFIGURE_OPTIONS="--with-ssl=$(brew --prefix openssl)"
asdf install erlang 23.0.3
Well it didn't work, same xcodebuild thing.
So I finally took the defeat and installed xcode -- I had command line tools installed tho, which was enough for me the last time I installed erlang about 8 months ago -- and then I tried it again:
export KERL_BUILD_DOCS="no"
export KERL_CONFIGURE_OPTIONS="--without-javac --with-ssl=$(brew --prefix openssl)"
asdf install erlang 23.0.3
And it worked.
--
Unfortunately I don't have the time to reset my environment and try it all over again using only the bare minimal dependencies to properly build erlang, but my best guess here is that xcode is now (not sure since how long) a required dep.
FYI I was able to install it with these two flags:
$ export CFLAGS="-O2 -g -fno-stack-check -Wno-error=implicit-function-declaration"
$ asdf install erlang 23.0.3
@thdaraujo do you have Xcode installed?
@thdaraujo do you have Xcode installed?
no, just the xcode command line tools @rwillians
FYI I was able to install it with these two flags:
$ export CFLAGS="-O2 -g -fno-stack-check -Wno-error=implicit-function-declaration" $ asdf install erlang 23.0.3
This works for me, thank you
This did the trick for me (via https://github.com/asdf-vm/asdf-erlang/issues/116#issuecomment-538678768)
asdf-erlang has been updated to use kerl version 1.8.6. Can you try updating asdf-erlang and see if that fixes the problem? asdf plugin-update erlang should do the trick.
asdf plugin-update erlangasdf install erlang 22.3.4.12FYI I was able to install it with these two flags:
$ export CFLAGS="-O2 -g -fno-stack-check -Wno-error=implicit-function-declaration" $ asdf install erlang 23.0.3
This works for me, thank u !
Most helpful comment
FYI I was able to install it with these two flags: