Skip to content

Commit

Permalink
Update and add INSTALL files and versions in docs (#522)
Browse files Browse the repository at this point in the history
  • Loading branch information
byrnHDF authored Feb 13, 2024
1 parent af34bdd commit bb9feba
Show file tree
Hide file tree
Showing 10 changed files with 295 additions and 261 deletions.
8 changes: 4 additions & 4 deletions HDF4Examples/Using_CMake.txt
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ I. Preconditions
========================================================================

1. We suggest you obtain the latest CMake for windows from the Kitware
web site. The HDF 4.2.x product requires a minimum CMake version
web site. The HDF 4.3.x product requires a minimum CMake version
of 3.12.

2. You have installed the HDF4 library built with CMake, by executing
Expand All @@ -40,7 +40,7 @@ I. Preconditions

3. Set the environment variable HDF4_DIR to the installed location of
the config files for HDF4. On Windows:
HDF4_ROOT=C:/Program Files/HDF_Group/HDF/4.2.x/
HDF4_ROOT=C:/Program Files/HDF_Group/HDF/4.3.x/

(Note there are no quote characters used on Windows and all platforms
use forward slashes)
Expand Down Expand Up @@ -180,11 +180,11 @@ III. Using HDF4 Libraries with Visual Studio 2008 (no longer supported)
and select "x64".

1.2 Find the box "Show directories for", choose "Include files", add the
header path (i.e. c:\Program Files\HDF Group\HDF4\hdf4.2.x\include)
header path (i.e. c:\Program Files\HDF Group\HDF4\hdf4.3.x\include)
to the included directories.

1.3 Find the box "Show directories for", choose "Library files", add the
library path (i.e. c:\Program Files\HDF Group\HDF4\hdf4.2.x\lib)
library path (i.e. c:\Program Files\HDF Group\HDF4\hdf4.3.x\lib)
to the library directories.

1.4 If using Fortran libraries, you will also need to setup the path
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ HDF 4.3.0 (February 2024)
* We will no longer deploy undocumented, internal header files (the public, documented HDF4 API will not be affected)

The 4.2 maintenance line will be retired when 4.3.0 releases. There are no
more planned HDF4 4.2.x releases.
more planned HDF4 4.3.x releases.

HDF 4.4.0 (February 2025)
* We will drop support for FORTRAN 77 and move to modern Fortran (2003 or 2008)
Expand Down
4 changes: 2 additions & 2 deletions config/cmake/scripts/HDF4config.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,9 @@ set (CTEST_SOURCE_VERSEXT "-1, currently under development")
##############################################################################
# handle input parameters to script.
#BUILD_GENERATOR - which CMake generator to use, required
#INSTALLDIR - HDF-4.2.x root folder
#INSTALLDIR - HDF-4.3.x root folder
#CTEST_CONFIGURATION_TYPE - Release, Debug, RelWithDebInfo
#CTEST_SOURCE_NAME - name of source folder; HDF-4.2.x
#CTEST_SOURCE_NAME - name of source folder; HDF-4.3.x
#STATIC_ONLY - Default is YES
#FORTRAN_LIBRARIES - Default is NO
#NO_MAC_FORTRAN - set to TRUE to allow shared libs on a Mac
Expand Down
211 changes: 36 additions & 175 deletions release_notes/INSTALL
Original file line number Diff line number Diff line change
@@ -1,192 +1,53 @@
*************************************************************************
* Installation Instructions for HDF4 *
*************************************************************************

Installation Instructions for HDF4 on Unix and Mac OSX Platforms
===================================================================
Instructions for the Installation of HDF4 Software
==================================================

CONTENTS

1. Third-party Software Requirements
2. Optional Szip Compression Library
3. HDF4 Source Code and Precompiled Binaries
4. Unix and Mac OSX Configuration and Build
5. Using HDF/MFHDF Libraries with the netCDF Library (libnetcdf.a)



1. Third-party Software Requirements
=================================

C and Fortran compilers. If a Fortran compiler is not available, use
the --disable-fortran configure flag to build the HDF4 C library and
utilities. For the list of the supported compilers see RELEASE.txt in the
release_notes directory.

JPEG Distribution Release 6b or later (libjpeg.a(so)). The source code can
be downloaded from http://www.ijg.org/.

ZLIB 1.1.4(libz.a) or later. The software can be downloaded from: https://zlib.net/



2. Optional Szip Compression Library
=================================

HDF4 may be configured to use the Szip compression library. For more
information about the Szip library, see:

https://portal.hdfgroup.org/display/HDF4/Szip+Compression+in+HDF+Products

The Szip compression library is free for non-commercial use. For information
regarding commercial use, see:

https://portal.hdfgroup.org/display/HDF4/Szip+Copyright+and+License+Statement%2C+as+Distributed+in+the+HDF+Source+Code



3. HDF4 Source Code and Precompiled Binaries
=========================================

The HDF Group provides source code and pre-compiled binaries from the
HDF4 download page:

https://portal.hdfgroup.org/display/support/Download+HDF4

As of HDF 4.2.6, binaries are packed with the ZLIB, JPEG, and Szip libraries
that were used to build the binaries.

HDF4 pre-built utilities come with Szip compression. To use these binaries,
you must install the Szip library on your system.

To build the Szip library, follow the instructions in the Szip source code
distribution, which can be obtained from:

https://portal.hdfgroup.org/display/HDF4/Szip+Compression+in+HDF+Products



4. Unix and Mac OSX Configuration and Build
=======================================

See RELEASE.txt in the release_notes/ directory for the list of platforms
tested for this release.

Before You Start:
This file provides instructions for installing the HDF4 software.

1) Make sure that the ZLIB and JPEG libraries are installed on your
system.
For help with installing, questions can be posted to the HDF Forum or sent to the HDF Helpdesk:

2) Optional: Install the Szip version 2.1 library (you may use
Szip 2.0 binaries).
HDF Forum: https://forum.hdfgroup.org/
HDF Helpdesk: https://hdfgroup.atlassian.net/servicedesk/customer/portals

3) Extract the source from the hdf-X.Y.Z.tar file and change
directory to hdf-X.Y.Z.

4) Fortran Notes:
4.a) g77 may require compiler flag, FFLAGS, "-fno-second-underscore"

To Configure:

4) Use the configure command in the top level HDF4 directory hdf-X.Y.Z:

./configure --with-zlib=/path_to_ZLIB_install_directory
--with-jpeg=/path_to_JPEG_install_directory
[--with-szlib=/path_to_SZIP_install_directory]
--prefix=/path_to_HDF4_install_directory

* Please note that when the szlib option is not used, the Szip
library will not be configured in and Szip compression will not
be enabled.
* If your system has the ZLIB and/or JPEG libraries installed under a
system library directory (such as /usr/lib), configure will
automatically find the library. In this case, the corresponding
configure flag may be omitted.
* Note that --prefix defines where the installation path is.
The default is set as <hdf4_build_directory>/hdf4.

To Build and Test:

5) To build the library:

gmake >& gmake.out

6) To build and run the tests:

gmake check >& check.out

To Install:

7) To install the HDF4 library and tools:

gmake install

8) To install C and Fortran examples:

gmake install-examples

9) To test the installation:

gmake installcheck

10) By default, the current configuration uses vendor compilers; to use
another compiler, run the following commands before running configure:

setenv CC "foo -flags"
setenv F77 "fffoo -flags"

See the configure help page (configure --help) for a list of
environment variables that have an affect on building the library.

11) You may build HDF4 in a directory other than hdf-X.Y.Z by using
the "srcdir" option. Simply create a build directory and type:

<path_to_hdf-X.Y.Z>/configure ...

where "..." are your configuration options.



5. Using HDF/MFHDF Libraries with the netCDF Library (libnetcdf.a)
===============================================================

To use the HDF/MFHDF libraries (libdf.a, libmfhdf.a) with the
netCDF library (libnetcdf.a), the HDF4 distribution must be configured
with the --disable-netcdf configuration flag.

When this flag is used, the HDF versions of the C netCDF functions
(as of netCDF version 2.3.2) are renamed from ncxxx to sd_ncxxx,
and HDF Fortran netCDF wrappers are disabled to avoid name clashes with
the netCDF C and Fortran functions from libnetcdf.a.
CONTENTS
--------
1. Obtaining HDF4
2. Third-party Software Requirements
3. Optional Szip Compression Library
4. HDF4 Source Code and Precompiled Binaries
5. Build and Install HDF4 on Unix and Mac OSX Platforms with autotools
6. Build and Install HDF4 C and Fortran Libraries and tools with CMake

Please report all problems to help@hdfgroup.org.


6. Windows Configuration and Build
===============================
*****************************************************************************

See RELEASE.txt in the release_notes/ directory for the list of platforms
tested for this release.
1. Obtaining HDF4
The latest supported public releases of HDF4 are available on
https://github.com/HDFGroup/hdf4.

We now recommend that users build, test, and install HDF4 using CMake.
2. Third-party Software Requirements
JPEG Distribution Release 6b or later. The source code can
be downloaded from "https://www.ijg.org/filesz".

Instructions for building and testing HDF4 using CMake can be found in the
INSTALL_CMake.txt file found in this folder.
ZLIB 1.1.4 or later. The software can be downloaded from: "https://github.com/madler/zlib.git"

For instructions on building and testing an application with HDF4, see the
USING_HDF4_CMake.txt file found in this folder.
3. Optional Szip Compression Library
HDF4 may be configured to use the Szip compression library. The
open source software can be downloaded from: "https://github.com/MathisRosenhauer/libaec.git"

Users who want to build and run an application with HDF4 in Visual Studio
without using CMake should consult the USING_HDF4_VS.txt file.
4. HDF4 Source Code and Precompiled Binaries
The HDF Group provides source code and pre-compiled binaries from the
HDF4 github releases page:

Additional Third-party Software Requirements:
https://github.com/HDFGroup/hdf4/releases

1) Flex and Bison programs are required to regenerate the ncgen parsers.
This is not required to build the library and is only necessary if you
change the input files.

2) The Win flex-bison project, a port of Flex & Bison tools
to the Windows platform, is recommended. Download from:
http://sourceforge.net/projects/winflexbison
5. Build and Install HDF4 on Unix and Mac OSX Platforms with autotools
see the release_notes/INSTALL_Autotools.txt file.

3) CMake version 2.8.11.1 or higher is needed to use Win flex-bison.
Using an earlier version of CMake will require renaming the executables
without the "win_" prefix.
6. Build and Install HDF4 C and Fortran Libraries and tools with CMake
see the release_notes/INSTALL_CMake.txt file.

Loading

0 comments on commit bb9feba

Please sign in to comment.