Ticket #803 (closed defect: fixed)

Opened 7 months ago

Last modified 7 months ago

error: ‘png_check_sig’ was not declared in this scope

Reported by: qubodup Owned by: res
Priority: blocker Milestone:
Component: build system Version: V1.4
Keywords: Cc:

Description

I'm getting this output when trying to compile with libpng1.4.

C++ ./out/linux/optimize/plugins/video/loader/png/pngimage.o 
/home/qubodup/src/aur/crystalspace-svn/src/crystalspace-build/plugins/video/loader/png/pngimage.cpp: In function ‘void CS::Plugin::PNGImageIO::png_write(png_struct*, png_byte*, png_size_t)’:
/home/qubodup/src/aur/crystalspace-svn/src/crystalspace-build/plugins/video/loader/png/pngimage.cpp:63: warning: ‘png_struct_def::io_ptr’ is deprecated (declared at /usr/include/libpng14/png.h:1090)
/home/qubodup/src/aur/crystalspace-svn/src/crystalspace-build/plugins/video/loader/png/pngimage.cpp:63: warning: ‘png_struct_def::io_ptr’ is deprecated (declared at /usr/include/libpng14/png.h:1090)
/home/qubodup/src/aur/crystalspace-svn/src/crystalspace-build/plugins/video/loader/png/pngimage.cpp: In member function ‘virtual csPtr<iDataBuffer> CS::Plugin::PNGImageIO::csPNGImageIO::Save(iImage*, csImageIOFileFormatDescription*, const char*)’:
/home/qubodup/src/aur/crystalspace-svn/src/crystalspace-build/plugins/video/loader/png/pngimage.cpp:176: warning: ‘png_struct_def::jmpbuf’ is deprecated (declared at /usr/include/libpng14/png.h:1082)
/home/qubodup/src/aur/crystalspace-svn/src/crystalspace-build/plugins/video/loader/png/pngimage.cpp:176: warning: ‘png_struct_def::jmpbuf’ is deprecated (declared at /usr/include/libpng14/png.h:1082)
/home/qubodup/src/aur/crystalspace-svn/src/crystalspace-build/plugins/video/loader/png/pngimage.cpp: In static member function ‘static void CS::Plugin::PNGImageIO::ImagePngFile::PngLoader::ImagePngRead(png_struct*, png_byte*, png_size_t)’:
/home/qubodup/src/aur/crystalspace-svn/src/crystalspace-build/plugins/video/loader/png/pngimage.cpp:358: warning: ‘png_struct_def::io_ptr’ is deprecated (declared at /usr/include/libpng14/png.h:1090)
/home/qubodup/src/aur/crystalspace-svn/src/crystalspace-build/plugins/video/loader/png/pngimage.cpp:358: warning: ‘png_struct_def::io_ptr’ is deprecated (declared at /usr/include/libpng14/png.h:1090)
/home/qubodup/src/aur/crystalspace-svn/src/crystalspace-build/plugins/video/loader/png/pngimage.cpp: In member function ‘bool CS::Plugin::PNGImageIO::ImagePngFile::PngLoader::InitOk()’:
/home/qubodup/src/aur/crystalspace-svn/src/crystalspace-build/plugins/video/loader/png/pngimage.cpp:381: error: ‘png_check_sig’ was not declared in this scope
/home/qubodup/src/aur/crystalspace-svn/src/crystalspace-build/plugins/video/loader/png/pngimage.cpp:397: warning: ‘png_struct_def::jmpbuf’ is deprecated (declared at /usr/include/libpng14/png.h:1082)
/home/qubodup/src/aur/crystalspace-svn/src/crystalspace-build/plugins/video/loader/png/pngimage.cpp:397: warning: ‘png_struct_def::jmpbuf’ is deprecated (declared at /usr/include/libpng14/png.h:1082)
/home/qubodup/src/aur/crystalspace-svn/src/crystalspace-build/plugins/video/loader/png/pngimage.cpp: In member function ‘virtual bool CS::Plugin::PNGImageIO::ImagePngFile::PngLoader::LoadData()’:
/home/qubodup/src/aur/crystalspace-svn/src/crystalspace-build/plugins/video/loader/png/pngimage.cpp:527: warning: ‘png_struct_def::jmpbuf’ is deprecated (declared at /usr/include/libpng14/png.h:1082)
/home/qubodup/src/aur/crystalspace-svn/src/crystalspace-build/plugins/video/loader/png/pngimage.cpp:527: warning: ‘png_struct_def::jmpbuf’ is deprecated (declared at /usr/include/libpng14/png.h:1082)
/home/qubodup/src/aur/crystalspace-svn/src/crystalspace-build/plugins/video/loader/png/pngimage.cpp:563: warning: ‘png_struct_def::jmpbuf’ is deprecated (declared at /usr/include/libpng14/png.h:1082)
/home/qubodup/src/aur/crystalspace-svn/src/crystalspace-build/plugins/video/loader/png/pngimage.cpp:563: warning: ‘png_struct_def::jmpbuf’ is deprecated (declared at /usr/include/libpng14/png.h:1082)

    g++ -c -o ./out/linux/optimize/plugins/video/loader/png/pngimage.o -I/home/qubodup/src/aur/crystalspace-svn/src/crystalspace-build/. -I./include -I/home/qubodup/src/aur/crystalspace-svn/src/crystalspace-build/./include -march=x86-64 -mtune=generic -O2 -pipe -pipe -march=x86-64 -mtune=generic -O2 -pipe -Wall -Wno-unknown-pragmas -fvisibility=hidden -mtune=generic -mfpmath=sse -I/usr/local/include -DNVALGRIND -march=x86-64 -mtune=generic -O2 -pipe -march=x86-64 -mtune=generic -O2 -pipe -fno-exceptions -fvisibility-inlines-hidden -DNVALGRIND -O3 -fomit-frame-pointer -ffast-math -g2 -fPIC -I/usr/include/libpng14  /home/qubodup/src/aur/crystalspace-svn/src/crystalspace-build/plugins/video/loader/png/pngimage.cpp

...failed C++ ./out/linux/optimize/plugins/video/loader/png/pngimage.o ...
...skipped cspngimg.so for lack of <plugins!video!loader!png!>pngimage.o...
...failed updating 1 target(s)...
...skipped 1 target(s)...

I was able to fix this (in svn version) by replacing png_check_sig in plugins/video/loader/png/pngimage.cpp

See  http://www.libpng.org/pub/png/src/libpng-1.2.x-to-1.4.x-summary.txt for libpng1.4 changes

Attachments

Change History

Changed 7 months ago by sunshine

  • owner changed from admin to res
  • status changed from new to assigned

Changed 7 months ago by sunshine

  • status changed from assigned to closed
  • resolution set to fixed

Fixed by r33655.
Merged into 1.4 with r33658.

Add/Change #803 (error: ‘png_check_sig’ was not declared in this scope)

Author


E-mail address and user name can be saved in the Preferences.


Action
as closed
 
Note: See TracTickets for help on using tickets.