Hello.
My friend tries to install elixir into MacOS. It stops at installing erlang every time, then he tried to install erlang 23 individually, but it failed as well.
Anyone has same problem?
Eiji
September 18, 2020, 1:18pm
2
Papillon6814:
MacOS
I have never used MacOS
and brew
however I recommend asdf . You can install Elixir
both from source and precompiled version.
5 Likes
Thank you for your answer.
Do you know anything about this?
mikl
September 18, 2020, 3:00pm
4
What version of macOS is this?
If it’s running Big Sur, that might explain it.
I’ve been using Elixir from Homebrew for over a year, and I’ve never had problems like that.
1 Like
NobbZ
September 18, 2020, 3:02pm
5
Have you looked up the mentioned log-file for full details?
Anyway, there are a lot of MacOS/Erlang combinations known to be broken for a variety of reasons. And as I do not use a Mac, I do not really keep track of those… Perhaps you can tell us what MacOS version you use, what version of XCode, etc.
1 Like
@mikl
@NobbZ
His MacOS version is 10.15.6, and Xcode version is 12.0.
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/MacOSX.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/MacOSX.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_file_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
It is the error part of the log file. I don’t see any solutions for this…
Do you have some ideas?
Eiji
September 18, 2020, 3:35pm
7
It was already reported before. Please take a look at those issues:
opened 04:12AM - 04 Aug 20 UTC
closed 03:41AM - 07 Aug 20 UTC
Edit:
## Possible solutions:
- https://github.com/asdf-vm/asdf-erlang/issues… /157#issuecomment-685844782
- https://github.com/asdf-vm/asdf-erlang/issues/157#issuecomment-669441058
- https://github.com/asdf-vm/asdf-erlang/issues/157#issuecomment-669509084
---
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](https://github.com/asdf-vm/asdf-erlang/files/5019875/otp_build_23.0.3.log)**
I have tried with all the following versions and had the same error:
- 23.0.3
- 23.0.1
- 22.3.4.5
- 22.2.8
- 22.1.8.1
- 22.0.1
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
opened 05:46PM - 07 Aug 20 UTC
closed 07:39PM - 07 Aug 20 UTC
erlang installs for OTP 22 & OTP 23 are faling
```
asdf install erlang 22.3.4… .5
asdf_22.3.4.5 is not a kerl-managed Erlang/OTP installation
The asdf_22.3.4.5 build has been deleted
Extracting source code
Building Erlang/OTP 22.3.4.5 (asdf_22.3.4.5), please wait...
/Users/jeremyowens-boggs/.asdf/plugins/erlang/kerl: line 661: /Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild: No such file or directory
Build failed.
/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;
^
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/xxxx/.asdf/plugins/erlang/kerl-home/builds/asdf_22.3.4.5/otp_build_22.3.4.5.log for full details.
```
The log states
```
...
CC obj/x86_64-apple-darwin19.6.0/opt/smp/prim_buffer_nif.o
drivers/common/inet_drv.c:1481: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:1490: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;
^
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
```
2 Likes
zaljir
September 23, 2020, 6:38am
8
Setting CFLAGS to -O2 -Wno-error=implicit-function-declaration
fixed it for me (as described in the linked issues).
2 Likes