Subject: pkg/30697: clamav-0.86.1 does not build
To: None <pkg-manager@netbsd.org, gnats-admin@netbsd.org,>
From: John F. Woods <jfw@jfwhome.funhouse.com>
List: pkgsrc-bugs
Date: 07/08/2005 15:27:00
>Number:         30697
>Category:       pkg
>Synopsis:       clamav-0.86.1 does not build
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Jul 08 15:27:00 +0000 2005
>Originator:     John F. Woods
>Release:        NetBSD 2.0
>Organization:
Misanthropes-R-Us
>Environment:
	
	
System: NetBSD jfwhome.funhouse.com 2.0 NetBSD 2.0 (JFW) #0: Sun Dec 12 11:35:56 EST 2004 jfw@jfwhome.funhouse.com:/usr/src/sys/arch/i386/compile/JFW i386
Architecture: i386
Machine: i386
>Description:
	clamav-0.86.1 from /usr/pkg/src does not build:

===> Building for clamav-0.86.1
/usr/bin/make  all-recursive
Making all in libclamav
if /bin/sh ../libtool --mode=compile cc -DHAVE_CONFIG_H  -I. -I. -I.. -I.. -I./zziplib -I./mspack     -O2 -MT dsig.lo -MD -MP -MF ".deps/dsig.Tpo" -c -o dsig.lo dsig.c;  then mv -f ".deps/dsig.Tpo" ".deps/dsig.Plo"; else rm -f ".deps/dsig.Tpo"; exit 1; fi
 cc -DHAVE_CONFIG_H -I. -I. -I.. -I.. -I./zziplib -I./mspack -O2 -MT dsig.lo -MD -MP -MF .deps/dsig.Tpo -c dsig.c  -fPIC -DPIC -o .libs/dsig.o
dsig.c:31:17: gmp.h: No such file or directory
dsig.c:66: error: parse error before "mpz_t"
dsig.c: In function `cli_decodesig':
dsig.c:68: error: `sig' undeclared (first use in this function)
dsig.c:68: error: (Each undeclared identifier is reported only once
dsig.c:68: error: for each function it appears in.)
dsig.c:70: error: `mpz_t' undeclared (first use in this function)
dsig.c:70: error: parse error before "r"
dsig.c:73: error: `r' undeclared (first use in this function)
dsig.c:74: error: `c' undeclared (first use in this function)
dsig.c:85: error: `p' undeclared (first use in this function)
dsig.c:86: error: `plainlen' undeclared (first use in this function)
dsig.c:88: error: `e' undeclared (first use in this function)
dsig.c:88: error: `n' undeclared (first use in this function)
dsig.c: In function `cli_versig':
dsig.c:104: error: `mpz_t' undeclared (first use in this function)
...

The header file <gmp.h> is in /usr/pkg/include; presumably the local patches
should jam that directory into the Makefile (or Makefile.in) for libclamav.

>How-To-Repeat:

	See above.

>Fix:

Changing work/clamav-0.86.1/libclamav/Makefile on the following line

INCLUDES = -I$(top_srcdir) -I./zziplib -I./mspack -I/usr/pkg/include

to include /usr/pkg/include makes the build work.  Presumably you'd want
to patch the Makefile.in.