Re: cannot compile with hdf5
Jaroslav Hajek <highegg <at> gmail.com>
2009-02-02 11:09:10 GMT
On Mon, Feb 2, 2009 at 8:54 AM, Petr Mikulik <mikulik <at> physics.muni.cz> wrote:
> I have tried to compile octave 3.0.4 rc3 tarball, configured with HDF5.
> Octave fails to compile, see below. The same happens also for 3.0.3.
> There are the following libraries under OpenSUSE 11.1:
> libhdf5_hl0-1.8.2-1.1
> hdf5-devel-1.8.2-1.1
> libhdf5-0-1.8.2-1.1
> hdf5-1.8.2-1.1
>
>
> make[2]: Entering directory .../octave-3.0.4/src
> making defaults.h from defaults.h.in
> defaults.h is unchanged
> making oct-conf.h from oct-conf.h.in
> oct-conf.h is unchanged
> g++ -c -fPIC -I. -I.. -I../liboctave -I../src -I../libcruft/misc
> -DHAVE_CONFIG_H -mieee-fp -Wall -W -Wshadow -Wold-style-cast -g -O2
> ls-hdf5.cc -o pic/ls-hdf5.o
> ls-hdf5.cc: In function 'bool hdf5_check_attr(hid_t, const char*)':
> ls-hdf5.cc:146: error: invalid conversion from 'herr_t (**)(hid_t, void*)'
> to 'hid_t'
> ls-hdf5.cc:146: error: invalid conversion from 'void**' to 'herr_t
> (**)(hid_t, void*)'
> /usr/include/H5Epublic.h:173: error: too few arguments to function 'herr_t
> H5Eget_auto2(hid_t, herr_t (**)(hid_t, void*), void**)'
> ls-hdf5.cc:146: error: at this point in file
> /usr/include/H5Epublic.h:174: error: too few arguments to function 'herr_t
> H5Eset_auto2(hid_t, herr_t (*)(hid_t, void*), void*)'
> ls-hdf5.cc:147: error: at this point in file
> ls-hdf5.cc:159: error: invalid conversion from 'herr_t (*)(hid_t, void*)' to
> 'hid_t'
> ls-hdf5.cc:159: error: invalid conversion from 'void*' to 'herr_t (*)(hid_t,
> void*)'
> /usr/include/H5Epublic.h:174: error: too few arguments to function 'herr_t
> H5Eset_auto2(hid_t, herr_t (*)(hid_t, void*), void*)'
> ls-hdf5.cc:159: error: at this point in file
> /usr/include/H5Gpublic.h: In function 'herr_t hdf5_read_next_data(hid_t,
> const char*, void*)':
> /usr/include/H5Gpublic.h:78: error: too few arguments to function 'hid_t
> H5Gopen2(hid_t, const char*, hid_t)'
> ls-hdf5.cc:225: error: at this point in file
> /usr/include/H5Dpublic.h:98: error: too few arguments to function 'hid_t
> H5Dopen2(hid_t, const char*, hid_t)'
> ls-hdf5.cc:235: error: at this point in file
> /usr/include/H5Dpublic.h:98: error: too few arguments to function 'hid_t
> H5Dopen2(hid_t, const char*, hid_t)'
> ls-hdf5.cc:307: error: at this point in file
> /usr/include/H5Gpublic.h: In function 'std::string
> read_hdf5_data(std::istream&, const std::string&, bool&, octave_value&,
> std::string&)':
> /usr/include/H5Gpublic.h:78: error: too few arguments to function 'hid_t
> H5Gopen2(hid_t, const char*, hid_t)'
> ls-hdf5.cc:550: error: at this point in file
> /usr/include/H5Apublic.h: In function 'herr_t hdf5_add_attr(hid_t, const
> char*)':
> /usr/include/H5Apublic.h:45: error: too few arguments to function 'hid_t
> H5Acreate2(hid_t, const char*, hid_t, hid_t, hid_t, hid_t)'
> ls-hdf5.cc:597: error: at this point in file
> /usr/include/H5Dpublic.h: In function 'int save_hdf5_empty(hid_t, const
> char*, dim_vector)':
> /usr/include/H5Dpublic.h:95: error: too few arguments to function 'hid_t
> H5Dcreate2(hid_t, const char*, hid_t, hid_t, hid_t, hid_t, hid_t)'
> ls-hdf5.cc:644: error: at this point in file
> /usr/include/H5Dpublic.h: In function 'int load_hdf5_empty(hid_t, const
> char*, dim_vector&)':
> /usr/include/H5Dpublic.h:98: error: too few arguments to function 'hid_t
> H5Dopen2(hid_t, const char*, hid_t)'
> ls-hdf5.cc:674: error: at this point in file
> /usr/include/H5Gpublic.h: In function 'bool add_hdf5_data(hid_t, const
> octave_value&, const std::string&, const std::string&, bool, bool)':
> /usr/include/H5Gpublic.h:76: error: too few arguments to function 'hid_t
> H5Gcreate2(hid_t, const char*, hid_t, hid_t, hid_t)'
> ls-hdf5.cc:752: error: at this point in file
> /usr/include/H5Dpublic.h:95: error: too few arguments to function 'hid_t
> H5Dcreate2(hid_t, const char*, hid_t, hid_t, hid_t, hid_t, hid_t)'
> ls-hdf5.cc:766: error: at this point in file
> make[2]: *** [pic/ls-hdf5.o] Error 1
>
> ---
> PM
> _______________________________________________
> Bug-octave mailing list
> Bug-octave <at> octave.org
> https://www-old.cae.wisc.edu/mailman/listinfo/bug-octave
>
>
This is a known problem, caused by the incompatible API changes
between HDF5 1.5 and 1.8. I think there's no need to support both the
APIs, but someone needs to modify the relevant code to adapt to the
1.8 API. So far, there has been no volunteer. Apparently hdf5 is not
much used amongst Octave developers/users.
--
--
RNDr. Jaroslav Hajek
computing expert
Aeronautical Research and Test Institute (VZLU)
Prague, Czech Republic
url: www.highegg.matfyz.cz