Png.h: present but cannot be compiled in 5.34/32

Hi everybody,

I’m building ROOT 5.34/32

  • on Linux Mint 17.2
  • with cmake --build
  • with GCC 4.8.4
    and I get the following error while “Generating libAfterImage/libAfterImage.a”:
checking png.h usability... no
checking png.h presence... yes
configure: WARNING: png.h: present but cannot be compiled
configure: WARNING: png.h:     check for missing prerequisite headers?
configure: WARNING: png.h: see the Autoconf documentation
configure: WARNING: png.h:     section "Present But Cannot Be Compiled"
configure: WARNING: png.h: proceeding with the preprocessor's result
configure: WARNING: png.h: in the future, the compiler will take precedence
configure: WARNING:     ## ------------------------------------ ##
configure: WARNING:     ## Report this to as-bugs@afterstep.org ##
configure: WARNING:     ## ------------------------------------ ##
checking for png.h... yes
checking zlib.h usability... yes
checking zlib.h presence... yes
checking for zlib.h... yes
checking for png_get_sRGB in png.h... yes
checking using built-in UNGIF library... yes
checking headers required by TTF support...  -I/usr/include/freetype2
checking ft2build.h usability... yes
checking ft2build.h presence... yes
checking for ft2build.h... yes
checking freetype/freetype.h ... no
checking freetype.h... yes
checking libAfterBase... disabled
checking for dirent.h that defines DIR... yes
checking for library containing opendir... none required
checking sys/dirent.h usability... no
checking sys/dirent.h presence... no
checking for sys/dirent.h... no
configure: creating ./config.status
config.status: creating Makefile
config.status: creating afterbase.h
config.status: creating afterimage-libs
config.status: creating afterimage-config
config.status: creating config.h
config.status: config.h is unchanged
make[2]: *** [graf2d/asimage/libAfterImage/libAfterImage.a] Error 2
make[1]: *** [graf2d/asimage/CMakeFiles/AFTERIMAGE.dir/all] Error 2
make: *** [all] Error 2

I didn’t quite understand how to apply the autoconf documentation, since after all I did not use autoconf. There are configure.ac files in root-bin/core/pcre/pcre-7.8/configure.ac and root-src/cint/reflex/build/configure.ac, but I don’t know whether they are relevant. Thanks for your help, hope I didn’t forget to supply too much vital information.

In propel if you sue the build in libAfterimage, the png.h file is there:

$ROOTSYS/graf2d/asimage/src/libAfterImage/libpng/png.h

it should be no problem compiling it . May be you have an other png.h elsewhere ?