From bb9febaa1eab1e5a8986a8a7c3b85913ed637b96 Mon Sep 17 00:00:00 2001 From: Allen Byrne <50328838+byrnHDF@users.noreply.github.com> Date: Tue, 13 Feb 2024 11:47:40 -0600 Subject: [PATCH] Update and add INSTALL files and versions in docs (#522) --- HDF4Examples/Using_CMake.txt | 8 +- README.md | 2 +- config/cmake/scripts/HDF4config.cmake | 4 +- release_notes/INSTALL | 211 +++++-------------------- release_notes/INSTALL_Auto.txt | 147 +++++++++++++++++ release_notes/INSTALL_CMake.txt | 152 ++++++++++-------- release_notes/INSTALL_WINDOWS.txt | 14 ++ release_notes/USING_CMake_Examples.txt | 4 +- release_notes/USING_HDF4_CMake.txt | 10 +- release_notes/USING_HDF4_VS.txt | 4 +- 10 files changed, 295 insertions(+), 261 deletions(-) create mode 100644 release_notes/INSTALL_Auto.txt diff --git a/HDF4Examples/Using_CMake.txt b/HDF4Examples/Using_CMake.txt index ce861920e8..3455897c4a 100644 --- a/HDF4Examples/Using_CMake.txt +++ b/HDF4Examples/Using_CMake.txt @@ -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 @@ -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) @@ -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 diff --git a/README.md b/README.md index ea91c6334c..0cdb0454be 100644 --- a/README.md +++ b/README.md @@ -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) diff --git a/config/cmake/scripts/HDF4config.cmake b/config/cmake/scripts/HDF4config.cmake index 038e361c71..eb7db3397b 100755 --- a/config/cmake/scripts/HDF4config.cmake +++ b/config/cmake/scripts/HDF4config.cmake @@ -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 diff --git a/release_notes/INSTALL b/release_notes/INSTALL index f31bd68541..afd618f44b 100644 --- a/release_notes/INSTALL +++ b/release_notes/INSTALL @@ -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. - -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: - - /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. diff --git a/release_notes/INSTALL_Auto.txt b/release_notes/INSTALL_Auto.txt new file mode 100644 index 0000000000..38f0d23f7c --- /dev/null +++ b/release_notes/INSTALL_Auto.txt @@ -0,0 +1,147 @@ +************************************************************************* +* Installation Instructions for HDF4 using Autotools * +************************************************************************* + + Table of Contents + +Section I. Preconditions +Section II: Unix and Mac OSX Configuration and Build +Section III: Using HDF/MFHDF Libraries with the netCDF Library +Section IV: Windows Configuration and Build + +************************************************************************ + +For help with installing, questions can be posted to the HDF Forum or sent to the HDF Helpdesk: + + HDF Forum: https://forum.hdfgroup.org/ + HDF Helpdesk: https://hdfgroup.atlassian.net/servicedesk/customer/portals + + +======================================================================== +I. Preconditions +======================================================================== +Obtaining HDF4 source code + 1. Create a directory for your development; for example, "myhdfstuff". + + 2. Obtain HDF4 source from Github + development branch: https://github.com/HDFGroup/hdf4 + last release: https://github.com/HDFGroup/hdf4/releases/latest + hdf-4_3_"X".tar.gz or hdf-4_3_"X".zip + + and put it in "myhdfstuff". + Uncompress the file. There should be a hdf-4.3."X" folder. + + +======================================================================== +II. 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: + + 1) Make sure that the ZLIB and JPEG libraries are installed on your + system. + + 2) Optional: Install the Szip version 2.1 library (you may use + Szip 2.0 binaries). + + 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. + +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: + + /configure ... + + where "..." are your configuration options. + + +======================================================================== +III. Using HDF/MFHDF Libraries with the netCDF Library +======================================================================== + 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. + + Please report all problems to help@hdfgroup.org. + + +======================================================================== +IV. Windows Configuration and Build +======================================================================== +See RELEASE.txt in the release_notes/ directory for the list of platforms +tested for this release. + +We now recommend that users build, test, and install HDF4 using CMake. + +Instructions for building and testing HDF4 using CMake can be found in the +INSTALL_CMake.txt file found in this folder. + +For instructions on building and testing an application with HDF4, see the +USING_HDF4_CMake.txt file found in this folder. + +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. + diff --git a/release_notes/INSTALL_CMake.txt b/release_notes/INSTALL_CMake.txt index f5426a7020..2ab720c7d5 100644 --- a/release_notes/INSTALL_CMake.txt +++ b/release_notes/INSTALL_CMake.txt @@ -1,5 +1,5 @@ ************************************************************************* -* Build and Install HDF4 C and Fortran Libraries and tools with CMake * +* Build and Install HDF4 C and Fortran Libraries and tools with CMake * ************************************************************************* Table of Contents @@ -12,6 +12,7 @@ Section V: Options for building HDF4 Libraries with CMake command line Section VI: CMake option defaults for HDF4 Section VII: User Defined Options for HDF4 Libraries with CMake Section VIII: Using CMakePresets.json for compiling +Section IX: Autotools Configuration and Build ************************************************************************ @@ -22,8 +23,11 @@ I. Preconditions Obtaining HDF4 source code 1. Create a directory for your development; for example, "myhdfstuff". - 2. Obtain compressed (*.tar or *.zip) HDF4 source from - https://portal.hdfgroup.org/display/support/Building+HDF4+with+CMake + 2. Obtain HDF4 source from Github + development branch: https://github.com/HDFGroup/hdf4 + last release: https://github.com/HDFGroup/hdf4/releases/latest + hdf-4_3_"X".tar.gz or hdf-4_3_"X".zip + and put it in "myhdfstuff". Uncompress the file. There should be a hdf-4.2."X" folder. @@ -53,7 +57,7 @@ The following files referenced below are available at the HDF web site: https://portal.hdfgroup.org/display/support/Building+HDF4+with+CMake Single compressed file with all the files needed, including source: - CMake-hdf-4.2.X.zip or CMake-hdf-4.2.X.tar.gz + CMake-hdf-4.3.X.zip or CMake-hdf-4.3.X.tar.gz Individual files included in the above mentioned compressed files ----------------------------------------------- @@ -66,9 +70,6 @@ External compression szip and zlib libraries: SZip.tar.gz ZLib.tar.gz -Examples Source package: - HDF4Examples-3.x-Source.tar.gz - Configuration files: HDF4config.cmake HDF4options.cmake @@ -80,10 +81,10 @@ To build HDF4 with the SZIP, ZLIB and JPEG external libraries you will need to: 1. Change to the development directory "myhdfstuff". - 2. Download the CMake-hdf-4.2.X.zip(.tar.gz) file to "myhdfstuff". + 2. Download the CMake-hdf-4.3.X.zip(.tar.gz) file to "myhdfstuff". Uncompress the file. - 3. Change to the source directory "hdf-4.2.x". + 3. Change to the source directory "hdf-4.3.x". CTestScript.cmake file should not be modified. 4. Edit the platform configuration file, HDF4options.cmake, if you want to change @@ -115,7 +116,7 @@ To build HDF4 with the SZIP, ZLIB and JPEG external libraries you will need to: The command above will configure, build, test, and create an install package in the myhdfstuff folder. It will have the format: - HDF-4.2.NN-. + HDF-4.3.NN-. On Unix, will be "Linux". A similar .sh file will also be created. On Windows, will be "win64" or "win32". If you have an @@ -136,13 +137,13 @@ To build HDF4 with the SZIP, ZLIB and JPEG external libraries you will need to: 6. To install, "X" is the current release version On Windows (with WiX installed), execute: - HDF-4.2."X"-win32.exe or HDF-4.2."X"-win64.exe + HDF-4.3."X"-win32.exe or HDF-4.3."X"-win64.exe By default this program will install the hdf4 library into the "C:\Program Files" directory and will create the following directory structure: HDF_Group --HDF - ----4.2."X" + ----4.3."X" ------bin ------include ------lib @@ -150,17 +151,17 @@ To build HDF4 with the SZIP, ZLIB and JPEG external libraries you will need to: On Linux, change to the install destination directory (create it if doesn't exist) and execute: - /myhdfstuff/HDF-4.2."X"-Linux.sh + /myhdfstuff/HDF-4.3."X"-Linux.sh After accepting the license, the script will prompt: By default the HDF4 will be installed in: - "/HDF-4.2."X"-Linux" - Do you want to include the subdirectory HDF-4.2."X"-Linux? + "/HDF-4.3."X"-Linux" + Do you want to include the subdirectory HDF-4.3."X"-Linux? Saying no will install in: "" [Yn]: Note that the script will create the following directory structure relative to the install point: HDF_Group --HDF - ----4.2."X" + ----4.3."X" ------bin ------include ------lib @@ -171,19 +172,19 @@ To build HDF4 with the SZIP, ZLIB and JPEG external libraries you will need to: there will be a folder with the following structure: HDF_Group --HDF - ----4.2."X" + ----4.3."X" ------bin ------include ------lib ------share By default the installation will create the bin, include, lib and cmake - folders in the /HDF_Group/HDF/4.2."X" + folders in the /HDF_Group/HDF/4.3."X" The depends on the build platform; Windows will set the default to: - C:/Program Files/HDF_Group/HDF/4.2."X" + C:/Program Files/HDF_Group/HDF/4.3."X" Linux will set the default to: - "myhdfstuff/HDF_Group/HDF/4.2."X" + "myhdfstuff/HDF_Group/HDF/4.3."X" The default can be changed by adding ",INSTALLDIR=" to the "ctest -S HDF4config.cmake..." command. For example on linux: ctest -S HDF4config.cmake,INSTALLDIR=/usr/local/myhdf4,BUILD_GENERATOR=Unix -C Release -VV -O hdf4.log @@ -210,10 +211,10 @@ Notes: This short set of instructions is written for users who want to 5. Configure the C library, tools and tests with one of the following commands: On Windows 32 bit - cmake -G "Visual Studio 12 2013" -DCMAKE_BUILD_TYPE:STRING=Release -DBUILD_TESTING:BOOL=ON -DHDF4_BUILD_TOOLS:BOOL=ON ..\hdf-4.2."X" + cmake -G "Visual Studio 16 2019" -A Win32 -DCMAKE_BUILD_TYPE:STRING=Release -DBUILD_TESTING:BOOL=ON -DHDF4_BUILD_TOOLS:BOOL=ON ..\hdf-4.2."X" On Windows 64 bit - cmake -G "Visual Studio 12 2013 Win64" -DCMAKE_BUILD_TYPE:STRING=Release -DBUILD_TESTING:BOOL=ON -DHDF4_BUILD_TOOLS:BOOL=ON ..\hdf-4.2."X" + cmake -G "Visual Studio 16 2019" -A x64 -DCMAKE_BUILD_TYPE:STRING=Release -DBUILD_TESTING:BOOL=ON -DHDF4_BUILD_TOOLS:BOOL=ON ..\hdf-4.2."X" On Linux and Mac cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE:STRING=Release -DBUILD_TESTING:BOOL=ON -DHDF4_BUILD_TOOLS:BOOL=ON ../hdf-4.2."X" @@ -231,13 +232,13 @@ Notes: This short set of instructions is written for users who want to 9. To install On Windows (with WiX installed), execute: - HDF-4.2."X"-win32.msi or HDF-4.2."X"-win64.msi + HDF-4.3."X"-win32.msi or HDF-4.3."X"-win64.msi By default this program will install the hdf4 library into the "C:\Program Files" directory and will create the following directory structure: HDF_Group --HDF - ----4.2."X" + ----4.3."X" ------bin ------include ------lib @@ -245,28 +246,28 @@ Notes: This short set of instructions is written for users who want to On Linux, change to the install destination directory (create if doesn't exist) and execute: - /myhdfstuff/build/HDF-4.2."X"-Linux.sh + /myhdfstuff/build/HDF-4.3."X"-Linux.sh After accepting the license, the script will prompt: By default the HDF4 will be installed in: - "/HDF-4.2."X"-Linux" - Do you want to include the subdirectory HDF-4.2."X"-Linux? + "/HDF-4.3."X"-Linux" + Do you want to include the subdirectory HDF-4.3."X"-Linux? Saying no will install in: "" [Yn]: Note that the script will create the following directory structure relative to the install point: HDF_Group --HDF - ----4.2."X" + ----4.3."X" ------bin ------include ------lib ------share - On Mac you will find HDF-4.2."X"-Darwin.dmg in the build folder. Click + On Mac you will find HDF-4.3."X"-Darwin.dmg in the build folder. Click on the dmg file to proceed with installation. After accepting the license, there will be a folder with the following structure: HDF_Group --HDF - ----4.2."X" + ----4.3."X" ------bin ------include ------lib @@ -279,7 +280,8 @@ IV. Further considerations 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 3.12. - If you are using VS2019, the CMake minimum is 3.15. + If you are using VS2019, the CMake minimum is 3.15. If you are + using VS2022, the minimum version is 3.21. 2. HDF4 requires Zlib and JPEG. Szip is optional: A. Download the binary packages and install them in a central location. @@ -320,22 +322,18 @@ IV. Further considerations D. Use original source packages from a compressed file by adding the following CMake options: - BUILD_JPEG_WITH_FETCHCONTENT:BOOL=ON - JPEG_TGZ_ORIGNAME:STRING="jpeg_src.ext" + JPEG_TGZ_NAME:STRING="jpeg_src.ext" JPEG_TGZ_ORIGPATH:STRING="some_location" - BUILD_SZIP_WITH_FETCHCONTENT:BOOL=ON - LIBAEC_TGZ_ORIGNAME:STRING="szip_src.ext" + LIBAEC_TGZ_NAME:STRING="szip_src.ext" LIBAEC_TGZ_ORIGPATH:STRING="some_location" - BUILD_ZLIB_WITH_FETCHCONTENT:BOOL=ON - ZLIB_TGZ_ORIGNAME:STRING="zlib_src.ext" + ZLIB_TGZ_NAME:STRING="zlib_src.ext" ZLIB_TGZ_ORIGPATH:STRING="some_location" HDF4_ALLOW_EXTERNAL_SUPPORT:STRING="TGZ" where "some_location" is the URL or full path to the compressed - file and ext is the type of compression file. The individual filters are - enabled by setting the BUILD__WITH_FETCHCONTENT CMake variable to ON. + file and ext is the type of compression file. Also set CMAKE_BUILD_TYPE to the configuration type during configuration. See the settings in the config/cmake/cacheinit.cmake file HDF uses for testing. @@ -364,7 +362,7 @@ IV. Further considerations the settings for the developers' environment. Then the only options needed on the command line are those options that are different. Example using HDF default cache file: - cmake -C ../config/cmake/cacheinit.cmake -G "Visual Studio 12 2013" \ + cmake -C ../config/cmake/cacheinit.cmake -G "Visual Studio 16 2019" \ -DHDF4_ENABLE_SZIP_SUPPORT:BOOL=OFF -DHDF4_ENABLE_EXAMPLES:BOOL=OFF \ -DCMAKE_BUILD_TYPE:STRING=Release .. @@ -519,7 +517,7 @@ These five steps are described in detail below. set (ZLIB_PACKAGE_NAME "zlib" CACHE STRING "Name of ZLIB package" FORCE) set (ZLIB_TGZ_NAME "ZLib.tar.gz" CACHE STRING "Use HDF4_ZLib from compressed file" FORCE) set (ZLIB_TGZ_ORIGPATH "https://github.com/madler/zlib/releases/download/v1.2.13" CACHE STRING "Use ZLIB from original location" FORCE) - set (ZLIB_TGZ_ORIGNAME "zlib-1.2.13.tar.gz" CACHE STRING "Use ZLIB from original compressed file" FORCE) + set (ZLIB_TGZ_NAME "zlib-1.2.13.tar.gz" CACHE STRING "Use ZLIB from original compressed file" FORCE) set (ZLIB_USE_LOCALCONTENT OFF CACHE BOOL "Use local file for ZLIB FetchContent" FORCE) set (SZIP_PACKAGE_NAME "szip" CACHE STRING "Name of SZIP package" FORCE) set (LIBAEC_PACKAGE_NAME "libaec" CACHE STRING "Name of AEC SZIP package" FORCE) @@ -527,12 +525,12 @@ These five steps are described in detail below. set (SZAEC_TGZ_NAME "LIBAEC.tar.gz" CACHE STRING "Use SZip AEC from compressed file" FORCE) set (USE_LIBAEC ON CACHE BOOL "Use libaec szip replacement" FORCE) set (LIBAEC_TGZ_ORIGPATH "https://gitlab.dkrz.de/k202009/libaec/-/archive/v1.0.6" CACHE STRING "Use LIBAEC from original location" FORCE) - set (LIBAEC_TGZ_ORIGNAME "libaec-v1.0.6.tar.gz" CACHE STRING "Use LIBAEC from original compressed file" FORCE) + set (LIBAEC_TGZ_NAME "libaec-v1.0.6.tar.gz" CACHE STRING "Use LIBAEC from original compressed file" FORCE) set (LIBAEC_USE_LOCALCONTENT OFF CACHE BOOL "Use local file for LIBAEC FetchContent" FORCE) set (JPEG_PACKAGE_NAME "jpeg" CACHE STRING "Name of JPEG package" FORCE) set (JPEG_TGZ_NAME "JPEG9e.tar.gz" CACHE STRING "Use JPEG from compressed file" FORCE) set (JPEG_TGZ_ORIGPATH "https://www.ijg.org/filesz" CACHE STRING "Use JPEG from original location" FORCE) - set (JPEG_TGZ_ORIGNAME "jpegsrc.v9e.tar.gz" CACHE STRING "Use JPEG from original compressed file" FORCE) + set (JPEG_TGZ_NAME "jpegsrc.v9e.tar.gz" CACHE STRING "Use JPEG from original compressed file" FORCE) set (JPEG_USE_LOCALCONTENT OFF CACHE BOOL "Use local file for JPEG FetchContent" FORCE) 2. Configure the cache settings @@ -557,7 +555,7 @@ These five steps are described in detail below. 2.2 Preferred command line example on Windows in c:\MyHDFstuff\hdf4\build directory: - cmake -C ../config/cmake/cacheinit.cmake -G "Visual Studio 12 2013" \ + cmake -C ../config/cmake/cacheinit.cmake -G "Visual Studio 16 2019" "-Ax64" \ -DHDF4_ENABLE_SZIP_SUPPORT:BOOL=OFF -DHDF4_ENABLE_Z_LIB_SUPPORT:BOOL=OFF \ -DCMAKE_BUILD_TYPE:STRING=Release .. @@ -593,9 +591,13 @@ These five steps are described in detail below. The options to control the GIT URL (config/cmake/cacheinit.cmake file) are: JPEG_GIT_URL:STRING="https://${git_url}/jpeg9e" + JPEG_GIT_BRANCH="${git_branch}" ZLIB_GIT_URL:STRING="https://${git_url}/zlib" + ZLIB_GIT_BRANCH="${git_branch}" SZIP_GIT_URL:STRING="https://${git_url}/szip" - ${git_url} should be changed to your location. Also define CMAKE_BUILD_TYPE + SZIP_GIT_BRANCH="${git_branch}" + ${git_url} should be changed to your location and ${git_branch} is + your branch in the repository. Also define CMAKE_BUILD_TYPE to be the configuration type. 3.2.2 Or the external libraries (zlib, szip, and jpeg) can be configured @@ -678,8 +680,8 @@ Option Name, Option Description, and Option Default. The config/cmake/cacheinit.cmake file can override the following values. ---------------- General Build Options --------------------- -BUILD_STATIC_LIBS "Build Static Libraries" ON -BUILD_SHARED_LIBS "Build Shared Libraries" ON +BUILD_SHARED_LIBS "Build Shared Libraries" ON +BUILD_STATIC_LIBS "Build Static Libraries" ON BUILD_TESTING "Build HDF4 Unit Testing" ON ---------------- HDF4 Build Options --------------------- @@ -704,6 +706,8 @@ else () HDF4_INSTALL_DATA_DIR "share" HDF4_INSTALL_DOC_DIR "HDF4_INSTALL_DATA_DIR" +HDF4_USE_GNU_DIRS "TRUE to use GNU Coding Standard install directory variables, + FALSE to use historical settings" FALSE Defaults as defined by the `GNU Coding Standards` HDF4_INSTALL_BIN_DIR "bin" HDF4_INSTALL_LIB_DIR "lib" @@ -715,8 +719,6 @@ HDF4_INSTALL_DOC_DIR "HDF4_INSTALL_DATA_DIR/doc/hdf" HDF4_BUILD_DOC "Build documentation" OFF ---------------- HDF4 Advanced Options --------------------- -HDF4_USE_GNU_DIRS "TRUE to use GNU Coding Standard install directory variables, - FALSE to use historical settings" FALSE ONLY_SHARED_LIBS "Only Build Shared Libraries" OFF HDF4_DISABLE_COMPILER_WARNINGS "Disable compiler warnings" OFF HDF4_ENABLE_COVERAGE "Enable code coverage for Libraries and Programs" OFF @@ -732,30 +734,30 @@ if (APPLE) if (WIN32) HDF_LEGACY_NAMING "Use Legacy Names for Libraries and Programs" OFF HDF4_ENABLE_NETCDF "Build HDF4 versions of NetCDF-3 APIS" ON + ---------------- External Library Options --------------------- HDF4_ALLOW_EXTERNAL_SUPPORT "Allow External Library Building" "NO" HDF4_ENABLE_JPEG_LIB_SUPPORT "Enable libjpeg required" ON HDF4_ENABLE_SZIP_SUPPORT "Use SZip Filter" OFF HDF4_ENABLE_Z_LIB_SUPPORT "Enable Zlib Filters" ON + JPEG_USE_EXTERNAL "Use External Library Building for JPEG" 0 -SZIP_USE_EXTERNAL "Use External Library Building for SZIP" 0 +JPEG_TGZ_ORIGPATH "Use JPEG from original location" "https://www.ijg.org/filesz" +JPEG_TGZ_NAME "Use JPEG from original compressed file" "jpegsrc.v9e.tar.gz" +JPEG_USE_LOCALCONTENT "Use local file for JPEG FetchContent" OFF + ZLIB_USE_EXTERNAL "Use External Library Building for ZLIB" 0 +ZLIB_TGZ_ORIGPATH "Use ZLIB from original location" "https://github.com/madler/zlib/releases/download/v1.2.13" +ZLIB_TGZ_NAME "Use ZLIB from original compressed file" "zlib-1.2.13.tar.gz" +ZLIB_USE_LOCALCONTENT "Use local file for ZLIB FetchContent" OFF + +SZIP_USE_EXTERNAL "Use External Library Building for SZIP" 0 if (HDF4_ENABLE_SZIP_SUPPORT) HDF4_ENABLE_SZIP_ENCODING "Use SZip Encoding" OFF - USE_LIBAEC "Use libaec szip replacement" OFF - USE_LIBAEC_STATIC "Use static AEC library" OFF -if (BUILD_JPEG_WITH_FETCHCONTENT) - JPEG_TGZ_ORIGPATH "Use JPEG from original location" "https://www.ijg.org/filesz" - JPEG_TGZ_ORIGNAME "Use JPEG from original compressed file" "jpegsrc.v9e.tar.gz" - JPEG_USE_LOCALCONTENT "Use local file for JPEG FetchContent" OFF -if (BUILD_SZIP_WITH_FETCHCONTENT) - LIBAEC_TGZ_ORIGPATH "Use LIBAEC from original location" "https://gitlab.dkrz.de/k202009/libaec/-/archive/v1.0.6" - LIBAEC_TGZ_ORIGNAME "Use LIBAEC from original compressed file" "libaec-v1.0.6.tar.gz" - LIBAEC_USE_LOCALCONTENT "Use local file for LIBAEC FetchContent" OFF -if (BUILD_ZLIB_WITH_FETCHCONTENT) - ZLIB_TGZ_ORIGPATH "Use ZLIB from original location" "https://github.com/madler/zlib/releases/download/v1.2.13" - ZLIB_TGZ_ORIGNAME "Use ZLIB from original compressed file" "zlib-1.2.13.tar.gz" - ZLIB_USE_LOCALCONTENT "Use local file for ZLIB FetchContent" OFF +USE_LIBAEC_STATIC "Use static AEC library" OFF +LIBAEC_TGZ_ORIGPATH "Use LIBAEC from original location" "https://gitlab.dkrz.de/k202009/libaec/-/archive/v1.0.6" +LIBAEC_TGZ_NAME "Use LIBAEC from original compressed file" "libaec-v1.0.6.tar.gz" +LIBAEC_USE_LOCALCONTENT "Use local file for LIBAEC FetchContent" OFF NOTE: The HDF4_USE_GNU_DIRS option is usually recommended for linux platforms, but may @@ -803,15 +805,15 @@ Available configurations presets can be displayed by executing: Using individual command presets (where is GNUC or MSVC or Clang): change directory to the hdf4 source folder - cmake --presets=ci-StdShar- - cmake --build --presets=ci-StdShar- - ctest --presets=ci-StdShar- - cpack --presets=ci-StdShar- + cmake --preset ci-StdShar- + cmake --build --preset ci-StdShar- + ctest --preset ci-StdShar- + cpack --preset ci-StdShar- Using the workflow preset to configure, build, test and package the standard configuration is: change directory to the hdf4 source folder - execute "cmake --workflow --presets=ci-StdShar- --fresh" + execute "cmake --workflow --preset ci-StdShar- --fresh" where is GNUC or MSVC or Clang Creating your own configurations @@ -831,7 +833,7 @@ For instance, to change the support files to use a local directory, edit CMakeUs "inherits": "ci-base", "cacheVariables": { "HDF4_ALLOW_EXTERNAL_SUPPORT": {"type": "STRING", "value": "TGZ"}, - "TGZPATH": {"type": "STRING", "value": "${sourceParentDir}/temp"} + "TGZPATH": {"type": "PATH", "value": "${sourceParentDir}/temp"} } }, { @@ -862,6 +864,16 @@ For instance, to change the support files to use a local directory, edit CMakeUs Then you can change or add options for your specific case. +======================================================================== +III. Autotools Configuration and Build +======================================================================== +See RELEASE.txt in the release_notes/ directory for the list of platforms +tested for this release. + +Instructions for building and testing HDF4 using autotools can be found in the +INSTALL_Auto.txt file found in this folder. + + ======================================================================== For further assistance, send email to help@hdfgroup.org ======================================================================== diff --git a/release_notes/INSTALL_WINDOWS.txt b/release_notes/INSTALL_WINDOWS.txt index 0b60c0a008..882a5860d0 100644 --- a/release_notes/INSTALL_WINDOWS.txt +++ b/release_notes/INSTALL_WINDOWS.txt @@ -16,3 +16,17 @@ 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.. Building applications with the dynamic/shared hdf4 libraries requires that the "H4_BUILT_AS_DYNAMIC_LIB" compile definition be used. + +Additional Third-party Software Requirements: + + 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 + + 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. diff --git a/release_notes/USING_CMake_Examples.txt b/release_notes/USING_CMake_Examples.txt index 02ba25be03..88f8d75b05 100644 --- a/release_notes/USING_CMake_Examples.txt +++ b/release_notes/USING_CMake_Examples.txt @@ -21,7 +21,7 @@ I. Preconditions ======================================================================== 1. We suggest you obtain the latest CMake for your platform 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. If you are using VS2019, the minimum version is 3.15. If you are using VS2022, the minimum version is 3.21. @@ -71,7 +71,7 @@ Default installation process: When executed, the ctest script will save the results to the log file, test.log, as indicated by the ctest command. If you wish to see more build and test information, - add "-VV" to the ctest command. The output should show + add "-VV" to the ctest command. The output should show; 100% tests passed, 0 tests failed out of 49. diff --git a/release_notes/USING_HDF4_CMake.txt b/release_notes/USING_HDF4_CMake.txt index 175fd12482..0e1fc8fc54 100644 --- a/release_notes/USING_HDF4_CMake.txt +++ b/release_notes/USING_HDF4_CMake.txt @@ -38,7 +38,7 @@ I. Preconditions ======================================================================== 1. We suggest you obtain the latest CMake for your platform 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. If you are using VS2019, the minimum version is 3.15. If you are using VS2022, the minimum version is 3.21. @@ -51,17 +51,17 @@ I. Preconditions or environment variable, set(ENV{HDF4_ROOT} "") to the installed location of 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/ On unix: - HDF4_ROOT=/HDF_Group/HDF/4.2.x/ + HDF4_ROOT=/HDF_Group/HDF/4.3.x/ If you are using shared libraries, you may need to add to the path environment variable. Set the path environment variable to the installed location of the library files for HDF4. On Windows (*.dll): - PATH=%PATH%;C:/Program Files/HDF_Group/HDF/4.2.x/bin + PATH=%PATH%;C:/Program Files/HDF_Group/HDF/4.3.x/bin On unix (*.so): - LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/HDF_Group/HDF/4.2.x/lib + LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/HDF_Group/HDF/4.3.x/lib (Note there are no quote characters used on Windows and all platforms use forward slashes) diff --git a/release_notes/USING_HDF4_VS.txt b/release_notes/USING_HDF4_VS.txt index 69df365e4c..7900c9f0aa 100644 --- a/release_notes/USING_HDF4_VS.txt +++ b/release_notes/USING_HDF4_VS.txt @@ -52,11 +52,11 @@ Using Visual Studio 2008 with HDF4 Libraries built with Visual Studio 2008 and select "x64". 2.2 Find the box "Show directories for", choose "Include files", add the - header path (i.e. c:\Program Files\HDF_Group\HDF\4.2.x\include) + header path (i.e. c:\Program Files\HDF_Group\HDF\4.3.x\include) to the included directories. 2.3 Find the box "Show directories for", choose "Library files", add the - library path (i.e. c:\Program Files\HDF_Group\HDF\4.2.x\lib) + library path (i.e. c:\Program Files\HDF_Group\HDF\4.3.x\lib) to the library directories. 2.4 If using Fortran libraries, you will also need to setup the path