Estou tentando instalar o GDAL 2.0 no Ubuntu 16.04.
Aqui está a sequência de comandos que estou tentando:
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
E nesse ponto ele falha com o erro "tamanho de armazenamento do sHints não conhecido":
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
Pesquisei no Google e segui todos os conselhos que pude até agora, incluindo a instalação de mais de 20 pacotes que duvido que precisem. Eu tentei ./configure --with-python
também. Nota: consegui instalar o GDAL 2.0 com sucesso no Ubuntu 14.04 anteriormente.
Responder1
Descobri que havia um bug no 2.0.0 e que precisava instalar o 2.1.0. Acabei de trocar os números da versão e funciona muito bem!