2005-08-20 04:15:36 +08:00
|
|
|
************************************************************************
|
|
|
|
HDF5 Build and Install Instructions for Cygwin
|
|
|
|
************************************************************************
|
|
|
|
|
2021-12-07 22:27:29 +08:00
|
|
|
This document is a instruction on how to build, test and install HDF5 library on
|
2020-02-27 03:54:34 +08:00
|
|
|
Cygwin. See detailed information in hdf5/INSTALL.
|
2014-06-12 02:51:18 +08:00
|
|
|
|
|
|
|
NOTE: hdf5 can be built with CMake, see the INSTALL_CMake.txt file for more guidance.
|
|
|
|
|
2005-08-20 04:15:36 +08:00
|
|
|
Preconditions:
|
|
|
|
--------------
|
|
|
|
|
2014-06-12 02:51:18 +08:00
|
|
|
1. Installed Cygwin 1.7.25 or higher
|
2005-08-20 04:15:36 +08:00
|
|
|
|
2020-02-27 03:54:34 +08:00
|
|
|
To install the Cygwin net release, go to http://www.cygwin.com and
|
2014-06-12 02:51:18 +08:00
|
|
|
click on "setup-x86.exe" (32-bit installation) under the heading
|
2020-02-27 03:54:34 +08:00
|
|
|
"Current Cygwin DLL version". This will download a GUI
|
|
|
|
installer called setup-x86.exe which can be run to download a complete
|
|
|
|
Cygwin installation via the internet. Then follow the instructions
|
2005-08-20 04:15:36 +08:00
|
|
|
on each screen to install Cygwin.
|
|
|
|
|
2020-02-27 03:54:34 +08:00
|
|
|
Cygwin uses packages to manage installing various software. Users can
|
2005-08-20 04:15:36 +08:00
|
|
|
choose to install or uninstall certain packages by running setup.exe.
|
2020-02-27 03:54:34 +08:00
|
|
|
http://www.cygwin.com/packages/ provides detailed information about
|
2005-08-20 04:15:36 +08:00
|
|
|
Cygwin packages.
|
|
|
|
|
2014-06-12 02:51:18 +08:00
|
|
|
Most required dependencies can be satisfied by installing all packages in
|
|
|
|
the "Devel" category. However, please verify that you have installed all
|
|
|
|
packages listed below.
|
2005-08-20 04:15:36 +08:00
|
|
|
|
2014-06-12 02:51:18 +08:00
|
|
|
2. Compilers, Libraries and Utilities Installed
|
2005-08-20 04:15:36 +08:00
|
|
|
|
2014-06-12 02:51:18 +08:00
|
|
|
2.1 Compilers Supported
|
2020-02-27 03:54:34 +08:00
|
|
|
|
2014-06-12 02:51:18 +08:00
|
|
|
The following compilers are supported by HDF5 and included in the Cygwin
|
|
|
|
package system:
|
2015-04-18 06:24:47 +08:00
|
|
|
gcc (4.7.3 and 4.9.2), which includes:
|
2010-06-02 03:22:18 +08:00
|
|
|
gcc4-core : C compiler
|
|
|
|
gcc4-g++ : C++ compiler
|
|
|
|
gcc4-fortran : fortran compiler
|
2020-02-27 03:54:34 +08:00
|
|
|
|
2005-08-20 04:15:36 +08:00
|
|
|
|
2014-06-12 02:51:18 +08:00
|
|
|
2.1.1 Using Compilers Not Supported
|
2020-02-27 03:54:34 +08:00
|
|
|
|
2014-06-12 02:51:18 +08:00
|
|
|
By default the current configuration uses vendor compilers; to use
|
|
|
|
another compiler run the following commands before running
|
2020-02-27 03:54:34 +08:00
|
|
|
configure:
|
|
|
|
|
2014-06-12 02:51:18 +08:00
|
|
|
setenv CC "foo -flags"
|
|
|
|
setenv FC "fffoo -flags"
|
2005-08-20 04:15:36 +08:00
|
|
|
|
2020-02-27 03:54:34 +08:00
|
|
|
For example, if users want to use pgf90 as fortran compiler, then
|
2005-08-20 04:15:36 +08:00
|
|
|
|
|
|
|
setenv FC pgf90
|
|
|
|
|
2014-06-12 02:51:18 +08:00
|
|
|
See the configure help page (configure --help) for a list of
|
|
|
|
environment variables that have an affect on building the
|
|
|
|
library.
|
2020-02-27 03:54:34 +08:00
|
|
|
|
2014-06-12 02:51:18 +08:00
|
|
|
2.2 HDF5 External Library Dependencies
|
|
|
|
|
|
|
|
2.2.1 Zlib
|
2005-08-20 04:15:36 +08:00
|
|
|
|
2014-06-12 02:51:18 +08:00
|
|
|
zlib-1.2.5 or later is supported and tested on Cygwin.
|
2005-08-20 04:15:36 +08:00
|
|
|
|
2014-06-12 02:51:18 +08:00
|
|
|
2.2.2 Szip
|
2005-08-20 04:15:36 +08:00
|
|
|
The HDF5 library has a predefined compression filter that uses
|
|
|
|
the extended-Rice lossless compression algorithm for chunked
|
2021-12-07 22:27:29 +08:00
|
|
|
datasets. For more information on Szip compression, license terms,
|
2018-10-05 05:48:34 +08:00
|
|
|
and obtaining the Szip source code, see:
|
|
|
|
|
|
|
|
https://portal.hdfgroup.org/display/HDF5/Szip+Compression+in+HDF+Products
|
2020-02-27 03:54:34 +08:00
|
|
|
|
|
|
|
|
2014-06-12 02:51:18 +08:00
|
|
|
2.3 Additional Utilities
|
2020-02-27 03:54:34 +08:00
|
|
|
|
2014-06-12 02:51:18 +08:00
|
|
|
The following standard utilities are also required to build and test HDF5:
|
2020-02-27 03:54:34 +08:00
|
|
|
|
2014-06-12 02:51:18 +08:00
|
|
|
bison : yacc implementation
|
|
|
|
flex : flex utility
|
|
|
|
make : make utility
|
2020-02-27 03:54:34 +08:00
|
|
|
|
2014-06-12 02:51:18 +08:00
|
|
|
2.4 Alternate Build Process
|
2020-02-27 03:54:34 +08:00
|
|
|
|
|
|
|
Download the CMake package and follow the notes in the "INSTALL_CMake.txt"
|
2014-06-12 02:51:18 +08:00
|
|
|
file to build HDF5 with the CMake utilities.
|
2020-02-27 03:54:34 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
2014-06-12 02:51:18 +08:00
|
|
|
Build, Test and Install HDF5 on Cygwin
|
|
|
|
--------------------------------------
|
2005-08-20 04:15:36 +08:00
|
|
|
|
|
|
|
1. Get HDF5 source code package
|
|
|
|
Users can download HDF5 source code package from HDF website
|
2020-02-27 03:54:34 +08:00
|
|
|
(http://hdfgroup.org).
|
|
|
|
|
2005-08-20 04:15:36 +08:00
|
|
|
2. Unpacking the distribution
|
|
|
|
|
|
|
|
The HDF5 source code is distributed in a variety of formats which
|
2020-02-27 03:54:34 +08:00
|
|
|
can be unpacked with the following commands, each of which creates
|
|
|
|
an `hdf5-1.13.x' directory.
|
2005-08-20 04:15:36 +08:00
|
|
|
|
|
|
|
2.1 Non-compressed tar archive (*.tar)
|
|
|
|
|
2020-02-27 03:54:34 +08:00
|
|
|
$ tar xf hdf5-1.13.x.tar
|
2005-08-20 04:15:36 +08:00
|
|
|
|
|
|
|
2.2 Gzip'd tar archive (*.tar.gz)
|
|
|
|
|
2020-02-27 03:54:34 +08:00
|
|
|
$ gunzip < hdf5-1.13.x.tar.gz | tar xf -
|
2005-08-20 04:15:36 +08:00
|
|
|
|
|
|
|
2.3 Bzip'd tar archive (*.tar.bz2)
|
|
|
|
|
2020-02-27 03:54:34 +08:00
|
|
|
$ bunzip2 < hdf5-1.13.x.tar.bz2 | tar xf -
|
2008-05-17 02:48:26 +08:00
|
|
|
|
|
|
|
2. Setup Environment
|
|
|
|
|
|
|
|
In Cygwin, most compilers and setting are automatically detected during
|
2020-02-27 03:54:34 +08:00
|
|
|
the configure script. However, if you are building Fortran we recommend
|
|
|
|
that you explicitly set the "FC" variable in your environment to use the
|
2010-06-02 03:22:18 +08:00
|
|
|
gfortran compiler. For example, issue the command:
|
2020-02-27 03:54:34 +08:00
|
|
|
|
2010-06-02 03:22:18 +08:00
|
|
|
$ export FC=gfortran
|
2020-02-27 03:54:34 +08:00
|
|
|
|
|
|
|
4. Configuring
|
|
|
|
|
|
|
|
Notes: See detailed information in hdf5/release_docs/INSTALL,
|
|
|
|
part 5. Full installation instructions for source
|
2005-08-20 04:15:36 +08:00
|
|
|
distributions
|
|
|
|
|
2020-02-27 03:54:34 +08:00
|
|
|
The host configuration file for cygwin i686-pc-cygwin is located
|
|
|
|
in the `config' directory and are based on architecture name,
|
|
|
|
vendor name, and operating system which are displayed near the
|
2005-08-20 04:15:36 +08:00
|
|
|
beginning of the `configure' output. The host config file influences
|
2020-02-27 03:54:34 +08:00
|
|
|
the behavior of configure by setting or augmenting shell variables.
|
|
|
|
|
2005-08-20 04:15:36 +08:00
|
|
|
In short,
|
2020-02-27 03:54:34 +08:00
|
|
|
|
|
|
|
To configure HDF5 C Library, using
|
|
|
|
|
2005-08-20 04:15:36 +08:00
|
|
|
$ ./configure
|
2020-02-27 03:54:34 +08:00
|
|
|
|
2008-05-17 02:48:26 +08:00
|
|
|
To configure HDF5 C/C++ Library, using
|
2005-08-20 04:15:36 +08:00
|
|
|
|
|
|
|
$ ./configure --enable-cxx
|
2020-02-27 03:54:34 +08:00
|
|
|
|
2008-05-17 02:48:26 +08:00
|
|
|
To configure HDF5 C/Fortran Library, using
|
2005-08-20 04:15:36 +08:00
|
|
|
|
|
|
|
$ ./configure --enable-fortran
|
2020-02-27 03:54:34 +08:00
|
|
|
|
2008-05-17 02:48:26 +08:00
|
|
|
To configure HDF5 C with Szip library, using
|
2005-08-20 04:15:36 +08:00
|
|
|
|
|
|
|
$ ./configure --with-szlib="path to szlib"
|
2020-02-27 03:54:34 +08:00
|
|
|
|
|
|
|
For example, if szip library was installed in the directory
|
2005-08-20 04:15:36 +08:00
|
|
|
/cygdrive/c/szip, which is parent directory of "include" and
|
2020-02-27 03:54:34 +08:00
|
|
|
"lib", then the following command will configure HDF5 C library
|
2005-08-20 04:15:36 +08:00
|
|
|
with szip enabled:
|
2020-02-27 03:54:34 +08:00
|
|
|
|
2005-08-20 04:15:36 +08:00
|
|
|
$ ./configure --with-szlib=/cygdrive/c/szip
|
2020-02-27 03:54:34 +08:00
|
|
|
|
2008-05-17 02:48:26 +08:00
|
|
|
To configure HDF5 C without Zlib,
|
2020-02-27 03:54:34 +08:00
|
|
|
|
2005-08-20 04:15:36 +08:00
|
|
|
To disable zlib, using
|
|
|
|
|
|
|
|
$ ./configure --without-zlib
|
2020-02-27 03:54:34 +08:00
|
|
|
|
2008-05-17 02:48:26 +08:00
|
|
|
Two ways to configure HDF5 C with specified Zlib
|
2020-02-27 03:54:34 +08:00
|
|
|
|
2008-05-17 02:48:26 +08:00
|
|
|
Using
|
2005-08-20 04:15:36 +08:00
|
|
|
|
|
|
|
$ ./configure --with-zlib=INCDIR,LIBDIR
|
|
|
|
|
|
|
|
For example, if the zlib library is installed in
|
|
|
|
/cygdrive/c/usr, which is the parent directory of directories
|
2020-02-27 03:54:34 +08:00
|
|
|
"include" and "lib",
|
2005-08-20 04:15:36 +08:00
|
|
|
|
|
|
|
$ ./configure --with-zlib=/cygdrive/c/usr/include,/cygdrive/c/usr/lib
|
|
|
|
|
2008-05-17 02:48:26 +08:00
|
|
|
Through the CPPFLAGS and LDFLAGS Variables
|
2020-02-27 03:54:34 +08:00
|
|
|
|
|
|
|
For example, if zlib was installed in the directory
|
|
|
|
/cygdrive/c/usr then using the following command to configure
|
2005-08-20 04:15:36 +08:00
|
|
|
HDF5 with zib
|
|
|
|
|
|
|
|
$ CPPFLAGS=-I/cygdrive/c/usr/include \
|
|
|
|
$ LDFLAGS=-L/cygdrive/c/usr/lib \
|
|
|
|
$ ./configure
|
|
|
|
|
2020-02-27 03:54:34 +08:00
|
|
|
To specify the installation directories, using
|
2005-08-20 04:15:36 +08:00
|
|
|
|
|
|
|
$ ./configure --prefix="path for installation"
|
2020-02-27 03:54:34 +08:00
|
|
|
|
|
|
|
By default, HDF5 library, header files, examples, and
|
2005-08-20 04:15:36 +08:00
|
|
|
support programs will be installed in /usr/local/lib,
|
|
|
|
/usr/local/include, /usr/local/doc/hdf5/examples, and
|
2020-02-27 03:54:34 +08:00
|
|
|
/usr/local/bin. To use a path other than /usr/local specify
|
2005-08-20 04:15:36 +08:00
|
|
|
the path with the `--prefix=PATH' switch as in the above
|
|
|
|
command.
|
|
|
|
|
2020-02-27 03:54:34 +08:00
|
|
|
Combination of Switches
|
2005-08-20 04:15:36 +08:00
|
|
|
|
2020-02-27 03:54:34 +08:00
|
|
|
All of the above switches can be combined together. For
|
|
|
|
example, if users want to configure HDF5 C/C++/Fortran
|
|
|
|
library with szip library enabled, with zlib library at
|
|
|
|
/cygdrive/c/usr/, and install HDF5 into directory
|
2011-08-10 02:55:31 +08:00
|
|
|
/cygdrive/c/hdf5 using gcc/g++ as C/C++ compiler and gfortran
|
2005-08-20 04:15:36 +08:00
|
|
|
as fortran compiler
|
2020-02-27 03:54:34 +08:00
|
|
|
|
2005-08-20 04:15:36 +08:00
|
|
|
$ ./configure
|
|
|
|
--with-szlib=/cygdrive/c/szip
|
|
|
|
--with-zlib=/cygdrive/c/usr/include,/cygdrive/c/usr/lib
|
|
|
|
--prefix=/cygdrive/c/hdf5
|
|
|
|
--enable-cxx
|
2020-02-27 03:54:34 +08:00
|
|
|
--enable-fortran
|
2005-08-20 04:15:36 +08:00
|
|
|
<"If no more switches, then hit Enter">
|
|
|
|
|
|
|
|
Notes: The command format above is for readilibity. In practice,
|
|
|
|
please type in the command above with at least one
|
2020-02-27 03:54:34 +08:00
|
|
|
space between each line, No "Enter" until users finish
|
|
|
|
the switches and want to run the configure.
|
|
|
|
|
2005-08-20 04:15:36 +08:00
|
|
|
|
|
|
|
or do it through CPPFLAGS and LDFLAGS variables:
|
2020-02-27 03:54:34 +08:00
|
|
|
|
2005-08-20 04:15:36 +08:00
|
|
|
$ CPPFLAGS=-I/cygdrive/c/usr/include \
|
|
|
|
$ LDFLAGS=-L/cygdrive/c/usr/lib \
|
|
|
|
|
|
|
|
$ ./configure
|
|
|
|
--with-szlib=/cygdrive/c/szip
|
|
|
|
--prefix=/cygdrive/c/hdf5
|
|
|
|
--enable-cxx
|
2020-02-27 03:54:34 +08:00
|
|
|
--enable-fortran
|
2005-08-20 04:15:36 +08:00
|
|
|
<"If no more switches, then hit Enter">
|
2020-02-27 03:54:34 +08:00
|
|
|
|
2008-05-17 02:48:26 +08:00
|
|
|
5. Make and Make Check
|
2005-08-20 04:15:36 +08:00
|
|
|
|
|
|
|
After configuration is done successfully, run the following series of
|
|
|
|
commands to build, test and install HDF5
|
2020-02-27 03:54:34 +08:00
|
|
|
|
2005-08-20 04:15:36 +08:00
|
|
|
$ make > "output file name"
|
|
|
|
$ make check > "output file name"
|
2020-02-27 03:54:34 +08:00
|
|
|
|
2005-08-20 04:15:36 +08:00
|
|
|
Before run "make install", check output file for "make check", there
|
|
|
|
should be no failures at all.
|
|
|
|
|
2008-05-17 02:48:26 +08:00
|
|
|
6. Make Install
|
2005-08-20 04:15:36 +08:00
|
|
|
|
|
|
|
$ make install > "output file name"
|
2020-02-27 03:54:34 +08:00
|
|
|
|
|
|
|
|
2008-05-17 02:48:26 +08:00
|
|
|
7. Check installed HDF5 library
|
2005-08-20 04:15:36 +08:00
|
|
|
|
2020-02-27 03:54:34 +08:00
|
|
|
After step 6, go to your installation directory, there should be
|
2005-08-20 04:15:36 +08:00
|
|
|
three subdirectories: "bin" "include" and "lib".
|
|
|
|
|
2020-02-27 03:54:34 +08:00
|
|
|
8. Known Problems
|
|
|
|
|
2013-09-07 01:59:07 +08:00
|
|
|
dt_arith tests may fail due to the use of fork. This is a known issue
|
2014-06-05 05:22:31 +08:00
|
|
|
with cygwin on Windows.
|
2005-08-20 04:15:36 +08:00
|
|
|
|
2015-04-18 06:24:47 +08:00
|
|
|
"make check" fails when building shared lib files is enabled. The default
|
|
|
|
on Cygwin has been changed to disable shared. It can be enabled with
|
2020-02-27 03:54:34 +08:00
|
|
|
the --enable-shared configure option but is likely to fail "make check"
|
2015-04-18 06:24:47 +08:00
|
|
|
with GCC compilers.
|
|
|
|
|
2005-08-20 04:15:36 +08:00
|
|
|
-----------------------------------------------------------------------
|
|
|
|
|
2018-10-05 05:48:34 +08:00
|
|
|
HDF Forum: https://forum.hdfgroup.org/
|
|
|
|
HDF Helpdesk: https://portal.hdfgroup.org/display/support/The+HDF+Help+Desk
|