MantisBT - VTK
View Issue Details
0015692VTK(No Category)public2015-08-27 13:102016-08-12 09:55
Morgulis 
Aashish Chaudhary 
normalminorhave not tried
closedmoved 
 
 
TBD
incorrect functionality
0015692: Add gdal-2.0 compatibility
I am trying to compile VTK with gdal 2.0 and got this compilation error:

[ 25%] Building CXX object Wrapping/Python/CMakeFiles/vtkCommonDataModelPythonD.dir/vtkPointSetPython.cxx.o
/build/vtk/src/VTK-6.1.0/IO/GDAL/vtkGDALVectorReader.cxx: In constructor 'vtkGDALVectorReader::Internal::Internal(const char*, int, int, int)':
/build/vtk/src/VTK-6.1.0/IO/GDAL/vtkGDALVectorReader.cxx:47:20: error: 'Open' is not a member of 'OGRSFDriverRegistrar'
     this->Source = OGRSFDriverRegistrar::Open( srcName, srcMode, &this->Driver );
                    ^
/build/vtk/src/VTK-6.1.0/IO/GDAL/vtkGDALVectorReader.cxx: In destructor 'vtkGDALVectorReader::Internal::~Internal()':
/build/vtk/src/VTK-6.1.0/IO/GDAL/vtkGDALVectorReader.cxx:64:22: warning: 'static void OGRDataSource::DestroyDataSource(OGRDataSource*)' is deprecated [-Wdeprecated-declarations]
       OGRDataSource::DestroyDataSource( this->Source );
                      ^
In file included from /build/vtk/src/VTK-6.1.0/IO/GDAL/vtkGDALVectorReader.cxx:32:0:
/usr/include/ogrsf_frmts.h:245:25: note: declared here
     static void DestroyDataSource( OGRDataSource * ) OGR_DEPRECATED("Use GDALDataset class instead");
                         ^
/build/vtk/src/VTK-6.1.0/IO/GDAL/vtkGDALVectorReader.cxx:64:54: warning: 'static void OGRDataSource::DestroyDataSource(OGRDataSource*)' is deprecated [-Wdeprecated-declarations]
       OGRDataSource::DestroyDataSource( this->Source );
                                                      ^
In file included from /build/vtk/src/VTK-6.1.0/IO/GDAL/vtkGDALVectorReader.cxx:32:0:
/usr/include/ogrsf_frmts.h:245:25: note: declared here
     static void DestroyDataSource( OGRDataSource * ) OGR_DEPRECATED("Use GDALDataset class instead");
                         ^
IO/GDAL/CMakeFiles/vtkIOGDAL.dir/build.make:72: recipe for target 'IO/GDAL/CMakeFiles/vtkIOGDAL.dir/vtkGDALVectorReader.cxx.o' failed
make[2]: *** [IO/GDAL/CMakeFiles/vtkIOGDAL.dir/vtkGDALVectorReader.cxx.o] Error 1
CMakeFiles/Makefile2:27630: recipe for target 'IO/GDAL/CMakeFiles/vtkIOGDAL.dir/all' failed
make[1]: *** [IO/GDAL/CMakeFiles/vtkIOGDAL.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....



gdal 2.0 changed its API http://svn.osgeo.org/gdal/trunk/gdal/MIGRATION_GUIDE.TXT [^] and corresponding changes has to be done in VTK.


I found this thread that shows similar problem with proposed solution https://12435320936546247995.googlegroups.com/attach/cd7aca657fcbaa6/OGR.txt?part=0.1&view=1&vt=ANaJVrH7EU5Ja4C-Oo9kS4jp8SfE2IwqQ-gnWGYNWEkYeJpF23JXOewqXdkBy-8Mpt67Il-Ge3pS01p7jFeIFi9I7AaGk3acM8zcXTxt_rAQPCuo5mM2A4A [^]
No tags attached.
Issue History
2015-08-27 13:10MorgulisNew Issue
2015-09-24 00:23MorgulisNote Added: 0035242
2015-10-03 17:15Ray RashifNote Added: 0035258
2016-01-08 10:25Dave DeMarleNote Added: 0035640
2016-07-06 11:08Berk GeveciAssigned To => Aashish Chaudhary
2016-08-12 09:55Kitware RobotNote Added: 0037407
2016-08-12 09:55Kitware RobotStatusbacklog => closed
2016-08-12 09:55Kitware RobotResolutionopen => moved

Notes
(0035242)
Morgulis   
2015-09-24 00:23   
It looks like this upstream (gdal) change causes the problem https://github.com/OSGeo/gdal/commit/dab8a103cfd862ddc9272233814a8d252a038814 [^]
(0035258)
Ray Rashif   
2015-10-03 17:15   
Hi, at Arch Linux we were bitten by this and thanks to Morgulis' link above I was able to quickly figure out a patch for this:

https://projects.archlinux.org/svntogit/community.git/tree/trunk/gdal2.patch?h=packages/vtk&id=43307598a98872fd4ce7739e47f5bb4cfcb5372d [^]

This is against the tarball release for 6.1.0 and not against the latest development branch, but should give anyone a headstart.

Most of the changes are deprecations, only the changes labelled "removed" need to be considered.

Nevertheless, it is good to update the entire GDAL IO code since the deprecations may soon also be "removed".
(0035640)
Dave DeMarle   
2016-01-08 10:25   
We hope to have this for 7.1 but won't get to it for 7.0.
thanks for the detailed bug report.
(0037407)
Kitware Robot   
2016-08-12 09:55   
Resolving issue as `moved`.

This issue tracker is no longer used. Further discussion of this issue may take place in the current VTK Issues page linked in the banner at the top of this page.