I found some discussion here, http://article.gmane.org/gmane.comp.graphics.png.devel/3091 And it's trying to include pngpriv.h (png internals) which isn't installed by libpng, and isn't shipped in optipng tarball. I've tried copying pngpriv.h from libpng-1.4.1 to the source tree, but it still fails. Attaching build.log
Created attachment 222847 [details] build.log
>>> Completed installing optipng-0.6.4 into /var/tmp/portage/media-gfx/optipng-0.6.4/image/ NEEDED libpng14.so.14 Thanks Tristan!
Sorry, my bad, still had local copy of pngpriv.h in /usr/include, it's not installed by libpng 1.4.1 opngreduc.c:26:21: error: pngpriv.h: No such file or directory opngreduc.c: In function ‘opng_validate_image’: opngreduc.c:111: warning: implicit declaration of function ‘png_debug’ opngreduc.c: In function ‘opng_get_alpha_row’: opngreduc.c:330: error: ‘PNG_FILLER’ undeclared (first use in this function) opngreduc.c:330: error: (Each undeclared identifier is reported only once opngreduc.c:330: error: for each function it appears in.) opngreduc.c:331: error: ‘PNG_FLAG_FILLER_AFTER’ undeclared (first use in this function) opngreduc.c: In function ‘opng_analyze_bits’: opngreduc.c:380: error: ‘PNG_FILLER’ undeclared (first use in this function) opngreduc.c:381: error: ‘PNG_FLAG_FILLER_AFTER’ undeclared (first use in this function) opngreduc.c: In function ‘opng_reduce_bits’: opngreduc.c:525: error: ‘PNG_FILLER’ undeclared (first use in this function) opngreduc.c:567: error: ‘PNG_FLAG_FILLER_AFTER’ undeclared (first use in this function) x86_64-pc-linux-gnu-gcc -c -W -Wall -march=core2 -msse4.1 -O2 -pipe -Wall pngxwrite.c
now :) + 18 Mar 2010; Samuli Suominen <ssuominen@gentoo.org> optipng-0.6.4.ebuild: + Private libpng prototypes and macro definitions were moved from png.h and + pngconf.h into a new pngpriv.h header file that is not visible to + applications, as such, copy pngpriv.h from lib/libpng/ to src/ before + deleting the directory wrt #308673.