[gdal-dev] GDAL/OGR 2.4.1 is released

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

[gdal-dev] GDAL/OGR 2.4.1 is released

Even Rouault-2
Hi,

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.

Consult the release notes for the list of issues addressed :
  https://trac.osgeo.org/gdal/wiki/Release/2.4.1-News

The sources are available at:

    http://download.osgeo.org/gdal/2.4.1/gdal-2.4.1.tar.xz
    http://download.osgeo.org/gdal/2.4.1/gdal-2.4.1.tar.gz
    http://download.osgeo.org/gdal/2.4.1/gdal241.zip
    http://download.osgeo.org/gdal/2.4.1/gdal-grass-2.4.1.tar.gz

Best regards,

Even

--
Spatialys - Geospatial professional services
http://www.spatialys.com
_______________________________________________
gdal-dev mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/gdal-dev
Reply | Threaded
Open this post in threaded view
|

Re: GDAL/OGR 2.4.1 is released

Greg Troxel-2
Even Rouault <[hidden email]> writes:

> 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
pkgsrc.


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
understand:

#ifndef __CORRECT_ISO_CPP_MATH_H_PROTO
  inline _GLIBCXX_CONSTEXPR float
  fabs(float __x)
  { return __builtin_fabsf(__x); }

  inline _GLIBCXX_CONSTEXPR long double
  fabs(long double __x)
  { return __builtin_fabsl(__x); }
#endif
     
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
term.

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.



--- ogr/ogrlinestring.cpp.orig 2019-03-15 12:35:19.000000000 +0000
+++ ogr/ogrlinestring.cpp
@@ -2551,7 +2551,7 @@ void OGRSimpleCurve::segmentize( double
         const double dfX = paoPoints[i+1].x - paoPoints[i].x;
         const double dfY = paoPoints[i+1].y - paoPoints[i].y;
         const double dfSquareDist = dfX * dfX + dfY * dfY;
-        if( std::fabs(dfSquareDist - dfSquareMaxLength) > 1e-5 * dfSquareMaxLength )
+        if( fabs(dfSquareDist - dfSquareMaxLength) > 1e-5 * dfSquareMaxLength )
         {
             const double dfIntermediatePoints =
                 floor(sqrt(dfSquareDist / dfSquareMaxLength) - 1e-2);


_______________________________________________
gdal-dev mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/gdal-dev
Reply | Threaded
Open this post in threaded view
|

Re: GDAL/OGR 2.4.1 is released

Even Rouault-2
Greg,

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>


Even

--
Spatialys - Geospatial professional services
http://www.spatialys.com
_______________________________________________
gdal-dev mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/gdal-dev
Reply | Threaded
Open this post in threaded view
|

Re: GDAL/OGR 2.4.1 is released

Greg Troxel-2
Even Rouault <[hidden email]> writes:

> 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>

With that patch (and not my earlier one), 2.4.1 builds without errors,
and postgis tests still pass.  (I know I should run the gdal test suite,
but haven't yet.)
_______________________________________________
gdal-dev mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/gdal-dev
Reply | Threaded
Open this post in threaded view
|

Re: GDAL/OGR 2.4.1 is released

Even Rouault-2
> With that patch (and not my earlier one), 2.4.1 builds without errors,
> and postgis tests still pass.  (I know I should run the gdal test suite,
> but haven't yet.)

Great. Patch queued in master and release/2.4 branches for next releases.

Even

--
Spatialys - Geospatial professional services
http://www.spatialys.com
_______________________________________________
gdal-dev mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/gdal-dev