From bug-octave-request at bevo dot che dot wisc dot edu Tue Jan 13 20:06:40 2004 Subject: [Compilation error with --without-hdf5 flag] From: "John W. Eaton" To: Petter Risholm Cc: bug-octave at bevo dot che dot wisc dot edu Date: Tue, 13 Jan 2004 18:06:10 -0800 On 13-Jan-2004, Petter Risholm wrote: | Bug report for Octave 2.1.52 configured for i686-pc-linux-gnu | | Description: | ----------- | | * When I run configure with the --without-hdf5 flag I get a error during compilation. | I have hdf5 installed and Octave compiles correctly when I don't use the --without-hdf5 flag, however it didn't compile prior to installing hdf5 (running configure without any flags). | | g++ -c -I. -I.. -I../liboctave -I../src -I../libcruft/misc -I../glob -I../glob -DHAVE_CONFIG_H -mieee-fp -Wall -W -Wshadow -g -O2 ov-list.cc -o ov-list.o | In file included from ov-list.cc:45: | ls-hdf5.h:38: 'hid_t' is used as a type, but is not defined as a type. | ls-hdf5.h: In constructor `hdf5_fstreambase::hdf5_fstreambase()': | ls-hdf5.h:43: `file_id' undeclared (first use this function) | ls-hdf5.h:43: (Each undeclared identifier is reported only once for each | function it appears in.) | ls-hdf5.h: In constructor `hdf5_fstreambase::hdf5_fstreambase(const char*, int, | int)': | ls-hdf5.h:48: `H5F_ACC_RDONLY' undeclared (first use this function) | ls-hdf5.h:48: `H5P_DEFAULT' undeclared (first use this function) | ls-hdf5.h:48: `H5Fopen' undeclared (first use this function) | ls-hdf5.h:50: `H5F_ACC_TRUNC' undeclared (first use this function) | ls-hdf5.h:50: `H5Fcreate' undeclared (first use this function) | ls-hdf5.h: In member function `void hdf5_fstreambase::close()': | ls-hdf5.h:62: `H5Fclose' undeclared (first use this function) | ls-hdf5.h: At global scope: | ls-hdf5.h:142: syntax error before `(' token | ls-hdf5.h:145: `hid_t' was not declared in this scope | ls-hdf5.h:145: syntax error before `,' token | ls-hdf5.h:148: syntax error before `(' token | ls-hdf5.h:151: `hid_t' was not declared in this scope | ls-hdf5.h:151: syntax error before `,' token | | Repeat-By: | --------- | | * ./configure --without-hdf5 && make Please try the following patch. Thanks, jwe src/ChangeLog: 2004-01-13 John W. Eaton * ls-hdf5.h: Surround contents with #if defined (HAVE_HDF5). Index: src/ls-hdf5.h =================================================================== RCS file: /usr/local/cvsroot/octave/src/ls-hdf5.h,v retrieving revision 1.3 diff -u -r1.3 ls-hdf5.h --- src/ls-hdf5.h 6 Jan 2004 21:53:34 -0000 1.3 +++ src/ls-hdf5.h 14 Jan 2004 02:05:29 -0000 at @ -23,6 +23,8 @@ #if !defined (octave_ls_hdf5_h) #define octave_ls_hdf5_h 1 +#if defined (HAVE_HDF5) + // first, we need to define our own dummy stream subclass, since // HDF5 needs to do its own file i/o at @ -162,6 +164,8 @@ #endif +#endif + /* ;;; Local Variables: *** ;;; mode: C++ *** ------------------------------------------------------------- Octave is freely available under the terms of the GNU GPL. Octave's home on the web: http://www.octave.org How to fund new projects: http://www.octave.org/funding.html Subscription information: http://www.octave.org/archive.html -------------------------------------------------------------