[gdal-dev] Compilation problem on Ubuntu

Even Rouault even.rouault at mines-paris.org
Sat Feb 25 11:09:32 EST 2012


Le samedi 25 février 2012 15:11:42, Simon R. Proud a écrit :
> Hello all,
> I'm trying to compile GDAL 1.9.0 on Ubuntu 11.04, but am not having any
> luck. I configure with:
> ./configure --with-hdf4 --with-hdf5 --with-grib --with-msg --with-python
> And that works with no problems (I have the MSG wavelet transform code, by
> the way, so that's not the issue). But, when I make I get this fatal error
> part-way through the compilation:
> 
> 
> hdf4imagedataset.cpp: In member function 'void
> HDF4ImageDataset::GetSwatAttrs(int32)': hdf4imagedataset.cpp:1723:41:
> error: 'SWsdid' was not declared in this scope hdf4imagedataset.cpp: In
> member function 'void HDF4ImageDataset::GetGridAttrs(int32)':
> hdf4imagedataset.cpp:1833:41: error: 'GDsdid' was not declared in this
> scope hdf4imagedataset.cpp: In member function 'int
> HDF4ImageDataset::ProcessSwathGeolocation(int32, char**)':
> hdf4imagedataset.cpp:2218:48: warning: deprecated conversion from string
> constant to 'char*' hdf4imagedataset.cpp:2240:51: warning: deprecated
> conversion from string constant to 'char*' hdf4imagedataset.cpp:2252:51:
> warning: deprecated conversion from string constant to 'char*' make[2]:
> *** [../o/hdf4imagedataset.lo] Error 1
> make[2]: Leaving directory `/GDAL/frmts/hdf4'
> make[1]: *** [hdf4-install-obj] Error 2
> make[1]: Leaving directory `/GDAL/frmts'
> make: *** [frmts-target] Error 2
> 
> 
> 
> I have the following HDF5 libraries installed:
> hdf4-tools (v4.2r4-11ubuntu1)
> libhdf4-0 (v4.2r4-11ubuntu1)
> libhdf4-alt-dev (v4.2r4-11ubuntu1)
> libhdf-4-0-alt (v4.2r4-11ubuntu1)
> libhdfeos0 (v2.16v1.00.dfsg.2-4)
> libhdfeos-dev (v2.16v1.00.dfsg.2-4)
> 
> 
> I've tried various combinations libraries (including the -alt and normal
> versions) and nothing seems to change the result, always the same error.
> Compilation completes successfully if I configure --without-hdf4.
> Unfortunately I need the MSG capability for GDAL (and would like
> fillnodata.py also) so cannot just use the Ubuntu GDAL package. So, any
> idea what the problem might be?

Yes, the HDF4 driver contains its own version of hdfeos, which is not 
identical (it has a few custom additions) with the one provided by the 
libhdfeos-dev package. So you should uninstall libhdfeos-dev and it should 
compile fine.

> 
> 
> Thanks,
> Simon.
> 
> 
> 
> 
> 
> 
> ~~~~~~~~~~~~~~~~~~~~~~~~
> Dr Simon Proud
> Post-doc, Satellite Remote Sensing
> University of Copenhagen
> 
> 
> Tel: +45 35 32 25 84
> ~~~~~~~~~~~~~~~~~~~~~~~~
> 
> _______________________________________________
> gdal-dev mailing list
> gdal-dev at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/gdal-dev


More information about the gdal-dev mailing list