Opened 9 years ago

Closed 9 years ago

Last modified 9 years ago

#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)

config.log.gz (14.8 KB ) - added by Markus Neteler 9 years ago.
config.log of compilation on cluster
cpl_config.h (6.2 KB ) - added by Markus Neteler 9 years ago.
cpl_config.h of compilation on cluster

Download all attachments as: .zip

Change History (14)

comment:1 by Even Rouault, 9 years ago

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.

comment:2 by Markus Neteler, 9 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:3 by Even Rouault, 9 years ago

Cc: Kurt Schwehr added

Kurt, CPL_UNUSED seems to cause an odd issue. Can you help ?

comment:4 by Kurt Schwehr, 9 years ago

Owner: changed from warmerdam to Kurt Schwehr
Status: newassigned

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?

by Markus Neteler, 9 years ago

Attachment: config.log.gz added

config.log of compilation on cluster

by Markus Neteler, 9 years ago

Attachment: cpl_config.h added

cpl_config.h of compilation on cluster

comment:5 by Markus Neteler, 9 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:6 by Markus Neteler, 9 years ago

Any hints how to (even manually) be able to compile the code? Thanks.

comment:7 by Even Rouault, 9 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 Markus Neteler, 9 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.

comment:9 by Even Rouault, 9 years ago

Milestone: 1.11.2
Resolution: invalid
Status: assignedclosed

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...

in reply to:  9 comment:10 by Markus Neteler, 9 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.

comment:11 by Even Rouault, 9 years ago

Milestone: 2.0

Should be addressed by r27976 / #5664 hopefully

comment:12 by Even Rouault, 9 years ago

Milestone: 2.02.0.0

Milestone renamed

Note: See TracTickets for help on using tickets.