Estoy intentando instalar GDAL 2.0 en Ubuntu 16.04.
Aquí está la secuencia de comandos que estoy probando:
sudo apt-get build-dep gdal
cd /tmp
wget http://download.osgeo.org/gdal/2.0.0/gdal-2.0.0.tar.gz
tar -xzvf gdal-2.0.0.tar.gz
cd gdal-2.0.0
./configure
make
Y en ese momento falla con el error "no se conoce el tamaño de almacenamiento de sHints":
gdalserver.c: In function 'CreateSocketAndBindAndListen': gdalserver.c:124:21: error: storage size of 'sHints' isn't known struct addrinfo sHints; ^ gdalserver.c:126:31: error: invalid application of 'sizeof' to incomplete type 'struct addrinfo' memset(&sHints, 0, sizeof(struct addrinfo)); ^ gdalserver.c:129:23: error: 'AI_PASSIVE' undeclared (first use in this function) sHints.ai_flags = AI_PASSIVE; ^ gdalserver.c:129:23: note: each undeclared identifier is reported only once for each function it appears in gdalserver.c:132:12: warning: implicit declaration of function 'getaddrinfo' [-Wimplicit-function-declaration] nRet = getaddrinfo(NULL, pszService, &sHints, &psResults); ^ gdalserver.c:135:48: warning: implicit declaration of function 'gai_strerror' [-Wimplicit-function-declaration] fprintf(stderr, "getaddrinfo(): %s\n", gai_strerror(nRet)); ^ gdalserver.c:135: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:141:39: error: dereferencing pointer to incomplete type 'struct addrinfo' psResultsIter = psResultsIter->ai_next) ^ gdalserver.c:162:5: warning: implicit declaration of function 'freeaddrinfo' [-Wimplicit-function-declaration] freeaddrinfo(psResults); ^ gdalserver.c:124:21: warning: unused variable 'sHints' [-Wunused-variable] struct addrinfo sHints; ^ ../GDALmake.opt:579: recipe for target 'gdalserver.lo' failed make[1]: *** [gdalserver.lo] Error 1 make[1]: Leaving directory '/tmp/gdal-2.0.0/apps' GNUmakefile:67: recipe for target 'apps-target' failed make: *** [apps-target] Error 2
Busqué en Google y seguí todos los consejos que pude hasta ahora, incluida la instalación de más de 20 paquetes que dudo que necesite. Lo he intentado ./configure --with-python
también. Nota: Anteriormente pude instalar GDAL 2.0 con éxito en Ubuntu 14.04.
Respuesta1
Descubrí que había un error en 2.0.0 y que necesitaba instalar 2.1.0. ¡Acabo de cambiar los números de versión y funciona muy bien!