Version: CVS (using KDE Devel) Installed from: Compiled sources Compiler: gcc 3.3.1 compiled from sources OS: Linux Hiya, Latest digiKam from svn didn't build on my system, with libpng 1.2.5. Since recently digiKam uses png_set_add_alpha(), which was introduced in libpng 1.2.7 (cursory glance at the png changelog). The attached patch fixes it in a straight forward way by telling the compiler to use a newer libpng.
Created attachment 13666 [details] Require a png version that has png_set_add_alpha
SVN commit 483962 by cgilles: patch from alfons hoogervorst: digikam 0.9.0 requires at least libpng >= 1.2.7 CCBUG: 117225 M +10 -0 configure.in.bot M +15 -0 configure.in.in --- trunk/extragear/graphics/digikam/configure.in.bot #483961:483962 @@ -72,6 +72,16 @@ echo "-- libtiff found.................. YES" fi +if test "x$have_png" != "xyes"; then + echo "-- libpng found................... NO" + echo "" + echo "digiKam needs libpng. You need to install the correct version (>= 1.2.7)." + echo "" + all_tests=bad +else + echo "-- libpng found................... YES" +fi + if test "x$have_lcms" != "xyes"; then echo "-- lcms found..................... NO" echo "" --- trunk/extragear/graphics/digikam/configure.in.in #483961:483962 @@ -251,6 +251,21 @@ fi #------------------------------------------------------------------ +# Check for libpng with png_set_add_alpha() function +#------------------------------------------------------------------ + +have_png=no +KDE_CHECK_LIB(png, png_set_add_alpha, + have_png=yes, + AC_MSG_WARN([digiKam requires libpng >= 1.2.7]), + -lpng -lz -lm) + +if test "x$have_png" != "xyes"; then + AC_WARN([digiKam requires libpng >= 1.2.7; digiKam will not be compiled.]) + DO_NOT_COMPILE="digikam digikamimageplugins $DO_NOT_COMPILE" +fi + +#------------------------------------------------------------------ # Check for lcms (backported from krita) #------------------------------------------------------------------
Thanks for this patch Alfons. Gilles
Would it be possible to make the alpha support, ie, the calls to png_set_add_alpha() that require libpng >= 1.2.7, optional? Else, you'll be locking out a lot of users (of older distributions).
perhaps if i have more time because i'm very busy with digiKam core actually. If anyone can provide a patch... Gilles Caulier
Wouldn't it be as easy as replacing every png_set_add_alpha() with something like: #if (PNG_LIBPNG_VER_MAJOR >= 1 ) && (PNG_LIBPNG_VER_MINOR >= 2) && (PNG_LIBPNG_VER_RELEASE >= 7) png_set_add_alpha() #endif #define PNG_LIBPNG_VER_MAJOR 1 #define PNG_LIBPNG_VER_MINOR 2 #define PNG_LIBPNG_VER_RELEASE 8
Well, it's easy to make patch (:=))) I'm busy on other digiKam part... Gilles