ARPA-SIMC / meteosatlib

OpenMTP/HRI/HRIT C++ access libraries, gdal drivers and other tools
GNU General Public License v2.0
8 stars 2 forks source link

'class GDALOpenInfo' has no member named 'papszOpenOptions' in utils.cpp #6

Closed brancomat closed 8 years ago

brancomat commented 8 years ago

(on Fedora 20)

/bin/sh ../libtool  --tag=CXX   --mode=compile g++ -DHAVE_CONFIG_H   -I.. -I.. -Werror -I/usr/include/gdal   -I/usr/include/gdal   -I/usr/include/gdal  -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches  -m64 -mtune=generic  -Wall -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches  -m64 -mtune=generic -std=c++11 -c -o reflectance/libmsatdrv_la-base.lo `test -f 'reflectance/base.cpp' || echo './'`reflectance/base.cpp
libtool: compile:  g++ -DHAVE_CONFIG_H -I.. -I.. -Werror -I/usr/include/gdal -I/usr/include/gdal -I/usr/include/gdal -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -Wall -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -std=c++11 -c reflectance/base.cpp  -fPIC -DPIC -o reflectance/.libs/libmsatdrv_la-base.o
utils.cpp: In function 'GDALDataset* msat::gdal::add_extras(GDALDataset*, GDALOpenInfo*)':
utils.cpp:14:33: error: 'class GDALOpenInfo' has no member named 'papszOpenOptions'
     int idx = CSLFindName(info->papszOpenOptions, "MSAT_COMPUTE");
                                 ^
utils.cpp:16:45: error: 'class GDALOpenInfo' has no member named 'papszOpenOptions'
     std::string val(CPLParseNameValue(info->papszOpenOptions[idx], nullptr));
                                             ^
make[2]: *** [libmsatdrv_la-utils.lo] Error 1
spanezz commented 8 years ago

I do not understand: http://www.gdal.org/classGDALOpenInfo.html says that papszOpenOptions should be there, but isn't. GDAL on Fedora 20 is 1.10 while on Debian testing and Fedora 24 is 2.0 or newer.

I cannot find a way to access open options when reading a dataset with GDAL 1.10, so the only fix to this seems to disable handling the reflectance calculation option for Fedora 20. Is that ok?

spanezz commented 8 years ago

Is it ok if Fedora 20 is still supported, but in Fedora 20 reflectance can only be calculated for HRIT datasets like we had in the last couple of years?

brancomat commented 8 years ago

Sorry for the duplicate bug... yes, it's ok.

spanezz commented 8 years ago

Done in 87652625fedb0242acc9bf0866c0c56361e78d12