Galapix / galapix

Galapix moved to https://gitlab.com/galapix/galapix
GNU General Public License v3.0
31 stars 4 forks source link

compilation error with libpng-1.5 #5

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. In libpng-1.5, they removed direct access to png_struct and png_info, thus 
the build fails.

What is the expected output? What do you see instead?
$ scons GALAPIX_GTK=no
scons: Reading SConscript files ...
Build type: release
Using C++ compiler... g++
Checking for C++ library spnav... (cached) no
Checking for C++ library boost_thread... (cached) yes
Checking for C++ library boost_signals... (cached) yes
Checking for C++ library exif... (cached) yes
Checking for C++ library sqlite3... (cached) yes
Checking for C library jpeg... (cached) yes
Checking for C++ library GL... (cached) yes
Checking for C++ library GLEW... (cached) yes
scons: done reading SConscript files.
scons: Building targets ...
scons: building associated VariantDir targets: build
g++ -o build/src/plugins/png.o -c -O3 -s -isystem/usr/include/libpng15 
-isystem/usr/include/SDL -isystem/usr/include/ImageMagick -D_GNU_SOURCE=1 
-D_REENTRANT -Ibuild/src -Isrc src/plugins/png.cpp
src/plugins/png.cpp: In function 'void readPNGMemory(png_structp, png_bytep, 
png_size_t)':
src/plugins/png.cpp:35:59: error: invalid use of incomplete type 'png_struct 
{aka struct png_struct_def}'
/usr/include/libpng15/png.h:833:16: error: forward declaration of 'png_struct 
{aka struct png_struct_def}'
src/plugins/png.cpp: In static member function 'static bool 
PNG::get_size(void*, int, Size&)':
src/plugins/png.cpp:55:23: error: invalid use of incomplete type 'png_struct 
{aka struct png_struct_def}'
/usr/include/libpng15/png.h:833:16: error: forward declaration of 'png_struct 
{aka struct png_struct_def}'
src/plugins/png.cpp: In static member function 'static bool PNG::get_size(const 
string&, Size&)':
src/plugins/png.cpp:96:25: error: invalid use of incomplete type 'png_struct 
{aka struct png_struct_def}'
/usr/include/libpng15/png.h:833:16: error: forward declaration of 'png_struct 
{aka struct png_struct_def}'
src/plugins/png.cpp: In static member function 'static SoftwareSurfacePtr 
PNG::load_from_file(const string&)':
src/plugins/png.cpp:133:25: error: invalid use of incomplete type 'png_struct 
{aka struct png_struct_def}'
/usr/include/libpng15/png.h:833:16: error: forward declaration of 'png_struct 
{aka struct png_struct_def}'
src/plugins/png.cpp: In static member function 'static SoftwareSurfacePtr 
PNG::load_from_mem(const uint8_t*, int)':
src/plugins/png.cpp:207:23: error: invalid use of incomplete type 'png_struct 
{aka struct png_struct_def}'
/usr/include/libpng15/png.h:833:16: error: forward declaration of 'png_struct 
{aka struct png_struct_def}'
src/plugins/png.cpp: In static member function 'static void PNG::save(const 
SoftwareSurfacePtr&, const string&)':
src/plugins/png.cpp:281:25: error: invalid use of incomplete type 'png_struct 
{aka struct png_struct_def}'
/usr/include/libpng15/png.h:833:16: error: forward declaration of 'png_struct 
{aka struct png_struct_def}'
src/plugins/png.cpp: In function 'void writePNGMemory(png_structp, png_bytep, 
png_size_t)':
src/plugins/png.cpp:323:61: error: invalid use of incomplete type 'png_struct 
{aka struct png_struct_def}'
/usr/include/libpng15/png.h:833:16: error: forward declaration of 'png_struct 
{aka struct png_struct_def}'
src/plugins/png.cpp: In static member function 'static BlobPtr PNG::save(const 
SoftwareSurfacePtr&)':
src/plugins/png.cpp:335:23: error: invalid use of incomplete type 'png_struct 
{aka struct png_struct_def}'
/usr/include/libpng15/png.h:833:16: error: forward declaration of 'png_struct 
{aka struct png_struct_def}'
scons: *** [build/src/plugins/png.o] Error 1
scons: building terminated because of errors.

What version of the product are you using? On what operating system?
git 1ac0851
gentoo linux x86_64, gcc 4.6.2, boost 1.47.0, libpng 1.5.6

Please provide any additional information below.

Original issue reported on code.google.com by DirtY.iC...@gmail.com on 16 Nov 2011 at 11:18

GoogleCodeExporter commented 9 years ago
I think this is already fixed in the latest development version from git.

Original comment by grum...@gmail.com on 22 Nov 2011 at 11:28