On 03/27/2012 09:08 AM, David C. Rankin wrote:
Tim, Darrell,
Ran into an error building digikam. Is this due to libpng or digikam? How to fix?:
<snip>
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]
<snip>
Both digikam and gwenview are failing with the same error. I attempted gwenview and it has the same error: invalid use of incomplete type 'png_info {aka struct png_info_def}' problem:
/bin/sh ../../libtool --tag=CXX --mode=compile g++ -DHAVE_CONFIG_H -I. -I../.. -I./.. -I/opt/trinity/include -I/opt/tqt3/include -I. -include tqt.h -D_LARGEFILE64_SOURCE -DQT_THREAD_SUPPORT -D_REENTRANT -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 -Wformat-security -Wmissing-format-attribute -Wno-non-virtual-dtor -fno-exceptions -fno-check-new -fno-common -I/usr/include/tqt -MT pngformattype.lo -MD -MP -MF .deps/pngformattype.Tpo -c -o pngformattype.lo pngformattype.cpp libtool: compile: g++ -DHAVE_CONFIG_H -I. -I../.. -I./.. -I/opt/trinity/include -I/opt/tqt3/include -I. -include tqt.h -D_LARGEFILE64_SOURCE -DQT_THREAD_SUPPORT -D_REENTRANT -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 -Wformat-security -Wmissing-format-attribute -Wno-non-virtual-dtor -fno-exceptions -fno-check-new -fno-common -I/usr/include/tqt -MT pngformattype.lo -MD -MP -MF .deps/pngformattype.Tpo -c pngformattype.cpp -fPIC -DPIC -o .libs/pngformattype.o pngformattype.cpp: In function 'void Gwenview::setup_qt(TQImage&, png_structp, png_infop)': pngformattype.cpp:214:33: error: invalid use of incomplete type 'png_info {aka struct png_info_def}' /usr/include/png.h:724:16: error: forward declaration of 'png_info {aka struct png_info_def}' pngformattype.cpp:249:25: error: invalid use of incomplete type 'png_info {aka struct png_info_def}' /usr/include/png.h:724:16: error: forward declaration of 'png_info {aka struct png_info_def}' pngformattype.cpp:261:17: error: invalid use of incomplete type 'png_info {aka struct png_info_def}' /usr/include/png.h:724:16: error: forward declaration of 'png_info {aka struct png_info_def}' pngformattype.cpp:269:54: error: invalid use of incomplete type 'png_info {aka struct png_info_def}' /usr/include/png.h:724:16: error: forward declaration of 'png_info {aka struct png_info_def}' pngformattype.cpp:275:26: error: invalid use of incomplete type 'png_info {aka struct png_info_def}' /usr/include/png.h:724:16: error: forward declaration of 'png_info {aka struct png_info_def}' pngformattype.cpp:277:15: error: invalid use of incomplete type 'png_info {aka struct png_info_def}' /usr/include/png.h:724:16: error: forward declaration of 'png_info {aka struct png_info_def}' pngformattype.cpp:278:15: error: invalid use of incomplete type 'png_info {aka struct png_info_def}' /usr/include/png.h:724:16: error: forward declaration of 'png_info {aka struct png_info_def}' pngformattype.cpp:279:15: error: invalid use of incomplete type 'png_info {aka struct png_info_def}' /usr/include/png.h:724:16: error: forward declaration of 'png_info {aka struct png_info_def}' pngformattype.cpp:281:15: error: invalid use of incomplete type 'png_info {aka struct png_info_def}' /usr/include/png.h:724:16: error: forward declaration of 'png_info {aka struct png_info_def}' pngformattype.cpp:290:22: error: invalid use of incomplete type 'png_info {aka struct png_info_def}' /usr/include/png.h:724:16: error: forward declaration of 'png_info {aka struct png_info_def}' pngformattype.cpp:292:11: error: invalid use of incomplete type 'png_info {aka struct png_info_def}' /usr/include/png.h:724:16: error: forward declaration of 'png_info {aka struct png_info_def}' pngformattype.cpp:293:11: error: invalid use of incomplete type 'png_info {aka struct png_info_def}' /usr/include/png.h:724:16: error: forward declaration of 'png_info {aka struct png_info_def}' pngformattype.cpp:294:11: error: invalid use of incomplete type 'png_info {aka struct png_info_def}' /usr/include/png.h:724:16: error: forward declaration of 'png_info {aka struct png_info_def}' pngformattype.cpp: In member function 'virtual int Gwenview::PNGFormat::decode(TQImage&, TQImageConsumer*, const uchar*, int)': pngformattype.cpp:392:6: 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}' pngformattype.cpp:420: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}' pngformattype.cpp: In member function 'void Gwenview::PNGFormat::end(png_structp, png_infop)': pngformattype.cpp:487:27: 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}' make[3]: *** [pngformattype.lo] Error 1 make[3]: Leaving directory `/build/src/gwenview/src/gvcore' make[2]: *** [all-recursive] Error 1 make[2]: Leaving directory `/build/src/gwenview/src' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/build/src/gwenview' make: *** [all] Error 2