When trying to use devil, as in ogre for example, pngs files are not loaded, there's a decode exception. As stated in the FAQ of ogre, a simple fix to the configure.in can change this. Taken from the ogre faq : This is caused by an incompatibility between DevIL and libpng3. Alter the DevIL configure.in and change the line: AC_CHECK_LIB(png, png_start_read_image, LIBPNG="-lpng", LIBPNG="", ) to: AC_CHECK_LIB(png, png_start_read_image, LIBPNG="-lpng", LIBPNG="", -lm -lz) Reproducible: Always Steps to Reproduce: 1. emerge devil ogre 2. run an ogre sample program 3. Actual Results: The Ogre.log probably shows: Error #: 0 Function: invalid enumerant Description: IL Error. File: OgrePNGCodec.cpp Line: 80 Stack unwinding: PNGCodec::decode(..) <- Image::load(..) <- <<beginning of stack Expected Results: It should have loaded the png...
Created attachment 31982 [details, diff] patch replacement
what does `ldd /usr/lib/libpng.so` so ? this used to be a problem with older libpngs which didnt list libm and libz in the linker information but the newer libpngs pull in libm and libz automagically
Created attachment 32124 [details] config.log before the patch You can clearly see : configure:10989: checking for png_start_read_image in -lpng configure:11019: gcc -o conftest -g -O2 -I/usr/X11R6/include conftest.c -lpng >&5 configure:11025: $? = 0 There's no -lz -lm
Created attachment 32125 [details] config.log after the patch You can clearly see : configure:11178: checking for png_start_read_image in -lpng configure:11208: gcc -o conftest -g -O2 -I/usr/X11R6/include conftest.c -lpng -lm -lz >&5 configure:11214: $? = 0 Now there's the extra -lm -lz...
updated the patch to run `sdl-config --libs` instead of hardcoding -lz -lm also noticed a few other configure bugs and fixed them with the update thanks for the info ... update to 1.6.6-r2
i guess nobody ever bothered talking to the devil developers about fixing the configure.in logic ... i e-mailed them and they've fixed it in cvs ... should be in 1.6.7 :)