#5727 closed defect (invalid)
gdal-1.11.svn compilation error in gdalserver.c
Reported by: | Markus Neteler | Owned by: | Kurt Schwehr |
---|---|---|---|
Priority: | normal | Milestone: | 2.0.0 |
Component: | ConfigBuild | Version: | unspecified |
Severity: | major | Keywords: | gdalserver |
Cc: | Kurt Schwehr |
Description
At time it is not possible to compile gdal-1.11.svn on a Linux cluster (Scientific Linux 6) due to the following error:
... make[1]: Entering directory `/panfs/panfem/fem1/keu_neteler/software/gdal-1.11.svn/apps' rm -f gdal-config-inst rm -f gdal-config echo '#!/bin/sh' > gdal-config-inst echo '#!/bin/sh' > gdal-config echo 'CONFIG_LIBS="-L/fem0/keu_neteler/binaries/lib -lgdal"' >> gdal-config-inst echo 'CONFIG_LIBS="/fem0/keu_neteler/software/gdal-1.11.svn/libgdal.la"' >> gdal-config echo 'CONFIG_DEP_LIBS=" -L/fem0/keu_neteler/binaries/lib -lgeos_c -lsqlite3 -lexpat -L/usr/lib64/hdf -lmfhdf -ldf -ljpeg -lpng -lpthread -lm -lrt -ldl "' >> gdal-config-inst echo 'CONFIG_DEP_LIBS=" -L/fem0/keu_neteler/binaries/lib -lgeos_c -lsqlite3 -lexpat -L/usr/lib64/hdf -lmfhdf -ldf -ljpeg -lpng -lpthread -lm -lrt -ldl "' >> gdal-config echo 'CONFIG_PREFIX="/fem0/keu_neteler/binaries"' >> gdal-config-inst echo 'CONFIG_PREFIX="/fem0/keu_neteler/software/gdal-1.11.svn"' >> gdal-config echo 'CONFIG_CFLAGS="-I/fem0/keu_neteler/binaries/include"' >> gdal-config-inst echo 'CONFIG_CFLAGS="-I/fem0/keu_neteler/software/gdal-1.11.svn/port -I/fem0/keu_neteler/software/gdal-1.11.svn/gcore -I/fem0/keu_neteler/software/gdal-1.11.svn/alg -I/fem0/keu_neteler/software/gdal-1.11.svn/ogr -I/fem0/keu_neteler/software/gdal-1.11.svn/ogr/ogrsf_frmts -I/fem0/keu_neteler/software/gdal-1.11.svn/frmts/vrt"' >> gdal-config echo 'CONFIG_DATA="/fem0/keu_neteler/binaries/share/gdal"' >> gdal-config-inst echo 'CONFIG_DATA="/fem0/keu_neteler/software/gdal-1.11.svn/data"' >> gdal-config echo 'CONFIG_VERSION="'`cat ../VERSION`'"' >> gdal-config-inst echo 'CONFIG_VERSION="'`cat ../VERSION`'"' >> gdal-config echo 'CONFIG_OGR_ENABLED=yes' >> gdal-config-inst echo 'CONFIG_OGR_ENABLED=yes' >> gdal-config echo 'CONFIG_FORMATS="gxf gtiff hfa aigrid aaigrid ceos ceos2 iso8211 xpm sdts raw dted mem jdem envisat elas fit vrt usgsdem l1b nitf bmp pcidsk airsar rs2 ilwis rmf leveller sgi srtmhgt idrisi gsg ingr ers jaxapalsar dimap gff cosar pds adrg coasp tsx terragen blx msgn til r northwood saga xyz hf2 kmlsuperoverlay ctg e00grid zmap ngsgeoid iris map grib bsb hdf4 gif jpeg png pcraster zlib rik ozi pdf rasterlite mbtiles arg"' >> gdal-config-inst echo 'CONFIG_FORMATS="gxf gtiff hfa aigrid aaigrid ceos ceos2 iso8211 xpm sdts raw dted mem jdem envisat elas fit vrt usgsdem l1b nitf bmp pcidsk airsar rs2 ilwis rmf leveller sgi srtmhgt idrisi gsg ingr ers jaxapalsar dimap gff cosar pds adrg coasp tsx terragen blx msgn til r northwood saga xyz hf2 kmlsuperoverlay ctg e00grid zmap ngsgeoid iris map grib bsb hdf4 gif jpeg png pcraster zlib rik ozi pdf rasterlite mbtiles arg"' >> gdal-config cat gdal-config.in >> gdal-config-inst cat gdal-config.in >> gdal-config chmod a+x gdal-config-inst chmod a+x gdal-config /bin/sh /fem0/keu_neteler/software/gdal-1.11.svn/libtool --mode=compile --tag=CC gcc -g -O2 -DHAVE_SSE_AT_COMPILE_TIME -Wall -Wdeclaration-after-statement -DHAVE_GEOS=1 -I/fem0/keu_neteler/binaries/include -I/fem0/keu_neteler/software/gdal-1.11.svn/port -I/fem0/keu_neteler/software/gdal-1.11.svn/gcore -I/fem0/keu_neteler/software/gdal-1.11.svn/alg -I/fem0/keu_neteler/software/gdal-1.11.svn/ogr -I/fem0/keu_neteler/software/gdal-1.11.svn/ogr/ogrsf_frmts -I/fem0/keu_neteler/software/gdal-1.11.svn/frmts -DOGR_ENABLED -I/fem0/keu_neteler/software/gdal-1.11.svn/port -c -o gdalinfo.lo gdalinfo.c /bin/sh /fem0/keu_neteler/software/gdal-1.11.svn/libtool --mode=compile --tag=CXX g++ -g -O2 -DHAVE_SSE_AT_COMPILE_TIME -Wall -DHAVE_GEOS=1 -I/fem0/keu_neteler/binaries/include -I/fem0/keu_neteler/software/gdal-1.11.svn/port -I/fem0/keu_neteler/software/gdal-1.11.svn/gcore -I/fem0/keu_neteler/software/gdal-1.11.svn/alg -I/fem0/keu_neteler/software/gdal-1.11.svn/ogr -I/fem0/keu_neteler/software/gdal-1.11.svn/ogr/ogrsf_frmts -I/fem0/keu_neteler/software/gdal-1.11.svn/frmts -DOGR_ENABLED -I/fem0/keu_neteler/software/gdal-1.11.svn/port -c -o commonutils.lo commonutils.cpp libtool: compile: gcc -g -O2 -DHAVE_SSE_AT_COMPILE_TIME -Wall -Wdeclaration-after-statement -DHAVE_GEOS=1 -I/fem0/keu_neteler/binaries/include -I/fem0/keu_neteler/software/gdal-1.11.svn/port -I/fem0/keu_neteler/software/gdal-1.11.svn/gcore -I/fem0/keu_neteler/software/gdal-1.11.svn/alg -I/fem0/keu_neteler/software/gdal-1.11.svn/ogr -I/fem0/keu_neteler/software/gdal-1.11.svn/ogr/ogrsf_frmts -I/fem0/keu_neteler/software/gdal-1.11.svn/frmts -DOGR_ENABLED -I/fem0/keu_neteler/software/gdal-1.11.svn/port -c gdalinfo.c -fPIC -DPIC -o .libs/gdalinfo.o libtool: compile: g++ -g -O2 -DHAVE_SSE_AT_COMPILE_TIME -Wall -DHAVE_GEOS=1 -I/fem0/keu_neteler/binaries/include -I/fem0/keu_neteler/software/gdal-1.11.svn/port -I/fem0/keu_neteler/software/gdal-1.11.svn/gcore -I/fem0/keu_neteler/software/gdal-1.11.svn/alg -I/fem0/keu_neteler/software/gdal-1.11.svn/ogr -I/fem0/keu_neteler/software/gdal-1.11.svn/ogr/ogrsf_frmts -I/fem0/keu_neteler/software/gdal-1.11.svn/frmts -DOGR_ENABLED -I/fem0/keu_neteler/software/gdal-1.11.svn/port -c commonutils.cpp -fPIC -DPIC -o .libs/commonutils.o libtool: compile: g++ -g -O2 -DHAVE_SSE_AT_COMPILE_TIME -Wall -DHAVE_GEOS=1 -I/fem0/keu_neteler/binaries/include -I/fem0/keu_neteler/software/gdal-1.11.svn/port -I/fem0/keu_neteler/software/gdal-1.11.svn/gcore -I/fem0/keu_neteler/software/gdal-1.11.svn/alg -I/fem0/keu_neteler/software/gdal-1.11.svn/ogr -I/fem0/keu_neteler/software/gdal-1.11.svn/ogr/ogrsf_frmts -I/fem0/keu_neteler/software/gdal-1.11.svn/frmts -DOGR_ENABLED -I/fem0/keu_neteler/software/gdal-1.11.svn/port -c commonutils.cpp -o commonutils.o >/dev/null 2>&1 libtool: compile: gcc -g -O2 -DHAVE_SSE_AT_COMPILE_TIME -Wall -Wdeclaration-after-statement -DHAVE_GEOS=1 -I/fem0/keu_neteler/binaries/include -I/fem0/keu_neteler/software/gdal-1.11.svn/port -I/fem0/keu_neteler/software/gdal-1.11.svn/gcore -I/fem0/keu_neteler/software/gdal-1.11.svn/alg -I/fem0/keu_neteler/software/gdal-1.11.svn/ogr -I/fem0/keu_neteler/software/gdal-1.11.svn/ogr/ogrsf_frmts -I/fem0/keu_neteler/software/gdal-1.11.svn/frmts -DOGR_ENABLED -I/fem0/keu_neteler/software/gdal-1.11.svn/port -c gdalinfo.c -o gdalinfo.o >/dev/null 2>&1 /bin/sh /fem0/keu_neteler/software/gdal-1.11.svn/libtool --mode=compile --tag=CC gcc -g -O2 -DHAVE_SSE_AT_COMPILE_TIME -Wall -Wdeclaration-after-statement -DHAVE_GEOS=1 -I/fem0/keu_neteler/binaries/include -I/fem0/keu_neteler/software/gdal-1.11.svn/port -I/fem0/keu_neteler/software/gdal-1.11.svn/gcore -I/fem0/keu_neteler/software/gdal-1.11.svn/alg -I/fem0/keu_neteler/software/gdal-1.11.svn/ogr -I/fem0/keu_neteler/software/gdal-1.11.svn/ogr/ogrsf_frmts -I/fem0/keu_neteler/software/gdal-1.11.svn/frmts -DOGR_ENABLED -I/fem0/keu_neteler/software/gdal-1.11.svn/port -c -o gdalserver.lo gdalserver.c libtool: compile: gcc -g -O2 -DHAVE_SSE_AT_COMPILE_TIME -Wall -Wdeclaration-after-statement -DHAVE_GEOS=1 -I/fem0/keu_neteler/binaries/include -I/fem0/keu_neteler/software/gdal-1.11.svn/port -I/fem0/keu_neteler/software/gdal-1.11.svn/gcore -I/fem0/keu_neteler/software/gdal-1.11.svn/alg -I/fem0/keu_neteler/software/gdal-1.11.svn/ogr -I/fem0/keu_neteler/software/gdal-1.11.svn/ogr/ogrsf_frmts -I/fem0/keu_neteler/software/gdal-1.11.svn/frmts -DOGR_ENABLED -I/fem0/keu_neteler/software/gdal-1.11.svn/port -c gdalserver.c -fPIC -DPIC -o .libs/gdalserver.o /bin/sh /fem0/keu_neteler/software/gdal-1.11.svn/libtool --mode=compile --tag=CXX g++ -g -O2 -DHAVE_SSE_AT_COMPILE_TIME -Wall -DHAVE_GEOS=1 -I/fem0/keu_neteler/binaries/include -I/fem0/keu_neteler/software/gdal-1.11.svn/port -I/fem0/keu_neteler/software/gdal-1.11.svn/gcore -I/fem0/keu_neteler/software/gdal-1.11.svn/alg -I/fem0/keu_neteler/software/gdal-1.11.svn/ogr -I/fem0/keu_neteler/software/gdal-1.11.svn/ogr/ogrsf_frmts -I/fem0/keu_neteler/software/gdal-1.11.svn/frmts -DOGR_ENABLED -I/fem0/keu_neteler/software/gdal-1.11.svn/port -c -o gdal_translate.lo gdal_translate.cpp libtool: compile: g++ -g -O2 -DHAVE_SSE_AT_COMPILE_TIME -Wall -DHAVE_GEOS=1 -I/fem0/keu_neteler/binaries/include -I/fem0/keu_neteler/software/gdal-1.11.svn/port -I/fem0/keu_neteler/software/gdal-1.11.svn/gcore -I/fem0/keu_neteler/software/gdal-1.11.svn/alg -I/fem0/keu_neteler/software/gdal-1.11.svn/ogr -I/fem0/keu_neteler/software/gdal-1.11.svn/ogr/ogrsf_frmts -I/fem0/keu_neteler/software/gdal-1.11.svn/frmts -DOGR_ENABLED -I/fem0/keu_neteler/software/gdal-1.11.svn/port -c gdal_translate.cpp -fPIC -DPIC -o .libs/gdal_translate.o gdalserver.c:394: error: expected ')' before 'const' gdalserver.c: In function 'main': gdalserver.c:591: warning: implicit declaration of function 'RunServer' make[1]: *** [gdalserver.lo] Error 1 make[1]: *** Waiting for unfinished jobs.... libtool: compile: g++ -g -O2 -DHAVE_SSE_AT_COMPILE_TIME -Wall -DHAVE_GEOS=1 -I/fem0/keu_neteler/binaries/include -I/fem0/keu_neteler/software/gdal-1.11.svn/port -I/fem0/keu_neteler/software/gdal-1.11.svn/gcore -I/fem0/keu_neteler/software/gdal-1.11.svn/alg -I/fem0/keu_neteler/software/gdal-1.11.svn/ogr -I/fem0/keu_neteler/software/gdal-1.11.svn/ogr/ogrsf_frmts -I/fem0/keu_neteler/software/gdal-1.11.svn/frmts -DOGR_ENABLED -I/fem0/keu_neteler/software/gdal-1.11.svn/port -c gdal_translate.cpp -o gdal_translate.o >/dev/null 2>&1 make[1]: Leaving directory `/panfs/panfem/fem1/keu_neteler/software/gdal-1.11.svn/apps' make: *** [apps-target] Error 2 [keu_neteler@korehpc001 gdal-1.11.svn]$
Using
- gcc version 4.4.6 20120305 (Red Hat 4.4.6-4) (GCC)
- Linux 2.6.32-279.22.1.el6.x86_64
Attachments (2)
Change History (14)
comment:1 by , 10 years ago
comment:2 by , 10 years ago
Removing CPL_UNUSED helps but it appears also in other files. My configuration is this:
PREFIX=$HOME/binaries mkdir -p $PREFIX ./configure \ --prefix=$PREFIX \ --with-libz=internal \ --with-geotiff=internal --with-libtiff=internal \ --with-pcidsk=no \ --with-hdf4
comment:4 by , 10 years ago
Owner: | changed from | to
---|---|
Status: | new → assigned |
A few questions:
can you attach your cpl_config.h file? and what does g++ --version print out?
Are you able to capture what the configure command is being run, svn co the latest version and try building it? And what is that configure command?
comment:5 by , 10 years ago
I was using r27923.
Attached the requested files. And here the output of g++:
g++ --version g++ (GCC) 4.4.6 20120305 (Red Hat 4.4.6-4) Copyright (C) 2010 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
The configure call is above in comment:2
comment:7 by , 10 years ago
Markus, isn't there a slight possiblilty that /fem0/keu_neteler/binaries/include that appears in the include arguments contain an older version of cpl_port.h without the CPL_UNUSED macro in it ? By the way, I'm not sure why this appears given the ./configure command line you mentionned.
comment:8 by , 10 years ago
Yes, deleting the GDAL related files in $HOME/binaries/include/ solved it. Strange that they are picked up by configure, though.
Now I got gdal-1.11.svn compiled.
follow-up: 10 comment:9 by , 10 years ago
Milestone: | 1.11.2 |
---|---|
Resolution: | → invalid |
Status: | assigned → closed |
Closing that ticket so. Although we might want to revisit the include order to have internal headers first, but having different versions of same filenames in the include paths is always a risky game...
comment:10 by , 10 years ago
Replying to rouault:
Closing that ticket so. Although we might want to revisit the include order to have internal headers first, but having different versions of same filenames in the include paths is always a risky game...
... that's why a version should pick its own headers first and not those from a search path. I used "plain" configure, so I don't know why it took the system include files first. CONFIG_CFLAGS I did not modify.
Markus, I've tried with CentOS 6, with the exact compiler version and I do not get any error. Which options on the configure line did you use ? I suspect the cause of the error is the CPL_UNUSED macro at line 394. Could you try removing it ? Although I don't understand why it would cause a failure for you.