instalação do GDAL falhando no Ubuntu 16.04 LTS

1

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 momento ele falha com o erro "o tamanho do armazenamento de 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

Eu pesquisei e segui todos os conselhos que pude até agora, incluindo a instalação de mais de 20 pacotes que duvido que eu precise. Eu tentei ./configure --with-python também. Nota: Eu fui capaz de instalar com sucesso o GDAL 2.0 no Ubuntu 14.04 anteriormente.

    
por bozdoz 09.09.2016 / 21:07

1 resposta

2

Eu descobri que havia um bug no 2.0.0 e que eu precisava instalar o 2.1.0. Acabei de trocar os números da versão e funciona muito bem!

    
por bozdoz 14.09.2016 / 23:48