> On behalf of the GDAL/OGR development team, I am pleased to announce the
> release of the GDAL/OGR 2.4.1 bug fix version. This adds 52 bug fixes on top
> of 2.4.0. The C and C++ API and ABI are unchanged.
Sorry I didn't get to test RC1. Aside from one problem, it built fine
on netbsd-8 amd64, and postgis tests passed using it, so I have updated
I got an error (gcc 5.5.0) about fabs not being in std:
ogrlinestring.cpp: In member function 'virtual void OGRSimpleCurve::segmentize(double)':
ogrlinestring.cpp:2554:13: error: 'fabs' is not a member of 'std'
if( std::fabs(dfSquareDist - dfSquareMaxLength) > 1e-5 * dfSquareMaxLength )
I did not get this when building 2.4.0 on the same system (but I did do
a tiny update along the branch, and am rechecking 2.4.0).
I'm not 100% clear on the C++ standard; cmath has some ifdefs I don't
and searching about this leads to some complicated discussion. In
general, it seems std::abs is required to be overloaded for float and
that's the recommended usage, but I also see that some prefer std::fabs
for arguments know to be floats.
I applied the following patch for now; I suspect it's not right longer
It's of course possible my g++ 5 headers are broken, but I would expect
this may have shown up elsewhere and been fixed by now if so.
Perhaps I should have switched to std::abs instead.
> could you try instead applying the following patch (on top of unmodified
> 2.4.1) ?
> <cmath> is supposed to be the official header for std::fabs. It might get
> indirectly included on other systems by accident.
> diff --git a/gdal/ogr/ogrlinestring.cpp b/gdal/ogr/ogrlinestring.cpp
> index 810ad2e..1d4da9c 100644
> --- a/gdal/ogr/ogrlinestring.cpp
> +++ b/gdal/ogr/ogrlinestring.cpp
> @@ -31,6 +31,7 @@
> #include "ogr_geos.h"
> #include "ogr_p.h"
> +#include <cmath>
> #include <cstdlib>
> #include <algorithm>
> #include <limits>