[blfs-support] PNGNQ Build Fails

Dan McGhee beesnees at grm.net
Fri Dec 27 13:16:56 PST 2013


I know this is not specifically a BLFS package, but I'm trying to build 
it as an adjunct and helper to GIMP.

The build fails with:

> rwpng.c:310:40: error: 'Z_BEST_COMPRESSION' undeclared (first use in 
> this function)
>      png_set_compression_level(png_ptr, Z_BEST_COMPRESSION);
>                                         ^
> make[2]: *** [rwpng.o] Error 1

because

> rwpng.c: In function 'rwpng_version_info':
> rwpng.c:52:7: error: 'ZLIB_VERSION' undeclared (first use in this 
> function)
>        ZLIB_VERSION, zlib_version);
>        ^
> rwpng.c:52:7: note: each undeclared identifier is reported only once 
> for each function it appears in
> rwpng.c:52:21: error: 'zlib_version' undeclared (first use in this 
> function)
>        ZLIB_VERSION, zlib_version);
>                      ^

The "config.log" which the executable "config.status" calls in an <exec> 
command has:

> 364    Configured with: /usr/src/gcc-4.8.1/gcc-4.8.1/configure 
> --prefix=/usr --libexecdir=/usr/lib --enable-shared 
> --enable-threads=posix --enable-__cxa_atexit --enable-clocale=gnu 
> --enable-languages=c,c++ --disable-multilib --disable-bootstrap 
> --disable-install-libiberty --with-system-zlib=

I used only "--prefix=/usr --libdir=/usr/lib --includedir=/usr/include" 
and neither libdir nor includedir got passed.  I used those hoping to 
help the configure script to find zlib.

The "config.log" has the following lines containing "zlib."

> configure:5218: checking for library containing zlibVersion
> /usr/src/pngnq-1.1/pngnq-1.1/conftest.c:43: undefined reference to 
> `zlibVersion'
> | char zlibVersion ();
> | return zlibVersion ();
> ac_cv_search_zlibVersion=-lz

Looking at line 364 above, the "/usr/src/gcc-4.8.1/gcc-4.8.1/configure" 
and the fact that the configure script recognized only the 
"--prefix=/usr" switch got my attention.  Is this a situation in which 
autoconf or autoreconf would work?  If so, I don't now how to use those 
without following instructions in the book and would need help.

Another possibility would be for me to edit the line 
"ac_cv_search_zlibVersion=-lz" but I would not know what to put in place 
of -lz.

The "/usr/src/gcc-4.8.1" sequence made me suspect that my Package Users 
system was getting in the way.  I tried to build pngnq as me and got 
exactly the same results in all areas.

I'd appreciate some pointers.

Dan








More information about the blfs-support mailing list