Opened 12 years ago

Closed 12 years ago

#4023 closed defect (duplicate)

Making of 1.8.0 Fails compiling pngdataset.cpp

Reported by: amongtheclouds Owned by: warmerdam
Priority: normal Milestone:
Component: default Version: unspecified
Severity: normal Keywords:
Cc:

Description

This isn't so much a ticket as a report...

I'm building MapServer on CentOS release 5.5 (Final) and including gdal.

Configure is ...

./configure -with-png=/home/src/libpng-1.5.1 --with-php=/opt/lampp_64/bin/php-config --with-perl --with-python --with-geos=/usr/local/bin/geos-config

Error Was (and I got the same error without -with-png.. above)

make[2]: Entering directory `/home/src/gdal-1.8.0/frmts/png' /bin/sh /home/src/gdal-1.8.0/libtool --mode=compile --tag=CXX g++ -g -O2 -Wall -I/home/src/gdal-1.8.0/port -I/home/src/gdal-1.8.0/gcore -I/home/src/gdal-1.8.0/alg -I/home/src/gdal-1.8.0/ogr -I/home/src/gdal-1.8.0/ogr/ogrsf_frmts -DOGR_ENABLED -I/home/src/gdal-1.8.0/port -c -o ../o/pngdataset.lo pngdataset.cpp libtool: compile: g++ -g -O2 -Wall -I/home/src/gdal-1.8.0/port -I/home/src/gdal-1.8.0/gcore -I/home/src/gdal-1.8.0/alg -I/home/src/gdal-1.8.0/ogr -I/home/src/gdal-1.8.0/ogr/ogrsf_frmts -DOGR_ENABLED -I/home/src/gdal-1.8.0/port -c pngdataset.cpp -fPIC -DPIC -o ../o/.libs/pngdataset.o pngdataset.cpp: In function ‘void png_vsi_read_data(png_struct*, png_byte*, png_size_t)’: pngdataset.cpp:1318: error: invalid use of undefined type ‘struct png_struct_def’ /usr/local/include/png.h:795: error: forward declaration of ‘struct png_struct_def’ pngdataset.cpp: In function ‘void png_vsi_write_data(png_struct*, png_byte*, png_size_t)’: pngdataset.cpp:1333: error: invalid use of undefined type ‘struct png_struct_def’ /usr/local/include/png.h:795: error: forward declaration of ‘struct png_struct_def’

My solution was in gdal-1.8.0/frmts/png/pgndataset.cpp replace #include "php.h" with #include "pngpriv.h"

Change History (1)

comment:1 by Even Rouault, 12 years ago

Resolution: duplicate
Status: newclosed

Duplicate of #3914

Note: See TracTickets for help on using tickets.