MaZderMind/osm-history-renderer — Issue #2: compiling error in osmium/osm.hpp
Author: wiso
Created: 2011-12-03 16:51:38+00:00
State: open

Hello, I'm trying to copile the code with g++ (GCC) 4.6.2 20111027 (Red Hat 4.6.2-1) on fedora 16. I get this error. I'm following the instruction, the version is here:

commit f128dee15f3d31145d8abc67405416f05f1f1788
Merge: abea767 ea1b589
Author: MaZderMind
Date: Mon Nov 28 23:32:49 2011 +0100

error:

g++ -g -O3 -Wall -Wextra -pedantic `getconf LFS_CFLAGS` -Iosmium/include -DOSMIUM_WITH_OUTPUT_OSM_XML `xml2-config --cflags` -DOSMIUM_WITH_GEOS -o osm-history-splitter splitter.cpp -L/usr/local/lib -lexpat -lpthread `xml2-config --libs` -lz -lprotobuf-lite -losmpbf -lgeos
In file included from osmium/include/osmium/osm.hpp:44:0,
from osmium/include/osmium.hpp:109,
from splitter.cpp:9:
osmium/include/osmium/osm/area.hpp: In member function ‘geos::geom::LinearRing* Osmium::OSM::AreaFromRelation::create_non_intersecting_linear_ring(geos::geom::CoordinateSequence*)’:
osmium/include/osmium/osm/area.hpp:545:81: error: cannot convert from base ‘geos::geom::Geometry’ to derived type ‘geos::geom::LinearRing’ via virtual base ‘geos::geom::Geometry’
osmium/include/osmium/osm/area.hpp: In member function ‘Osmium::OSM::RingInfo* Osmium::OSM::AreaFromRelation::make_one_ring(std::vector&, osm_object_id_t, osm_object_id_t, int, int)’:
osmium/include/osmium/osm/area.hpp:561:125: error: call of overloaded ‘create(int, int)’ is ambiguous
osmium/include/osmium/osm/area.hpp:561:125: note: candidates are:
/usr/include/geos/geom/CoordinateSequenceFactory.h:66:30: note: virtual geos::geom::CoordinateSequence* geos::geom::CoordinateSequenceFactory::create(std::vector*, std::size_t) const
/usr/include/geos/geom/CoordinateSequenceFactory.h:80:30: note: virtual geos::geom::CoordinateSequence* geos::geom::CoordinateSequenceFactory::create(std::size_t, std::size_t) const
osmium/include/osmium/osm/area.hpp:572:80: error: cannot convert from base ‘geos::geom::Geometry’ to derived type ‘geos::geom::LineString’ via virtual base ‘geos::geom::Geometry’
osmium/include/osmium/osm/area.hpp: In member function ‘bool Osmium::OSM::AreaFromRelation::build_geometry()’:
osmium/include/osmium/osm/area.hpp:925:139: error: cannot convert from base ‘geos::geom::Geometry’ to derived type ‘geos::geom::LineString’ via virtual base ‘geos::geom::Geometry’
osmium/include/osmium/osm/area.hpp:1013:100: error: cannot convert from base ‘geos::geom::Geometry’ to derived type ‘geos::geom::LineString’ via virtual base ‘geos::geom::Geometry’
osmium/include/osmium/osm/area.hpp:1025:96: error: cannot convert from base ‘geos::geom::Geometry’ to derived type ‘geos::geom::LineString’ via virtual base ‘geos::geom::Geometry’
osmium/include/osmium/osm/area.hpp:1030:71: error: cannot convert from base ‘geos::geom::Geometry’ to derived type ‘geos::geom::LinearRing’ via virtual base ‘geos::geom::Geometry’
make: *** [osm-history-splitter] Errore 1