Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
diana:windows:building:hdf [2010-02-16 14:59:18]
dages
diana:windows:building:hdf [2022-05-31 09:29:31] (current)
Line 3: Line 3:
 There are binaries available, and they're probably fine, but the headers are not, because HDF4 / HDF5 install different headers depending on which compiler they were built with (which in itself is a bug).  Luckily, building them from source is fairly easy. There are binaries available, and they're probably fine, but the headers are not, because HDF4 / HDF5 install different headers depending on which compiler they were built with (which in itself is a bug).  Luckily, building them from source is fairly easy.
  
-**TODO:** Figure out the exact relationship between these three.  Apparently, HDF4 wants NetCDFand NetCDF wants HDF5...+Yeah, right.  Actually[[windows:building:hdf4|HDF4]] is a nightmareso we've left it out.
  
 ===== NetCDF ===== ===== NetCDF =====
Line 11: Line 11:
   $ LDFLAGS=-L/c/met.no/lib CPPFLAGS=-I/c/met.no/include ./configure --prefix=/c/met.no --disable-f90 --disable-examples   $ LDFLAGS=-L/c/met.no/lib CPPFLAGS=-I/c/met.no/include ./configure --prefix=/c/met.no --disable-f90 --disable-examples
   $ make all install   $ make all install
 +  $ cp COPYRIGHT /c/met.no/copyright/netcdf.txt
  
 <del>Note the ''%%--enable-shared%%'' part; you can leave out ''%%--disable-f90%%'' and ''%%--disable-examples%%'' if you want, but keep ''%%--enable-shared%%''.</del> <del>Note the ''%%--enable-shared%%'' part; you can leave out ''%%--disable-f90%%'' and ''%%--disable-examples%%'' if you want, but keep ''%%--enable-shared%%''.</del>
- 
-===== HDF4 ===== 
- 
-First, get the latest source (currently 4.2r4) from http://www.hdfgroup.org/release4/obtain.html and extract it in a convenient place. 
- 
-HDF4's autoconf infrastructure is outdated and partly broken.  Open ''configure.ac'', look for "Libtool initialization" (around line 660) and replace the following two lines 
- 
-  LT_INIT(dlopen) 
-  LT_OUTPUT 
- 
-with this one: 
- 
-  AC_PROG_LIBTOOL 
- 
-Next, there is a spot in ''configure.ac'' that checks which OS you're running on and bails if it doesn't recognize it...  which is stupid, because it controls code that is only used *only* if you want to use HDF4's own version of NetCDF, which we don't.  We can work around this by changing ''cygwin'' to ''mingw32'' on line 695.  It's wrong, but it doesn't matter, because the result is never used. 
- 
-Then regenerate everything: 
- 
-  $ aclocal 
-  $ libtoolize --copy --force 
-  $ autoheader 
-  $ automake --add-missing --copy --foreign 
-  $ autoconf 
- 
-**XXX** automake warns about ''F77LINK'', check if that requires fixing. 
- 
-Finally, configure, build and install: 
- 
-  $ LDFLAGS=-no-undefined ./configure --prefix=/opt/hdf --enable-shared --disable-fortran --disable-netcdf 
-  $ make all install 
- 
-You //must// specify ''%%--disable-netcdf%%'', otherwise HDF4 will install headers which conflict with NetCDF! 
- 
-**TODO:** check configure options 
  
 ===== HDF5 ===== ===== HDF5 =====
Line 78: Line 45:
   AM_PROG_LIBTOOL   AM_PROG_LIBTOOL
  
-**XXX** alternative: use more recent [[windows:building:autotools autotools]] versions, but this has repercussions for all other components+**XXX** alternative: use more recent [[windows:building:autotools|autotools]] versions, but this has repercussions for all other components
  
 Now we need to regenerate everything: Now we need to regenerate everything:
  
   $ aclocal   $ aclocal
-  $ libtoolize --force+  $ libtoolize --copy --force
   $ autoheader   $ autoheader
-  $ automake --add-missing+  $ automake --add-missing --copy --foreign
   $ autoconf   $ autoconf
  
Line 94: Line 61:
   $ LDFLAGS=-L/c/met.no/lib CPPFLAGS=-I/c/met.no/include ./configure --prefix=/c/met.no --enable-cxx   $ LDFLAGS=-L/c/met.no/lib CPPFLAGS=-I/c/met.no/include ./configure --prefix=/c/met.no --enable-cxx
   $ make all install   $ make all install
 +  $ cp COPYING /c/met.no/copyright/hdf5.txt
  
 **TODO** fix large file support! **TODO** fix large file support!
  • diana/windows/building/hdf.1266332358.txt.gz
  • Last modified: 2022-05-31 09:23:14
  • (external edit)