[Gdal-dev] need help compiling GDAL with HDF5 support

Daniel.Gillespie at noaa.gov Daniel.Gillespie at noaa.gov
Wed Jan 31 10:59:32 EST 2007


Hello.  I am trying to ultimately trying to build Grass with the ability
to readHDF5 files.  I tried to compile GDAL with HDF5 support and ran
into problems in the compilation process.  I believe that the HDF5 build
process was successful, because the HDF5 utilities like gif2h5 are now
available on my system.  

Any advice would be greatly appreciated!

Many thanks,

Dan Gillespie

.......................

Here are some specifics:

Red Hat Linux
GDAL:		gdal-cvs-2006.03.29
HDF5:		hdf5-1.6.5

Here is the configuration file:

./configure --with-hdf5=/usr/local/hdf5/hdf5-1.6.5/hdf/bin --with-php

Here is some of the output items from the configure step that appears to
relate
to HDF5:

checking for SDreaddata in -lmfhdf... no
checking for H5Fopen in -lhdf5... no

GDAL is now configured for i686-pc-linux-gnu

  Installation directory:    /usr/local
  C compiler:                gcc -O2
  C++ compiler:              g++ -O2

  LIBTOOL support:           yes

  LIBZ support:              external
  GRASS support:             no
  CFITSIO support:           no
  PCRaster support:          internal
  NETCDF support:            no
  LIBPNG support:            external
  LIBTIFF support:           external
  LIBGEOTIFF support:        internal
  LIBJPEG support:           external
  LIBGIF support:            external
  OGDI support:              no
  HDF4 support:              no
  HDF5 support:              yes
  KAKADU support:            no
  JASPER support:            no
  ECW support:               no
  MrSID support:             no
  POSTGRESQL support:        yes
  MySQL support:             no
  XERCES support:            no
  ODBC support:              no
  OCI support:               no
  SDE support:               no
  DODS support:              no
  SQLite support:            no
  DWGdirect support          no
  PANORAMA GIS support:      no
  GEOS support:              no

  Statically link PROJ.4:    no

  Traditional Python:        yes
  NG SWIG Bindings:          php

  enable OGR building:       yes


When I got to the make step, there were lots of errors relating to HDF5:

hdf5dataset.cpp:58:18: hdf5.h: No such file or directory
In file included from hdf5dataset.cpp:62:
hdf5dataset.h:59: error: ISO C++ forbids declaration of `hsize_t' with
no type
hdf5dataset.h:59: error: expected `;' before '*' token
hdf5dataset.h:60: error: `hid_t' does not name a type
hdf5dataset.h:61: error: `hid_t' does not name a type
hdf5dataset.h:67: error: `herr_t' does not name a type
hdf5dataset.h:80: error: `hid_t' does not name a type
hdf5dataset.h:81: error: `hid_t' does not name a type
hdf5dataset.h:82: error: `hid_t' does not name a type
hdf5dataset.h:101: error: `hid_t' has not been declared
hdf5dataset.h:101: error: ISO C++ forbids declaration of `parameter'
with no type
hdf5dataset.h:102: error: expected `;' before '(' token
hdf5dataset.cpp: In constructor `HDF5Dataset::HDF5Dataset()':
hdf5dataset.cpp:109: error: `hHDF5' was not declared in this scope
hdf5dataset.cpp:110: error: `hDatasetID' was not declared in this scope
hdf5dataset.cpp:111: error: `hGroupID' was not declared in this scope
hdf5dataset.cpp:109: warning: unused variable 'hHDF5'
hdf5dataset.cpp:110: warning: unused variable 'hDatasetID'
hdf5dataset.cpp:111: warning: unused variable 'hGroupID'
hdf5dataset.cpp: In destructor `virtual HDF5Dataset::~HDF5Dataset()':
hdf5dataset.cpp:123: error: `hHDF5' was not declared in this scope
hdf5dataset.cpp:124: error: `H5Fclose' was not declared in this scope
hdf5dataset.cpp:124: warning: unused variable 'H5Fclose'
hdf5dataset.cpp:125: error: `hGroupID' was not declared in this scope
hdf5dataset.cpp:126: error: `H5Gclose' was not declared in this scope
hdf5dataset.cpp:126: warning: unused variable 'H5Gclose'
hdf5dataset.cpp: At global scope:
hdf5dataset.cpp:146: error: `GDALDataType HDF5Dataset::GetDataType' is
not a static member of `class HDF5Dataset'
hdf5dataset.cpp:146: error: `hid_t' was not declared in this scope
hdf5dataset.cpp:147: error: expected `,' or `;' before '{' token
hdf5dataset.cpp:183: error: `const char*HDF5Dataset::GetDataTypeName' is
not a static member of `class HDF5Dataset'
hdf5dataset.cpp:183: error: `hid_t' was not declared in this scope
hdf5dataset.cpp:184: error: expected `,' or `;' before '{' token
hdf5dataset.cpp: In static member function `static GDALDataset*
HDF5Dataset::Open(GDALOpenInfo*)':
hdf5dataset.cpp:244: error: `H5Fis_hdf5' was not declared in this scope
hdf5dataset.cpp:244: warning: unused variable 'H5Fis_hdf5'
hdf5dataset.cpp:261: error: 'class HDF5Dataset' has no member named 'hHDF5'
hdf5dataset.cpp:262: error: `H5F_ACC_RDONLY' was not declared in this scope
hdf5dataset.cpp:263: error: `H5P_DEFAULT' was not declared in this scope
hdf5dataset.cpp:263: error: `H5Fopen' was not declared in this scope
hdf5dataset.cpp:264: error: 'class HDF5Dataset' has no member named 'hHDF5'
hdf5dataset.cpp:269: error: 'class HDF5Dataset' has no member named
'hGroupID'
hdf5dataset.cpp:269: error: 'class HDF5Dataset' has no member named 'hHDF5'
hdf5dataset.cpp:269: error: `H5Gopen' was not declared in this scope
hdf5dataset.cpp:270: error: 'class HDF5Dataset' has no member named
'hGroupID'
hdf5dataset.cpp:262: warning: unused variable 'H5F_ACC_RDONLY'
hdf5dataset.cpp:263: warning: unused variable 'H5P_DEFAULT'
hdf5dataset.cpp:263: warning: unused variable 'H5Fopen'
hdf5dataset.cpp:269: warning: unused variable 'H5Gopen'
hdf5dataset.cpp: In member function `void
HDF5Dataset::DestroyH5Objects(HDF5GroupObjects*)':
hdf5dataset.cpp:308: error: 'struct HDF5GroupObjects' has no member
named 'paDims'
hdf5dataset.cpp:309: error: 'struct HDF5GroupObjects' has no member
named 'paDims'
hdf5dataset.cpp: At global scope:
hdf5dataset.cpp:396: error: `herr_t' does not name a type
hdf5dataset.cpp:554: error: `herr_t' does not name a type
hdf5dataset.cpp: In member function `CPLErr
HDF5Dataset::CreateMetadata(HDF5GroupObjects*, int)':
hdf5dataset.cpp:683: error: `hid_t' was not declared in this scope
hdf5dataset.cpp:683: error: expected `;' before "hGroupID"
hdf5dataset.cpp:684: error: expected `;' before "hDatasetID"
hdf5dataset.cpp:686: error: `herr_t' was not declared in this scope
hdf5dataset.cpp:686: error: expected `;' before "ret"
hdf5dataset.cpp:700: error: `H5G_GROUP' was not declared in this scope
hdf5dataset.cpp:702: error: `hGroupID' was not declared in this scope
hdf5dataset.cpp:702: error: `hHDF5' was not declared in this scope
hdf5dataset.cpp:702: error: `H5Gopen' was not declared in this scope
hdf5dataset.cpp:704: error: `ret' was not declared in this scope
hdf5dataset.cpp:705: error: `HDF5AttrIterate' was not declared in this scope
hdf5dataset.cpp:705: error: `H5Aiterate' was not declared in this scope
hdf5dataset.cpp:706: error: `H5Gclose' was not declared in this scope
hdf5dataset.cpp:705: warning: unused variable 'HDF5AttrIterate'
hdf5dataset.cpp:705: warning: unused variable 'H5Aiterate'
hdf5dataset.cpp:706: warning: unused variable 'H5Gclose'
hdf5dataset.cpp:711: error: `H5G_DATASET' was not declared in this scope
hdf5dataset.cpp:713: error: `hDatasetID' was not declared in this scope
hdf5dataset.cpp:713: error: `H5Dopen' was not declared in this scope
hdf5dataset.cpp:716: error: `ret' was not declared in this scope
hdf5dataset.cpp:717: error: `HDF5AttrIterate' was not declared in this scope
hdf5dataset.cpp:717: error: `H5Aiterate' was not declared in this scope
hdf5dataset.cpp:718: error: `H5Dclose' was not declared in this scope
hdf5dataset.cpp:717: warning: unused variable 'HDF5AttrIterate'
hdf5dataset.cpp:717: warning: unused variable 'H5Aiterate'
hdf5dataset.cpp:718: warning: unused variable 'H5Dclose'
hdf5dataset.cpp:700: warning: unused variable 'H5G_GROUP'
hdf5dataset.cpp:702: warning: unused variable 'H5Gopen'
hdf5dataset.cpp:711: warning: unused variable 'H5G_DATASET'
hdf5dataset.cpp:713: warning: unused variable 'H5Dopen'
hdf5dataset.cpp:686: warning: unused variable 'herr_t'
hdf5dataset.cpp: In member function `HDF5GroupObjects*
HDF5Dataset::HDF5FindDatasetObjectsbyPath(HDF5GroupObjects*, char*)':
hdf5dataset.cpp:742: error: `H5G_DATASET' was not declared in this scope
hdf5dataset.cpp:742: warning: unused variable 'H5G_DATASET'
hdf5dataset.cpp: In member function `HDF5GroupObjects*
HDF5Dataset::HDF5FindDatasetObjects(HDF5GroupObjects*, char*)':
hdf5dataset.cpp:778: error: `H5G_DATASET' was not declared in this scope
hdf5dataset.cpp:778: warning: unused variable 'H5G_DATASET'
hdf5dataset.cpp: In member function `CPLErr
HDF5Dataset::HDF5ListGroupObjects(HDF5GroupObjects*, int)':
hdf5dataset.cpp:823: error: `H5G_GROUP' was not declared in this scope
hdf5dataset.cpp:830: error: `H5G_DATASET' was not declared in this scope
hdf5dataset.cpp:836: error: 'struct HDF5GroupObjects' has no member
named 'paDims'
hdf5dataset.cpp:837: error: 'struct HDF5GroupObjects' has no member
named 'paDims'
hdf5dataset.cpp:838: error: 'struct HDF5GroupObjects' has no member
named 'paDims'
hdf5dataset.cpp:843: error: 'struct HDF5GroupObjects' has no member
named 'paDims'
hdf5dataset.cpp:844: error: 'struct HDF5GroupObjects' has no member
named 'paDims'
hdf5dataset.cpp:868: error: 'class HDF5Dataset' has no member named
'GetDataTypeName'
hdf5dataset.cpp:869: error: 'struct HDF5GroupObjects' has no member
named 'native'
hdf5dataset.cpp:830: warning: unused variable 'H5G_DATASET'
hdf5dataset.cpp: In member function `CPLErr
HDF5Dataset::ReadGlobalAttributes(int)':
hdf5dataset.cpp:889: error: `H5G_GROUP' was not declared in this scope
hdf5dataset.cpp:893: error: `hHDF5' was not declared in this scope
hdf5dataset.cpp:893: warning: unused variable 'hHDF5'
hdf5dataset.cpp:898: error: `hGroupID' was not declared in this scope
hdf5dataset.cpp:898: error: `hHDF5' was not declared in this scope
hdf5dataset.cpp:898: error: `H5Gopen' was not declared in this scope
hdf5dataset.cpp:904: error: `H5Aget_num_attrs' was not declared in this
scope
hdf5dataset.cpp:906: error: `hsize_t' was not declared in this scope
hdf5dataset.cpp:906: error: expected primary-expression before ')' token
hdf5dataset.cpp:906: error: `H5Gget_num_objs' was not declared in this scope
hdf5dataset.cpp:913: error: `HDF5CreateGroupObjs' was not declared in
this scope
hdf5dataset.cpp:913: error: `H5Giterate' was not declared in this scope
hdf5dataset.cpp:913: warning: unused variable 'HDF5CreateGroupObjs'
hdf5dataset.cpp:913: warning: unused variable 'H5Giterate'
hdf5dataset.cpp:889: warning: unused variable 'H5G_GROUP'
hdf5dataset.cpp:898: warning: unused variable 'hHDF5'
hdf5dataset.cpp:898: warning: unused variable 'H5Gopen'
hdf5dataset.cpp:904: warning: unused variable 'H5Aget_num_attrs'
hdf5dataset.cpp:906: warning: unused variable 'hsize_t'
hdf5dataset.cpp:906: warning: unused variable 'H5Gget_num_objs'
make[2]: *** [../o/hdf5dataset.o] Error 1
make[2]: Leaving directory
`/root/grassinst/software/gdal-stuff/gdal-cvs-2006.03.29/frmts/hdf5'
make[1]: *** [hdf5-install-obj] Error 2
make[1]: Leaving directory
`/root/grassinst/software/gdal-stuff/gdal-cvs-2006.03.29/frmts'
make: *** [frmts-target] Error 2







More information about the Gdal-dev mailing list