Subject: Nasty bug in devel/zlib
To: None <tech-pkg@netbsd.org>
From: Georg Schwarz <georg.schwarz@freenet.de>
List: tech-pkg
Date: 02/26/2005 23:29:47
I think I finally pinned down a nasty bug related to devel/zlib:

My system, IRIX 5.3, does not have vsnprintf; nevertheless when building
some packages (e.g. x11/gtk2) the linker complains about an unresolved
symbol vsnprintf in some libz shared library.
The reason for this seems to be as follows:

pkgsrc/devel/zlib/patches/patch-aa deletes the CFLAGS= line from
Makefile.in.
However zlib's configure script uses sed to match ^CFLAGS in order to
add the values it has determined. These values can contain
-DNO_vsnprintf or -DHAS_vsnprintf_void.
Because of the patch, these defines are dropped.

I have manually put back the CFLAGS=-O2 line to Makefile.in after the
patch phase, and ... all the strange problems with zlib are gone!

So, could we simply leave in the CFLAGS= line in Makefile.in? What is
the reason for it being removed?    

-- 
Georg Schwarz    http://home.pages.de/~schwarz/
 georg.schwarz@freenet.de     +49 178 8545053