[gdal-dev] build error

Vincent Schut schut at sarvision.nl
Tue Aug 18 03:00:46 PDT 2015


Hi,

this morning I wanted to refresh my gdal build, so I did an svn update (and later a fresh svn checkout to be sure), but I get an error when make wants to build gdalserver:

make[1]: Entering directory '/usr/local/src/gdal/apps'
/bin/sh /usr/local/src/gdal/libtool --mode=link	g++ -lsz -ljpeg gdalinfo.lo commonutils.lo  /usr/local/src/gdal/libgdal.la -o gdalinfo
libtool: link: g++ .libs/gdalinfo.o .libs/commonutils.o -o .libs/gdalinfo  /usr/local/src/gdal/.libs/libgdal.so -L/usr/lib -L/usr/local/lib /usr/lib/libsz.so -lm -ljson-c -lfreexl -lgeos_c -lsqlite3 /usr/local/lib/libkmldom.so /usr/local/lib/libkmlengine.so /usr/local/lib/libkmlbase.so /usr/local/lib/libminizip.so /usr/local/lib/libkmlconvenience.so -lminizip /usr/local/lib/liburiparser.so -lexpat -lxerces-c -lopenjp2 -ljasper -lnetcdf -lmfhdf -ldf -ljpeg -lpng -lcfitsio -lpq -lpthread -lrt -lpcre -lcurl -lxml2 -lz -ldl -lkea -lhdf5 -lhdf5_hl -lhdf5_cpp
/bin/sh /usr/local/src/gdal/libtool --mode=compile --tag=CC gcc -I/usr/local/src/gdal/port -I/usr/local/src/gdal/gcore -I/usr/local/src/gdal/alg -I/usr/local/src/gdal/ogr -I/usr/local/src/gdal/ogr/ogrsf_frmts -I/usr/local/src/gdal/gnm -g -O2 -fvisibility=hidden  -Wall -Wdeclaration-after-statement -Wunused-parameter  -I/usr/local/src/gdal/frmts/vrt -DOGR_ENABLED -I/usr/local/src/gdal/port -I/usr/local/include -I/usr/include  -DGDAL_COMPILATION -I/usr/include/json-c -I/usr/local/src/gdal/ogr/ogrsf_frmts/geojson -DHAVE_GEOS=1 -I/usr/include -c -o gdalserver.lo gdalserver.c
libtool: compile:  gcc -I/usr/local/src/gdal/port -I/usr/local/src/gdal/gcore -I/usr/local/src/gdal/alg -I/usr/local/src/gdal/ogr -I/usr/local/src/gdal/ogr/ogrsf_frmts -I/usr/local/src/gdal/gnm -g -O2 -fvisibility=hidden -Wall -Wdeclaration-after-statement -Wunused-parameter -I/usr/local/src/gdal/frmts/vrt -DOGR_ENABLED -I/usr/local/src/gdal/port -I/usr/local/include -I/usr/include -DGDAL_COMPILATION -I/usr/include/json-c -I/usr/local/src/gdal/ogr/ogrsf_frmts/geojson -DHAVE_GEOS=1 -I/usr/include -c gdalserver.c  -fPIC -DPIC -o .libs/gdalserver.o
gdalserver.c: In function ‘CreateSocketAndBindAndListen’:
gdalserver.c:137:21: error: storage size of ‘sHints’ isn’t known
      struct addrinfo sHints;
                      ^
gdalserver.c:139:31: error: invalid application of ‘sizeof’ to incomplete type ‘struct addrinfo’
      memset(&sHints, 0, sizeof(struct addrinfo));
                                ^
gdalserver.c:142:23: error: ‘AI_PASSIVE’ undeclared (first use in this function)
      sHints.ai_flags = AI_PASSIVE;
                        ^
gdalserver.c:142:23: note: each undeclared identifier is reported only once for each function it appears in
gdalserver.c:145:12: warning: implicit declaration of function ‘getaddrinfo’ [-Wimplicit-function-declaration]
      nRet = getaddrinfo(NULL, pszService, &sHints, &psResults);
             ^
gdalserver.c:148:48: warning: implicit declaration of function ‘gai_strerror’ [-Wimplicit-function-declaration]
          fprintf(stderr, "getaddrinfo(): %s\n", gai_strerror(nRet));
                                                 ^
gdalserver.c:148:25: warning: format ‘%s’ expects argument of type ‘char *’, but argument 3 has type ‘int’ [-Wformat=]
          fprintf(stderr, "getaddrinfo(): %s\n", gai_strerror(nRet));
                          ^
gdalserver.c:154:39: error: dereferencing pointer to incomplete type ‘struct addrinfo’
           psResultsIter = psResultsIter->ai_next)
                                        ^
gdalserver.c:175:5: warning: implicit declaration of function ‘freeaddrinfo’ [-Wimplicit-function-declaration]
      freeaddrinfo(psResults);
      ^
gdalserver.c:137:21: warning: unused variable ‘sHints’ [-Wunused-variable]
      struct addrinfo sHints;
                      ^
../GDALmake.opt:597: recipe for target 'gdalserver.lo' failed
make[1]: *** [gdalserver.lo] Error 1
make[1]: Leaving directory '/usr/local/src/gdal/apps'
GNUmakefile:78: recipe for target 'apps-target' failed
make: *** [apps-target] Error 2


info:
arch linux, up-to-date (updated today)
gcc 5.2.0
gdal svn trunk


Any ideas?

Thanks in advance,
Vincent.


More information about the gdal-dev mailing list