Subject: lib/3030: Missing header file for libz
To: None <bernd@arresum.inka.de, gnats-bugs@gnats.netbsd.org>
From: Bernd Ernesti <bernd@arresum.inka.de>
List: netbsd-bugs
Date: 12/15/1996 21:47:08
>Number:         3030
>Category:       lib
>Synopsis:       Missing header file for libz
>Confidential:   no
>Severity:       non-critical
>Priority:       high
>Responsible:    lib-bug-people (Library Bug People)
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Dec 15 14:50:00 1996
>Last-Modified:
>Originator:     Bernd Ernesti
>Organization:
	
>Release:        NetBSD-current 30-Nov-96
>Environment:
	
System: NetBSD arresum 1.2B NetBSD 1.2B (VEEGO) #205: Wed Nov 27 00:08:09 MET 1996 bernd@arresum:/home/source/src/sys/arch/amiga/compile/VEEGO amiga


>Description:
	It is not possible to build libpng with the NetBSD libz, due
	to missing typedef's.
>How-To-Repeat:
	Get libpng-0.89c and try to build it with the NetBSD libz:
	make
gcc -O2  -c png.c
In file included from png.h:69,
                 from png.c:12:
pngconf.h:333: syntax error before `*'
pngconf.h:333: warning: data definition has no type or storage class
pngconf.h:334: syntax error before `*'
pngconf.h:334: warning: data definition has no type or storage class
In file included from png.c:12:
png.h:471: syntax error before `voidp'
png.h:481: syntax error before `voidp'
png.h:768: syntax error before `type'
png.h:771: syntax error before `struct_ptr'
png.h:903: syntax error before `png_zalloc'
png.h:903: syntax error before `png_ptr'
png.h:903: warning: data definition has no type or storage class
png.h:906: syntax error before `png_ptr'
png.c:86: syntax error before `png_zalloc'
png.c:86: syntax error before `png_ptr'
png.c: In function `png_zalloc':
png.c:91: `png_ptr' undeclared (first use this function)
png.c:91: (Each undeclared identifier is reported only once
png.c:91: for each function it appears in.)
png.c:92: `items' undeclared (first use this function)
png.c:92: `size' undeclared (first use this function)
png.c:104: `voidpf' undeclared (first use this function)
png.c: At top level:
png.c:109: syntax error before `png_ptr'
png.c: In function `png_zfree':
png.c:111: `png_ptr' undeclared (first use this function)
png.c:111: `ptr' undeclared (first use this function)
*** Error code 1

Stop.

>Fix:
	Install zconf.h and remove the '#ifdef _ZLIB_PRIVATE'.
	Yes, this adds another header file, but it will break at least libpng
	if you don't do that.

>Audit-Trail:
>Unformatted: