All,
I was working on the digikam pngloader issue and received new jpegloader errors in the latest GIT code. Specifically, I received the following jpegloader warning just prior to the pngloader crash:
libtool: compile: g++ -DHAVE_CONFIG_H -I. -I../../../.. -I/opt/trinity/include -I/opt/tqt3/include -I. -include tqt.h -I../../../../digikam/libs/dimg -I../../../../digikam/libs/dimg/filters -I../../../../digikam/libs/curves -I../../../../digikam/libs/levels -I../../../../digikam/libs/histogram -I../../../../digikam/libs/whitebalance -I../../../../digikam/libs/dmetadata -I../../../../digikam/digikam -I/opt/trinity/include -I/opt/trinity/include -DQT_THREAD_SUPPORT -D_REENTRANT -fno-tree-pre -Wno-long-long -Wundef -ansi -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -Wcast-align -Wchar-subscripts -Wall -W -Wpointer-arith -O2 -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector --param=ssp-buffer-size=4 -D_FORTIFY_SOURCE=2 -fpermissive -Wformat-security -Wmissing-format-attribute -Wno-non-virtual-dtor -fno-exceptions -fno-check-new -fno-common -I/usr/include/tqt -DQT_CLEAN_NAMESPACE -DQT_NO_ASCII_CAST -DQT_NO_STL -DQT_NO_COMPAT -DQT_NO_TRANSLATION -DQT_CLEAN_NAMESPACE -MT jpegloader.lo -MD -MP -MF .deps/jpegloader.Tpo -c jpegloader.cpp -fPIC -DPIC -o .libs/jpegloader.o jpegloader.cpp: In member function 'virtual bool Digikam::JPEGLoader::load(const TQString&, Digikam::DImgLoaderObserver*)': jpegloader.cpp:191:12: warning: enumeration value 'JCS_EXT_RGB' not handled in switch [-Wswitch] jpegloader.cpp:191:12: warning: enumeration value 'JCS_EXT_RGBX' not handled in switch [-Wswitch] jpegloader.cpp:191:12: warning: enumeration value 'JCS_EXT_BGR' not handled in switch [-Wswitch] jpegloader.cpp:191:12: warning: enumeration value 'JCS_EXT_BGRX' not handled in switch [-Wswitch] jpegloader.cpp:191:12: warning: enumeration value 'JCS_EXT_XBGR' not handled in switch [-Wswitch] jpegloader.cpp:191:12: warning: enumeration value 'JCS_EXT_XRGB' not handled in switch [-Wswitch] jpegloader.cpp:191:12: warning: enumeration value 'JCS_EXT_RGBA' not handled in switch [-Wswitch] jpegloader.cpp:191:12: warning: enumeration value 'JCS_EXT_BGRA' not handled in switch [-Wswitch] jpegloader.cpp:191:12: warning: enumeration value 'JCS_EXT_ABGR' not handled in switch [-Wswitch] jpegloader.cpp:191:12: warning: enumeration value 'JCS_EXT_ARGB' not handled in switch [-Wswitch] jpegloader.cpp:223:31: warning: variable 'count' set but not used [-Wunused-but-set-variable] jpegloader.cpp:223:38: warning: variable 'prevy' set but not used [-Wunused-but-set-variable] 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] make[5]: *** [pngloader.lo] Error 1
I have also uncovered a digikam patch, http://bugsfiles.kde.org/attachment.cgi?id=56384 , that I don't think is a direct patch for this problem, but hopefully it will help a bit. The patch is labeled:
[Digikam-devel] [Bug 264181] New: png-1.5 compatibility fix http://mail.kde.org/pipermail/digikam-devel/2011-January/048984.html
This patchfile is:
$NetBSD: patch-aa,v 1.11 2011/01/20 23:37:36 wiz Exp $
Fix build with png-1.5.
--- libs/dimg/loaders/pngloader.cpp.orig 2010-11-22 17:47:36.000000000 +0000 +++ libs/dimg/loaders/pngloader.cpp @@ -494,7 +494,8 @@ bool PNGLoader::load(const QString& file
if (m_loadFlags & LoadICCData) { - png_charp profile_name, profile_data=NULL; + png_charp profile_name; + png_bytep profile_data=NULL; png_uint_32 profile_size; int compression_type;
@@ -730,7 +731,7 @@ bool PNGLoader::save(const QString& file
if (!profile_rawdata.isEmpty()) { - png_set_iCCP(png_ptr, info_ptr, (png_charp)("icc"), PNG_COMPRESSION_TYPE_BASE, profile_rawdata.data(), profile_rawdata.size()); + png_set_iCCP(png_ptr, info_ptr, (png_charp)("icc"), PNG_COMPRESSION_TYPE_BASE, (png_bytep)profile_rawdata.data(), profile_rawdata.size()); }