pbiering/ipv6calc

ipv6calc 3.0.1 osx build failure

Closed this issue ยท 6 comments

๐Ÿ‘‹ trying to build the latest release, but run into some build issue. The error log is as below:

build failure
==> ./configure --prefix=/usr/local/Cellar/ipv6calc/3.0.1 --mandir=/usr/local/Cellar/ipv6calc/3.0.1/share/man
checking for gawk... no
checking for mawk... no
checking for nawk... no
checking for awk... awk
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 ranlib... ranlib
checking whether make sets $(MAKE)... yes
checking how to run the C preprocessor... clang -E
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for ANSI C header files... yes
checking for an ANSI C-conforming const... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for off_t... yes
checking for size_t... yes
checking whether byte ordering is bigendian... no
**** analyze compiler options: CC=clang
*** check for CFLAGS: -Werror=format-security
*** CFLAGS supported: -Werror=format-security
*** check for CFLAGS: -Wsizeof-array-argument
*** CFLAGS supported: -Wsizeof-array-argument
*** check for CFLAGS: -Wparentheses-equality
*** CFLAGS supported: -Wparentheses-equality
*** check for CFLAGS: -Wextra
*** CFLAGS supported: -Wextra
*** check for CFLAGS: -Werror=format-truncation=0
configure: WARNING: *** missing CFLAGS support: -Werror=format-truncation=0
checking for getopt_long... yes
*** use of system getopt library autoselected
checking openssl/md5.h usability... no
checking openssl/md5.h presence... no
checking for openssl/md5.h... no
configure: WARNING: openssl/md5.h header file not found (will use bundled MD5 function).
checking dlfcn.h usability... yes
checking dlfcn.h presence... yes
checking for dlfcn.h... yes
libipv6calc_db_wrapper.c:2330:39: error: no member named 's6_addr32' in 'struct in6_addr'
            &&  (&cache_lu_ipv6addr.in6_addr.s6_addr32[0] == &ipv6addrp->in6_addr.s6_addr32[0])
                  ~~~~~~~~~~~~~~~~~~~~~~~~~~ ^
libipv6calc_db_wrapper.c:2330:76: error: no member named 's6_addr32' in 'struct in6_addr'
            &&  (&cache_lu_ipv6addr.in6_addr.s6_addr32[0] == &ipv6addrp->in6_addr.s6_addr32[0])
                                                              ~~~~~~~~~~~~~~~~~~~ ^
libipv6calc_db_wrapper.c:2331:39: error: no member named 's6_addr32' in 'struct in6_addr'
            &&  (&cache_lu_ipv6addr.in6_addr.s6_addr32[1] == &ipv6addrp->in6_addr.s6_addr32[1])
                  ~~~~~~~~~~~~~~~~~~~~~~~~~~ ^
libipv6calc_db_wrapper.c:2331:76: error: no member named 's6_addr32' in 'struct in6_addr'
            &&  (&cache_lu_ipv6addr.in6_addr.s6_addr32[1] == &ipv6addrp->in6_addr.s6_addr32[1])
                                                              ~~~~~~~~~~~~~~~~~~~ ^
libipv6calc_db_wrapper.c:2332:39: error: no member named 's6_addr32' in 'struct in6_addr'
            &&  (&cache_lu_ipv6addr.in6_addr.s6_addr32[2] == &ipv6addrp->in6_addr.s6_addr32[2])
                  ~~~~~~~~~~~~~~~~~~~~~~~~~~ ^
libipv6calc_db_wrapper.c:2332:76: error: no member named 's6_addr32' in 'struct in6_addr'
            &&  (&cache_lu_ipv6addr.in6_addr.s6_addr32[2] == &ipv6addrp->in6_addr.s6_addr32[2])
                                                              ~~~~~~~~~~~~~~~~~~~ ^
libipv6calc_db_wrapper.c:2333:39: error: no member named 's6_addr32' in 'struct in6_addr'
            &&  (&cache_lu_ipv6addr.in6_addr.s6_addr32[3] == &ipv6addrp->in6_addr.s6_addr32[3])
                  ~~~~~~~~~~~~~~~~~~~~~~~~~~ ^
libipv6calc_db_wrapper.c:2333:76: error: no member named 's6_addr32' in 'struct in6_addr'
            &&  (&cache_lu_ipv6addr.in6_addr.s6_addr32[3] == &ipv6addrp->in6_addr.s6_addr32[3])
                                                              ~~~~~~~~~~~~~~~~~~~ ^
8 errors generated.
make[2]: *** [libipv6calc_db_wrapper.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [all] Error 2
make: *** [db-wrapper-make] Error 2

Full build log is in here, https://github.com/Homebrew/homebrew-core/runs/1698228351
relates to Homebrew/homebrew-core#68962

hmm, this is related to replacing "memcmp" by dedicated structure entry compare.

    ...
     (&cache_lu_ipv6addr.in6_addr.s6_addr32[0] == &ipv6addrp->in6_addr.s6_addr32[0])
    ...

Looks like in "homebrew" something is missing in the header definition.

At least Enterprise Linux >= 7 has defined in /usr/include/netinet/in.h:

#define s6_addr                 __in6_u.__u6_addr8
#ifdef __USE_MISC
# define s6_addr16              __in6_u.__u6_addr16
# define s6_addr32              __in6_u.__u6_addr32
#endif

Can you check content of your "in.h"

fixed by 6c89a41 (run some FreeBSD regression tests)
3.0.2 will be released next days, "gmake test" should then work also proper on *BSD

fixed a lot of FreeBSD issues, should also fix build on osx: https://github.com/pbiering/ipv6calc/releases/tag/3.0.2

let me give a shot.

ipv6calc 3.0.2 works for me, see details in Homebrew/homebrew-core#68962

Thanks @pbiering! Closing the issue now.