Subject: /usr/src/crypto/dist/kame/racoon/crypto_openssl.c 1.11
To: None <tech-userlevel@netbsd.org>
From: glen mccready <gkm@petting-zoo.net>
List: tech-userlevel
Date: 09/23/2003 11:04:10
Trying to run build.sh on a -current (sparc64) and I've encountered a
build problem with racoon...
My mk.conf has:
COPTS+=-pipe -O2
Which results in the following compilation line:
/var/obj/sparc64/usr/src/tooldir.NetBSD-1.6ZC-sparc64/bin/sparc64--netbsd-gcc -g -pipe -O2 -Wall -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wno-sign-compare -Wno-traditional -Wno-uninitialized -Werror -DINET6 -DHAVE_FUNCTION_MACRO=1 -DHAVE_LIBCRYPTO=1 -DHAVE_LIBL=1 -DHAVE_LIBY=1 -DENABLE_IPV6=1 -DADVAPI=1 -DHAVE_GETADDRINFO=1 -DHAVE_GETNAMEINFO=1 -DSTDC_HEADERS=1 -DHAVE_SYS_WAIT_H=1 -DHAVE_LIMITS_H=1 -DHAVE_SYS_TIME_H=1 -DHAVE_UNISTD_H=1 -DHAVE_STDARG_H=1 -DHAVE_VARARGS_H=1 -DTIME_WITH_SYS_TIME=1 -DRETSIGTYPE=void -DHAVE_VPRINTF=1 -DHAVE_GETTIMEOFDAY=1 -DHAVE_SELECT=1 -DHAVE_SOCKET=1 -DHAVE_STRERROR=1 -DHAVE_STRTOL=1 -DHAVE_STRTOUL=1 -DHAVE_STRDUP=1 -DHAVE_GETIFADDRS=1 -DHAVE_ARC4RANDOM=1 -DHAVE_PFKEYV2 -DYIPS_DEBUG -DIPSEC -I. -I/usr/src/crypto/dist/kame/racoon -DSYSCONFDIR=\"/etc/racoon\" -DHAVE_OPENSSL_OPENSSLV_H=1 -DYY_NO_UNPUT -I/usr/src/crypto/dist/kame/libipsec -I/usr/src/crypto/dist/kame/racoon/missing -DHAVE_GSSAPI -DRACOON_PKG_VERSION="\"netbsd-20
030826\"" -I/usr/src/dist/tcpdump -I/usr/src/dist/tcpdump/lbl -DHAVE_PRINT_ISAKMP_C=1 -I/var/obj/sparc64/usr/src/destdir.sparc64/usr/include/krb5 -DHAVE_SIGNING_C=1 -DHAVE_OPENSSL_PEM_H=1 -DHAVE_OPENSSL_X509_H=1 -DHAVE_OPENSSL_EVP_H=1 -nostdinc -isystem /var/obj/sparc64/usr/src/destdir.sparc64/usr/include -c /usr/src/crypto/dist/kame/racoon/crypto_openssl.c
Which then results in the following warnings (due to the -O2):
/usr/src/crypto/dist/kame/racoon/crypto_openssl.c: In function `eay_str2asn1dn':
/usr/src/crypto/dist/kame/racoon/crypto_openssl.c:185: warning: dereferencing type-punned pointer will break strict-aliasing rules
/usr/src/crypto/dist/kame/racoon/crypto_openssl.c: In function `eay_cmp_asn1dn':
/usr/src/crypto/dist/kame/racoon/crypto_openssl.c:214: warning: dereferencing type-punned pointer will break strict-aliasing rules
/usr/src/crypto/dist/kame/racoon/crypto_openssl.c:217: warning: dereferencing type-punned pointer will break strict-aliasing rules
Which then causes the build to fail due to -Werror being passed in.
Possible solutions:
- -fno-strict-aliasing
- -O1
- fix the cast
Also note that /usr/src/usr.sbin/racoon/racoon/Makefile.inc has ``DBG=-g''
for some unknown reason.
glen