osmium icon indicating copy to clipboard operation
osmium copied to clipboard

Fails to build with GEOS 3.6.0

Open sebastic opened this issue 7 years ago • 2 comments

GEOS 3.6.0 has been released, and unfortunately osmium fails to build with it:

g++ -g -O2 -fdebug-prefix-map=/build/osmium-0.0~20160425-e2e4368=. -fPIE -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -O3 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I../include -I/usr/include/libshp -DOSMIUM_WITH_DEBUG -I/usr/include -Wall -Wextra -Wdisabled-optimization -pedantic -Wctor-dtor-privacy -Wnon-virtual-dtor -Woverloaded-virtual -Wsign-promo -Wno-long-long -o osmjs osmjs.cpp -fPIE -pie -Wl,-z,relro -Wl,-z,now -lexpat -lz -lpthread -lprotobuf-lite -losmpbf -lv8 -licuuc -lshp -L/usr/lib/x86_64-linux-gnu -lgeos-3.6.0
In file included from ../include/osmium/geometry/multipolygon.hpp:34:0,
                 from ../include/osmium/javascript/wrapper/geometry.hpp:39,
                 from ../include/osmium/javascript/handler.hpp:32,
                 from ../include/osmium/javascript.hpp:27,
                 from osmjs.cpp:30:
../include/osmium/geometry/geos.hpp: In function 'geos::geom::GeometryFactory* Osmium::Geometry::geos_geometry_factory()':
../include/osmium/geometry/geos.hpp:54:63: error: 'geos::geom::GeometryFactory::GeometryFactory(const geos::geom::PrecisionModel*, int)' is protected within this context
             static geos::geom::GeometryFactory factory(&pm, -1);
                                                               ^
In file included from ../include/osmium/geometry/geos.hpp:28:0,
                 from ../include/osmium/geometry/multipolygon.hpp:34,
                 from ../include/osmium/javascript/wrapper/geometry.hpp:39,
                 from ../include/osmium/javascript/handler.hpp:32,
                 from ../include/osmium/javascript.hpp:27,
                 from osmjs.cpp:30:
/usr/include/geos/geom/GeometryFactory.h:464:2: note: declared protected here
  GeometryFactory(const PrecisionModel* pm, int newSRID);
  ^~~~~~~~~~~~~~~
In file included from ../include/osmium/geometry/multipolygon.hpp:34:0,
                 from ../include/osmium/javascript/wrapper/geometry.hpp:39,
                 from ../include/osmium/javascript/handler.hpp:32,
                 from ../include/osmium/javascript.hpp:27,
                 from osmjs.cpp:30:
../include/osmium/geometry/geos.hpp:54:63: error: 'virtual geos::geom::GeometryFactory::~GeometryFactory()' is protected within this context
             static geos::geom::GeometryFactory factory(&pm, -1);
                                                               ^
In file included from ../include/osmium/geometry/geos.hpp:28:0,
                 from ../include/osmium/geometry/multipolygon.hpp:34,
                 from ../include/osmium/javascript/wrapper/geometry.hpp:39,
                 from ../include/osmium/javascript/handler.hpp:32,
                 from ../include/osmium/javascript.hpp:27,
                 from osmjs.cpp:30:
/usr/include/geos/geom/GeometryFactory.h:474:10: note: declared protected here
  virtual ~GeometryFactory();
          ^

This change seems to be the culprit.

- C++ API changes:
  - Automatic memory management for GeometryFactory objects

sebastic avatar Oct 25 '16 19:10 sebastic

Osmium is not maintained any more. It is time to retire it and switch to libosmium.

joto avatar Oct 25 '16 19:10 joto

I'm aware of that :-)

Since the upcoming Debian stretch release will be the first to include libosmium & friends in the release itself (not via backports as for jessie), I'd prefer to have both the old and new osmium to allow users to switch during the stretch lifetime.

If we cannot patch this issue, we'll remove osmium from Debian forcing users to adopt libosmium.

sebastic avatar Oct 25 '16 19:10 sebastic