[PROJ] build failure with GCC 9.1.0

Elliott Sales de Andrade quantum.analyst at gmail.com
Wed Sep 25 01:51:10 PDT 2019


On Wed, 25 Sep 2019 at 03:55, Dechaux Eric CEN (BCQ STIG)
<eric.dechaux at gendarmerie.interieur.gouv.fr> wrote:
>
> Le 24/09/2019 à 15:37, Even Rouault a écrit :
> > Hi
> >
> >> Could it comes from my buildbox (Solaris 11.4.12) ?
> > Definitely a Solaris specific thing.
> > Should hopefully be fixed by https://github.com/OSGeo/PROJ/pull/1637
> > Can you confirm this patch fixes the issue ?
>
> I am afraid it is not enough. Please find attached 4 additional patches :
>
>      - proj-6.2.0-hanato.gpatch and proj-6.2.0-mbtfpp.gpatch
>
> In files src/projections/hatano.cpp and src/projections/mbtfpp.cpp,
> change the CS define to CSz in order to avoid overriding the CS system
> definition
>
>      - proj-6.2.0-isea.gpatch :
>
> In file src/projections/isea.cpp, change the quad variable name as it is
> overriding another system definition
>
> $ grep quad  /usr/include/sys/types.h
> typedef struct _quad { int val[2]; } quad_t;    /* used by UFS */
> typedef quad_t          quad;                   /* used by UFS */
>

I don't understand this one. It's not a macro, so the inner scope
identifier should shadow the outer one.
See https://godbolt.org/z/ZQKPKo

>      - proj-6.2.0-io.gpatch
>
> In file src/iso19111/io.cpp, change another class name that override the
> CS system define
>
> $ gegrep '[[:space:]]CS[[:space:]]' /usr/include/sys/regset.h
> #define CS              15
>

Maybe it would be better to figure out how and why this header is
included, and then disable it, since it's defined several macros which
seem useless for Proj.

>
> With those changes, 6.2.0 build and check properly on Solaris 11.4.12
> and GCC 9.1.
>
> Note : I quite understood what I changed in the first 3 patches. Not
> sure in the last one. Can you please review it ?
>
>
> Regards.
>
> --
> Eric

-- 
Elliott


More information about the PROJ mailing list