[gdal-dev] build error - conflicting cpl_serv.h

David Burken dburken at comcast.net
Wed Oct 10 18:44:13 PDT 2012


Hi Everyone,

Just fyi, I can't build gdal with an external libgeotif without doing a 
hack...  Both gdal and libgeotiff from svn trunk.  libtiff, geotiff were 
installed in a fresh sandbox.  Then configured gdal to use external 
libtiff/geotiff.

I got gdal to build by removing the libgeotiff installed cpl_serv.h and 
copying gdal/frmts/gtiff/libgeotiff/cpl_serv.h  to gdal/port/cpl_serv.h 
(in build include path).  That's a hack I know but fixed.  This was 
broken before and fixed.  Seems like it's back again.

Not an issue for me but I thought I'd report it...  Error from build below.

Take care,
Dave


make[2]: Entering directory `/home/work/test/gdal/frmts/gtiff'
/bin/sh /work/test/gdal/libtool --mode=compile --tag=CXX g++ -g -O2 
-Wall  -I..  -I../jpeg -DHAVE_LIBJPEG -I/work/test/gdal/port 
-I/work/test/gdal/gcore -I/work/test/gdal/alg -I/work/test/gdal/ogr 
-I/work/test/gdal/ogr/ogrsf_frmts  -DBIGTIFF_SUPPORT -DOGR_ENABLED 
-D_REENTRANT  -I/work/test/gdal/port -I/usr/local/ossim/include 
-I/usr/local/ossim/include  -c -o ../o/gt_wkt_srs.lo gt_wkt_srs.cpp
libtool: compile:  g++ -g -O2 -Wall -I.. -I../jpeg -DHAVE_LIBJPEG 
-I/work/test/gdal/port -I/work/test/gdal/gcore -I/work/test/gdal/alg 
-I/work/test/gdal/ogr -I/work/test/gdal/ogr/ogrsf_frmts 
-DBIGTIFF_SUPPORT -DOGR_ENABLED -D_REENTRANT -I/work/test/gdal/port 
-I/usr/local/ossim/include -I/usr/local/ossim/include -c gt_wkt_srs.cpp  
-fPIC -DPIC -o ../o/.libs/gt_wkt_srs.o
In file included from /work/test/gdal/port/cpl_port.h:84,
                  from /work/test/gdal/ogr/ogr_core.h:33,
                  from /work/test/gdal/ogr/ogr_srs_api.h:34,
                  from /work/test/gdal/ogr/ogr_spatialref.h:34,
                  from gt_wkt_srs.cpp:38:
/work/test/gdal/port/cpl_config.h:106:1: warning: "HAVE_STDLIB_H" redefined
In file included from /usr/local/ossim/include/cpl_serv.h:36,
                  from gt_wkt_srs.cpp:33:
/usr/local/ossim/include/geo_config.h:5:1: warning: this is the location 
of the previous definition
In file included from /work/test/gdal/port/cpl_port.h:84,
                  from /work/test/gdal/ogr/ogr_core.h:33,
                  from /work/test/gdal/ogr/ogr_srs_api.h:34,
                  from /work/test/gdal/ogr/ogr_spatialref.h:34,
                  from gt_wkt_srs.cpp:38:
/work/test/gdal/port/cpl_config.h:112:1: warning: "HAVE_STRING_H" redefined
In file included from /usr/local/ossim/include/cpl_serv.h:36,
                  from gt_wkt_srs.cpp:33:
/usr/local/ossim/include/geo_config.h:11:1: warning: this is the 
location of the previous definition
gt_wkt_srs.cpp: In function 'CPLErr GTIFWktFromMemBuf(int, unsigned 
char*, char**, double*, int*, GDAL_GCP**)':
gt_wkt_srs.cpp:2331: error: 'CPLString' was not declared in this scope
gt_wkt_srs.cpp:2331: error: expected ';' before 'osFilename'
gt_wkt_srs.cpp:2333: error: 'osFilename' was not declared in this scope
make[2]: *** [../o/gt_wkt_srs.lo] Error 1
make[2]: Leaving directory `/home/work/test/gdal/frmts/gtiff'
make[1]: *** [gtiff-install-obj] Error 2
make[1]: Leaving directory `/home/work/test/gdal/frmts'
make: *** [frmts-target] Error 2



More information about the gdal-dev mailing list