Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 563608 - =sci-libs/gdal-2.0.0-r1 with =sys-libs/glibc:2.22-r1 fails to build
Summary: =sci-libs/gdal-2.0.0-r1 with =sys-libs/glibc:2.22-r1 fails to build
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Sci-geo Project
URL: https://trac.osgeo.org/gdal/ticket/6073
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-10-20 21:29 UTC by Greg Turner
Modified: 2015-10-24 17:25 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
gdal-2.0.0-r29668-glibc222.patch (gdal-2.0.0-r29668-glibc222.patch,768 bytes, patch)
2015-10-20 21:29 UTC, Greg Turner
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Greg Turner 2015-10-20 21:29:05 UTC
Created attachment 415040 [details, diff]
gdal-2.0.0-r29668-glibc222.patch

tmp/portage/sci-libs/gdal-2.0.0-r1/work/gdal-2.0.0/alg -I/var/tmp/portage/sci-libs/gdal-2.0.0-r1/work/gdal-2.0.0/ogr -I/var/tmp/portage/sci-libs/gdal-2.0.0-r1/work/gdal-2.0.0/ogr/ogrsf_frmts -O2 -pipe -g -mtune=native -march=native -fPIC  -Wall -Wdeclaration-after-statement  -I/var/tmp/portage/sci-libs/gdal-2.0.0-r1/work/gdal-2.0.0/frmts/vrt -DOGR_ENABLED -I/var/tmp/portage/sci-libs/gdal-2.0.0-r1/work/gdal-2.0.0/port -I/usr/ -I/usr//include  -DGDAL_COMPILATION -I/usr/include/json-c -I/var/tmp/portage/sci-libs/gdal-2.0.0-r1/work/gdal-2.0.0/ogr/ogrsf_frmts/geojson -c -o gdalserver.o gdalserver.c
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:47: warning: implicit declaration of function ‘gai_strerror’ [-Wimplicit-function-declaration]
         fprintf(stderr, "getaddrinfo(): %s\n", gai_strerror(nRet));
                                               ^
gdalserver.c:135:24: 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:583: recipe for target 'gdalserver.o' failed
make[1]: *** [gdalserver.o] Error 1
make[1]: Leaving directory '/var/tmp/portage/sci-libs/gdal-2.0.0-r1/work/gdal-2.0.0/apps'
GNUmakefile:67: recipe for target 'apps-target' failed
make: *** [apps-target] Error 2
 * ERROR: sci-libs/gdal-2.0.0-r1::gentoo failed (compile phase):
 *   emake failed
.
.

Attached patch applies upstream's already-in-tree solution to this:

https://trac.osgeo.org/gdal/changeset/29668?format=diff&new=29668
Comment 1 Justin Lecher (RETIRED) gentoo-dev 2015-10-24 17:25:07 UTC
commit 26928529bd50baa3f6a6ef0a77eb4012c82a0fd1
Author: Justin Lecher <jlec@gentoo.org>
Date:   Sat Oct 24 19:22:40 2015 +0200

    sci-libs/gdal: Backport patch for glibc-2.22

    Gentoo-Bug: https://bugs.gentoo.org/show_bug.cgi?id=563608

    Package-Manager: portage-2.2.23
    Signed-off-by: Justin Lecher <jlec@gentoo.org>

    https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=26928529bd50baa3f6a6ef0a77eb4012c82a0fd1