[gdal-dev] sprintf different exception specified

Chris Marsh chris.marsh at usask.ca
Sat Oct 28 09:20:11 PDT 2017


Hi,

Ya, certainly feels that way... Probably not possible to get an image, it's
one of Compute Canada's machines, and so not something I am in charge of. I
could probably find out specific details if that helps?

That does correct the problem, thanks!

Cheers
Chris



On 28 October 2017 at 02:17, Even Rouault <even.rouault at spatialys.com>
wrote:

> Chris,
>
>
>
> There must be something unusual with the system you build on. Is it
> possible to get an image of it ?
>
>
>
> Anyway, you can probably workaround the issue with
>
>
>
> CXXFLAGS="-DDONT_DEPRECATE_SPRINTF" ./configure [...]
>
>
>
> Normally configure has a check to automatically define
> DONT_DEPRECATE_SPRINTF on systems where errors such as the one you get
> occur, but for some reason it doesn't work here.
>
>
>
> Even
>
>
>
> > Hi,
>
> > I'm trying to build GDAL 2.2.x, including most recent git, and I'm
> running
>
> > into the following error.
>
> > I've tried adding throw() to the end of this line, but it just results in
>
> > more (and bizarre) errors.
>
> >
>
> > Would appreciate any insight on how to proceed.
>
> >
>
> > Cheers
>
> > Chris
>
> >
>
> >
>
> > In file included from
>
> >
>
> > > /home/cmarsh/CHM/build-release/lib/GDAL-prefix/src/
> GDAL/gdal/gcore/gdal_fr
>
> > > mts.h:34:0,>
>
> > > from mbtilesdataset.cpp:29:
>
> > > /home/cmarsh/CHM/build-release/lib/GDAL-prefix/src/
> GDAL/gdal/port/cpl_port
>
> > > .h:1101:85: error: declaration of 'int sprintf(char*, const char*,
> ...)'
>
> > > has a different exception specifier
>
> > >
>
> > > #define CPL_WARN_DEPRECATED(x) __attribute__
>
> > >
>
> > > ((deprecated))
>
> > >
>
> > > ^
>
> > >
>
> > > /home/cmarsh/CHM/build-release/lib/GDAL-prefix/src/
> GDAL/gdal/port/cpl_port
>
> > > .h:1121:5: note: in expansion of macro 'CPL_WARN_DEPRECATED'
>
> > >
>
> > > CPL_WARN_DEPRECATED("Use snprintf() or CPLsnprintf() instead");
>
> > > ^
>
> > >
>
> > > In file included from
>
> > > /home/cmarsh/CHM/build-release/lib/GDAL-prefix/src/
> GDAL/gdal/port/cpl_port
>
> > > .h:137:0,>
>
> > > from
>
> > >
>
> > > /home/cmarsh/CHM/build-release/lib/GDAL-prefix/src/
> GDAL/gdal/gcore/gdal_fr
>
> > > mts.h:34,>
>
> > > from mbtilesdataset.cpp:29:
>
> > > /usr/include/stdio.h:364:12: error: from previous declaration 'int
>
> > > sprintf(char*, const char*, ...) throw ()'
>
> > >
>
> > > extern int sprintf (char *__restrict __s,
>
> > >
>
> > > ^
>
> > >
>
> > > In file included from /usr/include/features.h:375:0,
>
> > >
>
> > > from /usr/include/stdio.h:27,
>
> > > from
>
> > >
>
> > > /home/cmarsh/CHM/build-release/lib/GDAL-prefix/src/
> GDAL/gdal/port/cpl_port
>
> > > .h:137,>
>
> > > from
>
> > >
>
> > > /home/cmarsh/CHM/build-release/lib/GDAL-prefix/src/
> GDAL/gdal/gcore/gdal_fr
>
> > > mts.h:34,>
>
> > > from mbtilesdataset.cpp:29:
>
> > gcc -v
>
> > Using built-in specs.
>
> > COLLECT_GCC=gcc
>
> > COLLECT_LTO_WRAPPER=/cvmfs/
>
> > soft.computecanada.ca/nix/store/lvjwgn6hpngyy6k4xqcqa9h2cxy3fl
> 30-gfortran-5.
>
> > 4.0/libexec/gcc/x86_64-unknown-linux-gnu/5.4.0/lto-wrapper Target:
>
> > x86_64-unknown-linux-gnu
>
> > Configured with:
>
> > Thread model: posix
>
> > gcc version 5.4.0 (GCC)
>
>
>
>
>
> --
>
> Spatialys - Geospatial professional services
>
> http://www.spatialys.com
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20171028/9be152e5/attachment.html>


More information about the gdal-dev mailing list