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()); }
On 04/02/2012 07:23 PM, David C. Rankin wrote:
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()); }
There is a second patch that looks a bit more complete at: http://bugsfiles.kde.org/attachment.cgi?id=56390
Index: libs/dimg/loaders/pngloader.cpp =================================================================== --- libs/dimg/loaders/pngloader.cpp (revision 1216766) +++ libs/dimg/loaders/pngloader.cpp (working copy) @@ -73,6 +73,12 @@ namespace Digikam {
+#if PNG_LIBPNG_VER_MAJOR >= 1 && PNG_LIBPNG_VER_MINOR >= 5 +typedef png_bytep iCCP_data; +#else +typedef png_charp iCCP_data; +#endif + PNGLoader::PNGLoader(DImg* image) : DImgLoader(image) { @@ -574,7 +580,8 @@
if (m_loadFlags & LoadICCData) { - png_charp profile_name, profile_data=NULL; + png_charp profile_name; + iCCP_data profile_data=NULL; png_uint_32 profile_size; int compression_type;
@@ -854,7 +861,7 @@
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, (iCCP_data)profile_rawdata.data(), profile_rawdata.size()); }
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:
I am beginning to detest the libpng and jpeg people. I think they do this on purpose.
There was bug report 595 that addressed previous jpeg and libpng issues with digikam.
Darrell
On 04/02/2012 07:56 PM, Darrell Anderson wrote:
I am beginning to detest the libpng and jpeg people. I think they do this on purpose.
There was bug report 595 that addressed previous jpeg and libpng issues with digikam.
Darrell
Yes,
What I'm noticing is that on most major projects, the libpng 15 issues seems to have been addressed during Jan. and Feb. 2011. So at least that narrows down patch hunting a bit. I have noticed a trickle of other patches for older apps since that time as other distros move forward with libpng. I wish I could find a cached repository of the NetBSD kde3 code. That seems to be where all the relevant patches are coming from.