From nobody@FreeBSD.org  Mon Jan 16 17:40:23 2012
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id A39A3106564A
	for <freebsd-gnats-submit@FreeBSD.org>; Mon, 16 Jan 2012 17:40:23 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from red.freebsd.org (red.freebsd.org [IPv6:2001:4f8:fff6::22])
	by mx1.freebsd.org (Postfix) with ESMTP id 8800E8FC13
	for <freebsd-gnats-submit@FreeBSD.org>; Mon, 16 Jan 2012 17:40:23 +0000 (UTC)
Received: from red.freebsd.org (localhost [127.0.0.1])
	by red.freebsd.org (8.14.4/8.14.4) with ESMTP id q0GHeNnH028680
	for <freebsd-gnats-submit@FreeBSD.org>; Mon, 16 Jan 2012 17:40:23 GMT
	(envelope-from nobody@red.freebsd.org)
Received: (from nobody@localhost)
	by red.freebsd.org (8.14.4/8.14.4/Submit) id q0GHeNLJ028679;
	Mon, 16 Jan 2012 17:40:23 GMT
	(envelope-from nobody)
Message-Id: <201201161740.q0GHeNLJ028679@red.freebsd.org>
Date: Mon, 16 Jan 2012 17:40:23 GMT
From: Devin Teske <dteske@vicor.com>
To: freebsd-gnats-submit@FreeBSD.org
Subject: [PATCH] buildworld WITHOUT_OPENSSL stops at usr.sbin/wpa/hostapd
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         164209
>Category:       bin
>Synopsis:       [build] [patch] buildworld WITHOUT_OPENSSL stops at usr.sbin/wpa/hostapd
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    dteske
>State:          feedback
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Jan 16 17:50:07 UTC 2012
>Closed-Date:    
>Last-Modified:  Tue May  8 16:30:11 UTC 2012
>Originator:     Devin Teske
>Release:        FreeBSD 9.0-RELEASE amd64
>Organization:
FIS Global, Inc.
>Environment:
FreeBSD scribe.vicor.com 9.0-RELEASE FreeBSD 9.0-RELEASE #0: Tue Jan 3 07:46:30 UTC 2010
root@farrell.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC amd64
>Description:
When performing buildworld while specifying WITHOUT_OPENSSL, the depend target fails during mkdep. Output below:

===> usr.sbin/wpa/hostapd (depend)
rm -f .depend
mkdep -f .depend -a    -DDRUID -I/usr/src/usr.sbin/wpa/hostapd -I/usr/src/usr.sbin/wpa/hostapd/../../../contrib/wpa//src -I/usr/src/usr.sbin/wpa/hostapd/../../../contrib/wpa//src/common -I/usr/src/usr.sbin/wp
a/hostapd/../../../contrib/wpa//src/crypto -I/usr/src/usr.sbin/wpa/hostapd/../../../contrib/wpa//src/l2_packet -I/usr/src/usr.sbin/wpa/hostapd/../../../contrib/wpa//src/utils -DCONFIG_CTRL_IFACE -DCONFIG_CTRL
_IFACE_UNIX -I/usr/src/usr.sbin/wpa/hostapd/../../../contrib/wpa//hostapd -I/usr/src/usr.sbin/wpa/hostapd/../../../contrib/wpa//src/drivers -DCONFIG_DRIVER_BSD -DHOSTAPD -DCONFIG_DRIVER_RADIUS_ACL -DCONFIG_IP
V6 -DEAP_TLS_NONE -DINTERNAL_AES -DINTERNAL_SHA1 -DINTERNAL_MD5 -I/usr/src/usr.sbin/wpa/hostapd -I/usr/src/usr.sbin/wpa/hostapd/../../../contrib/wpa//src -I/usr/src/usr.sbin/wpa/hostapd/../../../contrib/wpa//
src/common -I/usr/src/usr.sbin/wpa/hostapd/../../../contrib/wpa//src/crypto -I/usr/src/usr.sbin/wpa/hostapd/../../../contrib/wpa//src/l2_packet -I/usr/src/usr.sbin/wpa/hostapd/../../../contrib/wpa//src/utils
-DCONFIG_CTRL_IFACE -DCONFIG_CTRL_IFACE_UNIX /usr/src/usr.sbin/wpa/hostapd/../../../contrib/wpa//src/ap/accounting.c /usr/src/usr.sbin/wpa/hostapd/../../../contrib/wpa//src/crypto/aes-wrap.c /usr/src/usr.sbin
/wpa/hostapd/../../../contrib/wpa//src/ap/ap_config.c /usr/src/usr.sbin/wpa/hostapd/../../../contrib/wpa//src/ap/ap_drv_ops.c /usr/src/usr.sbin/wpa/hostapd/../../../contrib/wpa//src/ap/ap_mlme.c /usr/src/usr.
sbin/wpa/hostapd/../../../contrib/wpa//src/ap/authsrv.c /usr/src/usr.sbin/wpa/hostapd/../../../contrib/wpa//src/eap_common/chap.c /usr/src/usr.sbin/wpa/hostapd/../../../contrib/wpa//src/utils/common.c /usr/sr
c/usr.sbin/wpa/hostapd/../../../contrib/wpa//hostapd/config_file.c /usr/src/usr.sbin/wpa/hostapd/../../../contrib/wpa//hostapd/ctrl_iface.c /usr/src/usr.sbin/wpa/hostapd/../../../contrib/wpa//src/crypto/crypt
o_openssl.c /usr/src/usr.sbin/wpa/hostapd/../../../contrib/wpa//src/ap/ctrl_iface_ap.c /usr/src/usr.sbin/wpa/hostapd/../../../contrib/wpa//src/drivers/drivers.c /usr/src/usr.sbin/wpa/hostapd/../../../contrib/
wpa//src/ap/drv_callbacks.c /usr/src/usr.sbin/wpa/hostapd/../../../contrib/wpa//hostapd/dump_state.c /usr/src/usr.sbin/wpa/hostapd/../../../contrib/wpa//src/eap_common/eap_common.c /usr/src/usr.sbin/wpa/hosta
pd/../../../contrib/wpa//src/eap_common/eap_peap_common.c /usr/src/usr.sbin/wpa/hostapd/../../../contrib/wpa//hostapd/eap_register.c /usr/src/usr.sbin/wpa/hostapd/../../../contrib/wpa//src/eap_server/eap_serv
er.c /usr/src/usr.sbin/wpa/hostapd/../../../contrib/wpa//src/eap_server/eap_server_gtc.c /usr/src/usr.sbin/wpa/hostapd/../../../contrib/wpa//src/eap_server/eap_server_identity.c /usr/src/usr.sbin/wpa/hostapd/
./../../contrib/wpa//src/eap_server/eap_server_md5.c /usr/src/usr.sbin/wpa/hostapd/../../../contrib/wpa//src/eap_server/eap_server_methods.c /usr/src/usr.sbin/wpa/hostapd/../../../contrib/wpa//src/eap_server
/eap_server_mschapv2.c /usr/src/usr.sbin/wpa/hostapd/../../../contrib/wpa//src/eap_server/eap_server_peap.c /usr/src/usr.sbin/wpa/hostapd/../../../contrib/wpa//src/eap_server/eap_server_tls.c /usr/src/usr.sbi
n/wpa/hostapd/../../../contrib/wpa//src/eap_server/eap_server_tls_common.c /usr/src/usr.sbin/wpa/hostapd/../../../contrib/wpa//src/eap_server/eap_server_ttls.c /usr/src/usr.sbin/wpa/hostapd/../../../contrib/w
pa//src/eapol_auth/eapol_auth_dump.c /usr/src/usr.sbin/wpa/hostapd/../../../contrib/wpa//src/eapol_auth/eapol_auth_sm.c /usr/src/usr.sbin/wpa/hostapd/../../../contrib/wpa//src/utils/eloop.c /usr/src/usr.sbin/
wpa/hostapd/../../../contrib/wpa//src/ap/hostapd.c /usr/src/usr.sbin/wpa/hostapd/../../../contrib/wpa//src/ap/ieee802_11_auth.c /usr/src/usr.sbin/wpa/hostapd/../../../contrib/wpa//src/common/ieee802_11_common
.c /usr/src/usr.sbin/wpa/hostapd/../../../contrib/wpa//src/ap/ieee802_11_ht.c /usr/src/usr.sbin/wpa/hostapd/../../../contrib/wpa//src/ap/ieee802_1x.c /usr/src/usr.sbin/wpa/hostapd/../../../contrib/wpa//src/ut
ils/ip_addr.c /usr/src/usr.sbin/wpa/hostapd/../../../contrib/wpa//src/crypto/md5.c /usr/src/usr.sbin/wpa/hostapd/../../../contrib/wpa//hostapd/main.c /usr/src/usr.sbin/wpa/hostapd/../../../contrib/wpa//src/cr
ypto/ms_funcs.c /usr/src/usr.sbin/wpa/hostapd/../../../contrib/wpa//src/ap/peerkey_auth.c /usr/src/usr.sbin/wpa/hostapd/../../../contrib/wpa//src/ap/pmksa_cache_auth.c /usr/src/usr.sbin/wpa/hostapd/../../../c
ontrib/wpa//src/ap/preauth_auth.c /usr/src/usr.sbin/wpa/hostapd/../../../contrib/wpa//src/radius/radius.c /usr/src/usr.sbin/wpa/hostapd/../../../contrib/wpa//src/radius/radius_client.c /usr/src/usr.sbin/wpa/h
ostapd/../../../contrib/wpa//src/ap/sta_info.c /usr/src/usr.sbin/wpa/hostapd/../../../contrib/wpa//src/crypto/sha1-pbkdf2.c /usr/src/usr.sbin/wpa/hostapd/../../../contrib/wpa//src/crypto/sha1-tlsprf.c /usr/sr
c/usr.sbin/wpa/hostapd/../../../contrib/wpa//src/crypto/sha1-tprf.c /usr/src/usr.sbin/wpa/hostapd/../../../contrib/wpa//src/crypto/sha1.c /usr/src/usr.sbin/wpa/hostapd/../../../contrib/wpa//src/ap/tkip_counte
rmeasures.c /usr/src/usr.sbin/wpa/hostapd/../../../contrib/wpa//src/ap/utils.c /usr/src/usr.sbin/wpa/hostapd/../../../contrib/wpa//src/ap/vlan_init.c /usr/src/usr.sbin/wpa/hostapd/../../../contrib/wpa//src/ap
/wpa_auth.c /usr/src/usr.sbin/wpa/hostapd/../../../contrib/wpa//src/ap/wpa_auth_glue.c /usr/src/usr.sbin/wpa/hostapd/../../../contrib/wpa//src/ap/wpa_auth_ie.c /usr/src/usr.sbin/wpa/hostapd/../../../contrib/w
pa//src/common/wpa_common.c /usr/src/usr.sbin/wpa/hostapd/../../../contrib/wpa//src/utils/wpa_debug.c /usr/src/usr.sbin/wpa/hostapd/../../../contrib/wpa//src/utils/wpabuf.c /usr/src/usr.sbin/wpa/hostapd/../..
/../contrib/wpa//src/l2_packet/l2_packet_freebsd.c /usr/src/usr.sbin/wpa/hostapd/driver_freebsd.c /usr/src/usr.sbin/wpa/hostapd/../../../contrib/wpa//src/utils/os_unix.c /usr/src/usr.sbin/wpa/hostapd/../../..
/contrib/wpa//src/crypto/tls_none.c
/usr/src/usr.sbin/wpa/hostapd/../../../contrib/wpa//src/crypto/crypto_openssl.c:16:30: error: openssl/opensslv.h: No such file or directory
/usr/src/usr.sbin/wpa/hostapd/../../../contrib/wpa//src/crypto/crypto_openssl.c:17:25: error: openssl/err.h: No such file or directory
/usr/src/usr.sbin/wpa/hostapd/../../../contrib/wpa//src/crypto/crypto_openssl.c:18:25: error: openssl/des.h: No such file or directory
/usr/src/usr.sbin/wpa/hostapd/../../../contrib/wpa//src/crypto/crypto_openssl.c:19:25: error: openssl/aes.h: No such file or directory
/usr/src/usr.sbin/wpa/hostapd/../../../contrib/wpa//src/crypto/crypto_openssl.c:20:24: error: openssl/bn.h: No such file or directory
/usr/src/usr.sbin/wpa/hostapd/../../../contrib/wpa//src/crypto/crypto_openssl.c:21:25: error: openssl/evp.h: No such file or directory
/usr/src/usr.sbin/wpa/hostapd/../../../contrib/wpa//src/crypto/crypto_openssl.c:22:24: error: openssl/dh.h: No such file or directory
mkdep: compile failed

>How-To-Repeat:
1. csup RELENG_9
2. cd /usr/src
3. make buildworld -DWITHOUT_OPENSSL

NOTE: You'll first stop at lib/libarchive making depend. Apply the patch from PR 164206 to make it past lib/libarchive
NOTE: You'll next stop at lib/libbsnmp/libbsnmp making all. Apply the patch from PR 164208 to make it past lib/libbsnmp/libbsnmp

4. See above description for error output
>Fix:
See attached patch.txt

Patch attached with submission follows:

--- usr.sbin/wpa/hostapd/Makefile.orig	2011-09-22 17:51:37.000000000 -0700
+++ usr.sbin/wpa/hostapd/Makefile	2012-01-15 21:08:02.000000000 -0800
@@ -9,12 +9,13 @@
 	${WPA_DISTDIR}/src/eapol_auth \
 	${WPA_DISTDIR}/src/drivers \
 	${WPA_DISTDIR}/src/radius \
+	${WPA_DISTDIR}/src/crypto \
 	${WPA_DISTDIR}
 
 PROG=	hostapd
 SRCS=	accounting.c aes-wrap.c ap_config.c \
 	ap_drv_ops.c ap_mlme.c authsrv.c \
-	chap.c common.c config_file.c ctrl_iface.c crypto_openssl.c \
+	chap.c common.c config_file.c ctrl_iface.c \
 	ctrl_iface_ap.c drivers.c drv_callbacks.c dump_state.c \
 	eap_common.c eap_peap_common.c eap_register.c eap_server.c \
 	eap_server_gtc.c eap_server_identity.c eap_server_md5.c \
@@ -28,6 +29,12 @@
 	tkip_countermeasures.c utils.c \
 	vlan_init.c wpa_auth.c wpa_auth_glue.c wpa_auth_ie.c wpa_common.c \
 	wpa_debug.c wpabuf.c
+.if ${MK_OPENSSL} != "no"
+SRCS+=	crypto_openssl.c 
+.else
+SRCS+=	aes-internal.c aes-internal-enc.c des-internal.c md4-internal.c \
+	md5-internal.c rc4.c sha1-internal.c
+.endif
 SRCS+=	l2_packet_freebsd.c driver_freebsd.c os_unix.c
 
 MAN=	hostapd.8 hostapd.conf.5
@@ -46,8 +53,8 @@
 CFLAGS+= -DCONFIG_IPV6
 .endif
 #CFLAGS+= -g
-DPADD+=	${LIBPCAP} ${LIBSSL}
-LDADD+=	-lpcap -lssl
+DPADD+=	${LIBPCAP}
+LDADD+=	-lpcap
 
 # User customizations for wpa_supplicant/hostapd build environment
 CFLAGS+=${HOSTAPD_CFLAGS}


>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->freebsd-wireless 
Responsible-Changed-By: gavin 
Responsible-Changed-When: Fri Apr 27 12:50:59 UTC 2012 
Responsible-Changed-Why:  
Fix misfiled PR 

http://www.freebsd.org/cgi/query-pr.cgi?pr=164209 
State-Changed-From-To: open->feedback 
State-Changed-By: bschmidt 
State-Changed-When: Sat Apr 28 11:12:59 UTC 2012 
State-Changed-Why:  
should be fixed by r234759 

http://www.freebsd.org/cgi/query-pr.cgi?pr=164209 
Responsible-Changed-From-To: freebsd-wireless->dteske 
Responsible-Changed-By: dteske 
Responsible-Changed-When: Mon May 7 21:24:01 UTC 2012 
Responsible-Changed-Why:  
Take. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=164209 

From: Devin Teske <devin.teske@fisglobal.com>
To: <bug-followup@FreeBSD.org>, <dteske@vicor.com>
Cc:  
Subject: Re: bin/164209: [build] [patch] buildworld WITHOUT_OPENSSL stops at usr.sbin/wpa/hostapd
Date: Tue, 8 May 2012 09:27:07 -0700

 Do I need to prepare a HEAD release machine to test this on? or can I go ahead
 and cvsup HEAD to my 9.0-R box and test?
 -- 
 Devin
 
 _____________
 The information contained in this message is proprietary and/or confidential. If you are not the intended recipient, please: (i) delete the message and all copies; (ii) do not disclose, distribute or use the message in any manner; and (iii) notify the sender immediately. In addition, please be aware that any message addressed to our domain is subject to archiving and review by persons other than the intended recipient. Thank you.
>Unformatted:
