Subject: pkg/23901: pkgsrc isakmpd-20030903nb1 fails to compile ike_auth.c (xs4)
To: None <gnats-bugs@gnats.netbsd.org>
From: Rogier Krieger <rogier@virgiel.nl>
List: netbsd-bugs
Date: 12/27/2003 12:45:39
>Number:         23901
>Category:       pkg
>Synopsis:       isakmpd fails to compile on ike_auth.c
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat Dec 27 12:46:00 UTC 2003
>Closed-Date:
>Last-Modified:
>Originator:     Rogier Krieger
>Release:        NetBSD 1.6.1 (with patches up to SA2003-018)
>Organization:
	Iverdahl.net
>Environment:
	
	
System: NetBSD karres.wep.tudelft.nl 1.6.1 NetBSD 1.6.1 (KARRES) #1: Sun Oct 12 05:00:57 CEST 2003 root@karres.wep.tudelft.nl:/usr/src/sys/arch/i386/compile/KARRES i386
Architecture: i386
Machine: i386
>Description:
	On attempting to compile the pkgsrc isakmpd, I receive output from cc as
	listed below. It appears something needs to be included as several items
	are undeclared. Unfortunately, with my limited knowledge of C, I do not
	see anything nasty happening in this file.

	It does not appear to be anything with the patches, as a diff between
	the patched and unpatched ike_auth.c shows nothing of the items missing
	by cc.

	I will gladly track and hunt down suggestions to fix this.

	# diff ike_auth.c ike_auth.c.orig 
	352c352
	<         util_ntoa ((char **)(void *)&buf,
	---
	>         util_ntoa ((char **)&buf,
	1059c1059
	<         util_ntoa ((char **)(void *)&buf2,
	---
	>         util_ntoa ((char **)&buf2,


	CC output (from pkgsrc 'make'):
cc -O2 -I/usr/pkg/include -Wall -Wmissing-prototypes  -DNEED_SYSDEP_APP  -I/usr/obj/pkg/security/isakmpd/work/isakmpd 
-I/usr/obj/pkg/security/isakmpd/work/isakmpd/sysdep/netbsd -I. -DNO_RSA -DNO_IDEA -DNO_RC5 -DHAVE_GETNAMEINFO  
-DHAVE_GETIFADDRS  -I/usr/obj/pkg/security/isakmpd/work/isakmpd/sysdep/common -I/usr/include -I/usr/include/openssl 
-DUSE_TRIPLEDES -DUSE_DES -DUSE_BLOWFISH -DUSE_CAST -DUSE_EC -DUSE_AGGRESSIVE -DUSE_DEBUG -DUSE_X509 -DUSE_RAWKEY 
-DMP_FLAVOUR=MP_FLAVOUR_OPENSSL -DUSE_LIBCRYPTO -DUSE_PF_KEY_V2    -Werror   -I/usr/pkg/include   -c ike_auth.c
ike_auth.c:90: parse error before `RSA'
ike_auth.c: In function `ike_auth_get_key':
ike_auth.c:147: `RSA' undeclared (first use in this function)
ike_auth.c:147: (Each undeclared identifier is reported only once
ike_auth.c:147: for each function it appears in.)
ike_auth.c:147: `rsakey' undeclared (first use in this function)
cc1: warnings being treated as errors
ike_auth.c:147: warning: statement with no effect
ike_auth.c:148: parse error before `fsize'
ike_auth.c:287: `fsize' undeclared (first use in this function)
ike_auth.c:307: warning: implicit declaration of function `PEM_read_bio_RSAPrivateKey'
ike_auth.c: In function `rsa_sig_decode_hash':
ike_auth.c:576: `RSA' undeclared (first use in this function)
ike_auth.c:576: `key' undeclared (first use in this function)
ike_auth.c:577: parse error before `hashsize'
ike_auth.c:592: `hash_p' undeclared (first use in this function)
ike_auth.c:592: `initiator' undeclared (first use in this function)
ike_auth.c:593: `id' undeclared (first use in this function)
ike_auth.c:594: `id_len' undeclared (first use in this function)
ike_auth.c:650: `found' undeclared (first use in this function)
ike_auth.c:684: `tag' undeclared (first use in this function)
ike_auth.c:710: `n' undeclared (first use in this function)
ike_auth.c:710: `id_cert' undeclared (first use in this function)
ike_auth.c:710: `id_cert_len' undeclared (first use in this function)
ike_auth.c:717: `id_found' undeclared (first use in this function)
ike_auth.c:718: `i' undeclared (first use in this function)
ike_auth.c:822: warning: implicit declaration of function `RSA_free'
ike_auth.c:827: `len' undeclared (first use in this function)
ike_auth.c:828: warning: implicit declaration of function `RSA_size'
ike_auth.c:844: warning: implicit declaration of function `RSA_public_decrypt'
ike_auth.c:845: `RSA_PKCS1_PADDING' undeclared (first use in this function)
ike_auth.c:857: `hashsize' undeclared (first use in this function)
ike_auth.c:866: `header' undeclared (first use in this function)
ike_auth.c: In function `rsa_sig_encode_hash':
ike_auth.c:1105: warning: implicit declaration of function `RSA_blinding_on'
ike_auth.c:1140: warning: implicit declaration of function `RSA_private_encrypt'
ike_auth.c:1141: `RSA_PKCS1_PADDING' undeclared (first use in this function)
ike_auth.c: At top level:
ike_auth.c:1221: parse error before `RSA'
ike_auth.c:1222: warning: `get_raw_key_from_file' was used with no prototype before its definition
ike_auth.c: In function `get_raw_key_from_file':
ike_auth.c:1228: `type' undeclared (first use in this function)
ike_auth.c:1235: `rsa' undeclared (first use in this function)
ike_auth.c:1244: `id' undeclared (first use in this function)
ike_auth.c:1244: `id_len' undeclared (first use in this function)
ike_auth.c:1272: warning: implicit declaration of function `PEM_read_bio_RSA_PUBKEY'
*** Error code 1

>How-To-Repeat:
	cd /usr/pkgsrc/security/isakmpd
	make clean; make

>Fix:
	
>Release-Note:
>Audit-Trail:
>Unformatted: