ossimlabs/ossim

OSSIM 1.8.20-3 fails to build with GEOS 3.6.x (and needs to switch to the GEOS C API)

sebastic opened this issue · 12 comments

With the release of GEOS 3.6.1 this issues gains more relevance.

As reported in Trac #2382:

GEOS 3.6.0 has been released, and unfortunately OSSIM 1.8.20-3 fails to build with it:

[ 14%] Building CXX object src/ossim/CMakeFiles/ossim.dir/base/ossimPolyArea2d.cpp.o
cd /build/ossim-1.8.20.3+ds/debian/build/src/ossim && /usr/bin/c++   -DOSSIMMAKINGDLL -Dossim_EXPORTS -I/build/ossim-1.8.20.3+ds/ossim/include -I/build/ossim-1.8.20.3+ds/debian/build/include -I/usr/include/geos -I/usr/include/geotiff -I/usr/include/x86_64-linux-gnu -I/usr/include/freetype2  -g -O2 -fdebug-prefix-map=/build/ossim-1.8.20.3+ds=. -fPIE -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2  -O3 -DNDEBUG -fPIC    -o CMakeFiles/ossim.dir/base/ossimPolyArea2d.cpp.o -c /build/ossim-1.8.20.3+ds/ossim/src/ossim/base/ossimPolyArea2d.cpp
[ 14%] Building CXX object src/ossim/CMakeFiles/ossim.dir/base/ossimPolyLine.cpp.o
cd /build/ossim-1.8.20.3+ds/debian/build/src/ossim && /usr/bin/c++   -DOSSIMMAKINGDLL -Dossim_EXPORTS -I/build/ossim-1.8.20.3+ds/ossim/include -I/build/ossim-1.8.20.3+ds/debian/build/include -I/usr/include/geos -I/usr/include/geotiff -I/usr/include/x86_64-linux-gnu -I/usr/include/freetype2  -g -O2 -fdebug-prefix-map=/build/ossim-1.8.20.3+ds=. -fPIE -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2  -O3 -DNDEBUG -fPIC    -o CMakeFiles/ossim.dir/base/ossimPolyLine.cpp.o -c /build/ossim-1.8.20.3+ds/ossim/src/ossim/base/ossimPolyLine.cpp
/build/ossim-1.8.20.3+ds/ossim/src/ossim/base/ossimPolyArea2d.cpp: In constructor 'ossimGeometryFactoryWrapper::ossimGeometryFactoryWrapper()':
/build/ossim-1.8.20.3+ds/ossim/src/ossim/base/ossimPolyArea2d.cpp:39:61: error: 'geos::geom::GeometryFactory::GeometryFactory(const geos::geom::PrecisionModel*, int)' is protected within this context
       m_geomFactory = new geos::geom::GeometryFactory(pm, -1);
                                                             ^
In file included from /build/ossim-1.8.20.3+ds/ossim/src/ossim/base/ossimPolyArea2d.cpp:15:0:
/usr/include/geos/geom/GeometryFactory.h:464:2: note: declared protected here
  GeometryFactory(const PrecisionModel* pm, int newSRID);
  ^~~~~~~~~~~~~~~
/build/ossim-1.8.20.3+ds/ossim/src/ossim/base/ossimPolyArea2d.cpp: In destructor 'virtual ossimGeometryFactoryWrapper::~ossimGeometryFactoryWrapper()':
/build/ossim-1.8.20.3+ds/ossim/src/ossim/base/ossimPolyArea2d.cpp:41:68: error: 'virtual geos::geom::GeometryFactory::~GeometryFactory()' is protected within this context
    virtual ~ossimGeometryFactoryWrapper(){if(m_geomFactory) delete m_geomFactory;m_geomFactory=0;}
                                                                    ^~~~~~~~~~~~~
In file included from /build/ossim-1.8.20.3+ds/ossim/src/ossim/base/ossimPolyArea2d.cpp:15:0:
/usr/include/geos/geom/GeometryFactory.h:474:10: note: declared protected here
  virtual ~GeometryFactory();
          ^
/build/ossim-1.8.20.3+ds/ossim/src/ossim/base/ossimPolyArea2d.cpp: In member function 'void ossimPolyArea2d::recurseVisibleGeometries(std::vector<ossimPolygon>&, const geos::geom::Geometry*) const':
/build/ossim-1.8.20.3+ds/ossim/src/ossim/base/ossimPolyArea2d.cpp:168:21: warning: 'template<class> class std::auto_ptr' is deprecated [-Wdeprecated-declarations]
                std::auto_ptr<const geos::geom::Point> point(lineString->getPointN(idx));
                     ^~~~~~~~
In file included from /usr/include/c++/6/bits/locale_conv.h:41:0,
                 from /usr/include/c++/6/locale:43,
                 from /usr/include/c++/6/iomanip:43,
                 from /build/ossim-1.8.20.3+ds/ossim/include/ossim/base/ossimColumnVector3d.h:17,
                 from /build/ossim-1.8.20.3+ds/ossim/include/ossim/base/ossimDpt3d.h:24,
                 from /build/ossim-1.8.20.3+ds/ossim/include/ossim/base/ossimGpt.h:23,
                 from /build/ossim-1.8.20.3+ds/ossim/include/ossim/base/ossimPolyArea2d.h:13,
                 from /build/ossim-1.8.20.3+ds/ossim/src/ossim/base/ossimPolyArea2d.cpp:7:
/usr/include/c++/6/bits/unique_ptr.h:49:28: note: declared here
   template<typename> class auto_ptr;
                            ^~~~~~~~
/build/ossim-1.8.20.3+ds/ossim/src/ossim/base/ossimPolyArea2d.cpp: In member function 'void ossimPolyArea2d::recurseHoles(std::vector<ossimPolygon>&, const geos::geom::Geometry*) const':
/build/ossim-1.8.20.3+ds/ossim/src/ossim/base/ossimPolyArea2d.cpp:210:24: warning: 'template<class> class std::auto_ptr' is deprecated [-Wdeprecated-declarations]
                   std::auto_ptr<const geos::geom::Point> point(lineString->getPointN(idx));
                        ^~~~~~~~
In file included from /usr/include/c++/6/bits/locale_conv.h:41:0,
                 from /usr/include/c++/6/locale:43,
                 from /usr/include/c++/6/iomanip:43,
                 from /build/ossim-1.8.20.3+ds/ossim/include/ossim/base/ossimColumnVector3d.h:17,
                 from /build/ossim-1.8.20.3+ds/ossim/include/ossim/base/ossimDpt3d.h:24,
                 from /build/ossim-1.8.20.3+ds/ossim/include/ossim/base/ossimGpt.h:23,
                 from /build/ossim-1.8.20.3+ds/ossim/include/ossim/base/ossimPolyArea2d.h:13,
                 from /build/ossim-1.8.20.3+ds/ossim/src/ossim/base/ossimPolyArea2d.cpp:7:
/usr/include/c++/6/bits/unique_ptr.h:49:28: note: declared here
   template<typename> class auto_ptr;
                            ^~~~~~~~
/build/ossim-1.8.20.3+ds/ossim/src/ossim/base/ossimPolyArea2d.cpp: In member function 'void ossimPolyArea2d::recurseCompleteGeometries(std::vector<ossimPolyArea2d>&, const geos::geom::Geometry*) const':
/build/ossim-1.8.20.3+ds/ossim/src/ossim/base/ossimPolyArea2d.cpp:247:21: warning: 'template<class> class std::auto_ptr' is deprecated [-Wdeprecated-declarations]
                std::auto_ptr<const geos::geom::Point> point(lineString->getPointN(idx));
                     ^~~~~~~~
In file included from /usr/include/c++/6/bits/locale_conv.h:41:0,
                 from /usr/include/c++/6/locale:43,
                 from /usr/include/c++/6/iomanip:43,
                 from /build/ossim-1.8.20.3+ds/ossim/include/ossim/base/ossimColumnVector3d.h:17,
                 from /build/ossim-1.8.20.3+ds/ossim/include/ossim/base/ossimDpt3d.h:24,
                 from /build/ossim-1.8.20.3+ds/ossim/include/ossim/base/ossimGpt.h:23,
                 from /build/ossim-1.8.20.3+ds/ossim/include/ossim/base/ossimPolyArea2d.h:13,
                 from /build/ossim-1.8.20.3+ds/ossim/src/ossim/base/ossimPolyArea2d.cpp:7:
/usr/include/c++/6/bits/unique_ptr.h:49:28: note: declared here
   template<typename> class auto_ptr;
                            ^~~~~~~~
/build/ossim-1.8.20.3+ds/ossim/src/ossim/base/ossimPolyArea2d.cpp:263:24: warning: 'template<class> class std::auto_ptr' is deprecated [-Wdeprecated-declarations]
                   std::auto_ptr<const geos::geom::Point> point(lineString->getPointN(idx));
                        ^~~~~~~~
In file included from /usr/include/c++/6/bits/locale_conv.h:41:0,
                 from /usr/include/c++/6/locale:43,
                 from /usr/include/c++/6/iomanip:43,
                 from /build/ossim-1.8.20.3+ds/ossim/include/ossim/base/ossimColumnVector3d.h:17,
                 from /build/ossim-1.8.20.3+ds/ossim/include/ossim/base/ossimDpt3d.h:24,
                 from /build/ossim-1.8.20.3+ds/ossim/include/ossim/base/ossimGpt.h:23,
                 from /build/ossim-1.8.20.3+ds/ossim/include/ossim/base/ossimPolyArea2d.h:13,
                 from /build/ossim-1.8.20.3+ds/ossim/src/ossim/base/ossimPolyArea2d.cpp:7:
/usr/include/c++/6/bits/unique_ptr.h:49:28: note: declared here
   template<typename> class auto_ptr;
                            ^~~~~~~~

OSSIM is one of the few GEOS reverse dependencies that doesn't limit itself to the C API, which you should consider as it is very stable unlike the C++ API.

From the GEOS 3.6.0 NEWS file:

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

I took a look and switching all to C-API seems to be a non-trivial task (but still worth doing).

Tweaking the use of C++ interface would require defining a "GeometryFactoryPointer" type to be either what it is currently ( the auto_ptr ) or the new GeometryFactory::unique_ptr depending on GEOS version.
Then Factory creation would need to be done via GeometryFactory::create() with 3.6+

strk commented
strk commented

I think this one should now be fixed

Changed to derive from the factory for the factory items are now protected.

Is there an ETA for a new OSSIM release which will include this change?

The 1.8.20-3 release was 1,5 years ago.

The latest OSSIM was fixed for the geos build errors

The latest OSSIM release is still 1.8.20-3, that doesn't include this fix. Since that release is 1,5 years old I'm wondering about the plans for the next release, when we can expect that. The Roadmap in Trac are no longer maintained and the Milestones supported by GitHub aren't used.

Based on the activity in Trac the OSSIM project seemed dead. The activity in this repository proves that it is not dead, but doesn't inform users nor distributors about planned releases.

Hello,

We have moved away from TRAC and we now maintain bugs, enhancements, ... etc via JIRA. This is a private tracking system but if issues are added here in github we usually can add some to the next "sprint" cycle during the code development process. So basically we do work in the "dev" branches under ossimlabs for four weeks and these have continuous tests that are ran on bugs we had in the past to make sure they are verified then at the end of the cycle we merge into master and run the same tests again.

I will bring up in the next planning a public source upload so people can easily download a tarball. For now you must clone the master branch.

Having a private issue tracker is worrying for an open source project.

Why not use the GitHub milestones (in addition)?