pornel/improved-pngquant — Issue #7: make fails under centos due to libpng issue with multiple inclusions of setjmp.h
Author: BonsaiDen
Created: 2011-12-09 14:18:28+00:00
State: open

System (CentOS5.2):

Linux 2.6.21.7-2.fc8xen #1 SMP Fri Feb 15 12:34:28 EST 2008 x86_64 x86_64 x86_64 GNU/Linux

These are the libpng-devel versions installed:

libpng-devel.i386 2:1.2.10-7.1.el5_0.1 libpng-devel.x86_64 2:1.2.10-7.1.el5_0.1

Make gives us this output:

gcc -DNDEBUG -O3 -Wall -I. -I../libpng -I../zlib -I/usr/X11/include/ -funroll-loops -fomit-frame-pointer -std=gnu99 -c -o pngquant.o pngquant.c
In file included from /usr/include/png.h:371,
from rwpng.h:34,
from pngquant.c:46:
/usr/include/pngconf.h:336: error: expected '=', ',', ';', 'asm' or '__attribute__' before '.' token
/usr/include/pngconf.h:337: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'include'
In file included from pngquant.c:49:
nearest.h:8:44: warning: no newline at end of file
pngquant.c: In function 'main':
pngquant.c:222: warning: missing braces around initializer
pngquant.c:222: warning: (near initialization for 'input_image.jmpbuf[0]')
pngquant.c:223: warning: missing braces around initializer
pngquant.c:223: warning: (near initialization for 'output_image.jmpbuf[0]')
make: *** [pngquant.o] Error 1

Seems to be a known problem when compiling libpng with another thing that uses "setjmp.h", the common practice seems to be to patch the pngconf.h under /usr/include... but uh, dunno if I want to do this.
INSTALL of libpng talks about some ways to work around this in code, but I don't have the time to dig into the whole thing right now.

Would be nice if you could comment on this and whether you're planning to "somehow" fix it

Best regards,

Ivo