Subject: Re: Nasty bug in devel/zlib
To: Georg Schwarz <georg.schwarz@freenet.de>
From: Adam <adam@albedo.art.pl>
List: tech-pkg
Date: 02/26/2005 23:46:13
> 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,

Can you check if adding:
CFLAGS= -O ${CFLAGS}
(in the place where CFLAGS= -O is removed by the patch) helps buidling 
on IRIX?
If it works, I can commit the change.
Thank you :)

Kind regards,
Adam