[erlang-questions] make from otp src error with `in6addr_any` `in6addr_loopback`

Tomas Abrahamsson tomas.abrahamsson@REDACTED
Wed Sep 19 16:31:58 CEST 2012


On Wed, Sep 19, 2012 at 3:08 PM, huang alex <alexhuang1984@REDACTED> wrote:
> Hi all:
>
> I used to build erlang from otp src, every thing was fine.
>
> This time I got this error
>
> gcc -g -O2 -I/home/huanghuang/otp/erts/x86_64-unknown-linux-gnu  [...]
> obj/x86_64-unknown-linux-gnu/opt/smp/inet_drv.o
> drivers/common/inet_drv.c:1236:30: error: static declaration of ‘in6addr_any’ follows non-static declaration
> /usr/include/netinet/in.h:215:30: note: previous declaration of ‘in6addr_any’ was here
> drivers/common/inet_drv.c:1246:30: error: static declaration of ‘in6addr_loopback’ follows non-static declaration
> /usr/include/netinet/in.h:216:30: note: previous declaration of ‘in6addr_loopback’ was here
> make[3]: *** [obj/x86_64-unknown-linux-gnu/opt/smp/inet_drv.o] Error 1

> Is it related to something about ipv6? Do I have to install any other
> depedencies?

Hi, the change in inet_drv.c was due to my bugfixing of
multihoming for sctp (for ipv6 on linux and both ipv4/ipv6
on some other platforms).

However, the erts/configure.in is supposed to check for
any such dependencies and define appropriate
preprocessor symbols, it looks like that has failed
in your case, for some reason.

One thing to try is to build _completely_ from scratch
(don't know if you've tried that already, or not).
Also the output from the configure would
be interesting to see? What linux platoform
are you running on, what distro and version?

You say you are building from source, if this
means you're building from a git repo, then
one (crude) way to ensure you're building from
scratch, is to run git ls-files -o -z | xargs -0 /bin/rm -rf
which will remove _all_ files not known to git.

BRs
Tomas



More information about the erlang-questions mailing list