On 03/28/2012 07:18 AM, David C. Rankin wrote:
Ilya, All,
Does anyone have a working libpng15 patch for digikam and gwenview? If so where?
Let me ask it this way. I get an error building digikam on libpng15 in trinity like this: pngloader.cpp: In member function 'virtual bool Digikam::PNGLoader::load(const TQString&, Digikam::DImgLoaderObserver*)': pngloader.cpp:123:9: error: invalid use of incomplete type 'png_struct {aka struct png_struct_def}' /usr/include/png.h:855:16: error: forward declaration of 'png_struct {aka struct png_struct_def}' pngloader.cpp:410:99: warning: invalid conversion from 'char**' to 'png_bytepp {aka unsigned char**}' [-fpermissive] pngloader.cpp: In member function 'virtual bool Digikam::PNGLoader::save(const TQString&, Digikam::DImgLoaderObserver*)': pngloader.cpp:529:9: error: invalid use of incomplete type 'png_struct {aka struct png_struct_def}' /usr/include/png.h:855:16: error: forward declaration of 'png_struct {aka struct png_struct_def}' pngloader.cpp:602:132: warning: invalid conversion from 'char*' to 'png_const_bytep {aka const unsigned char*}' [-fpermissive] pngloader.cpp:662:39: warning: deprecated conversion from string constant to 'png_charp {aka char*}' [-Wwrite-strings] pngloader.cpp: In member function 'long int Digikam::PNGLoader::formatStringList(char*, size_t, const char*, __va_list_tag*)': pngloader.cpp:970:55: warning: function might be possible candidate for 'gnu_printf' format attribute [-Wmissing-format-attribute] pngloader.cpp: In member function 'virtual bool Digikam::PNGLoader::load(const TQString&, Digikam::DImgLoaderObserver*)': pngloader.cpp:90:41: warning: ignoring return value of 'size_t fread(void*, size_t, size_t, FILE*)', declared with attribute warn_unused_result [-Wunused-result] It seems that this is a libpng15 change that is impacting digikam as well as gwenview. I have found a clue that: 'libpng-1.5 removed direct access to png_struct and png_info' which seems to fit with the error. I have downloaded the libpng code and I'm trying to make sense of what I need to patch in digikam to work with libpng15. This is where I need help. Any of our kde3 devs encountered something like this before? Where should I start looking in the code and what am I looking to patch? I get the problem starts with pngloader.cpp:123:9 in digikam, but what should I look for in libpng that will tell me how the png_struct changed? Any help appreciated. Thanks. -- David C. Rankin, J.D.,P.E. -- To unsubscribe, e-mail: opensuse-kde3+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-kde3+owner@opensuse.org