From 4e621441ce93459323d650561030613d3a103a9e Mon Sep 17 00:00:00 2001 From: Larry Knox Date: Tue, 7 Feb 2023 08:33:17 -0600 Subject: Updates to known problem, release date, and cherry-picks of latest changes to hdf5_1_8. (#2430) --------- Co-authored-by: Allen Byrne <50328838+byrnHDF@users.noreply.github.com> --- .github/workflows/main.yml | 10 +-- .github/workflows/pr-check.yml | 10 +-- MANIFEST | 6 +- README.txt | 2 +- config/BlankForm | 90 ++++++++++---------- config/apple | 127 ++++++++++++++++------------- config/cmake/HDFCXXCompilerFlags.cmake | 8 +- config/cmake/HDFCompilerFlags.cmake | 7 +- config/cmake/HDFFortranCompilerFlags.cmake | 2 +- config/cmake_ext_mod/ConfigureChecks.cmake | 97 +++++++++++----------- config/cmake_ext_mod/NSIS.template.in | 4 +- config/gnu-fflags | 2 +- config/gnu-warnings/general | 9 +- config/ibm-aix | 8 +- config/sanitizer/sanitizers.cmake | 2 +- config/sanitizer/tools.cmake | 2 +- config/solaris | 6 +- config/toolchain/GCC.cmake | 11 --- config/toolchain/PGI.cmake | 11 --- config/toolchain/aarch64.cmake | 17 ++++ config/toolchain/gcc.cmake | 11 +++ config/toolchain/icc.cmake | 11 +++ config/toolchain/intel.cmake | 13 +-- config/toolchain/pgi.cmake | 11 +++ release_docs/RELEASE.txt | 9 +- src/libhdf5.settings.in | 4 +- 26 files changed, 265 insertions(+), 225 deletions(-) delete mode 100644 config/toolchain/GCC.cmake delete mode 100644 config/toolchain/PGI.cmake create mode 100644 config/toolchain/aarch64.cmake create mode 100644 config/toolchain/gcc.cmake create mode 100644 config/toolchain/icc.cmake create mode 100644 config/toolchain/pgi.cmake diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 95d9898..ae4c92e 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -39,7 +39,7 @@ jobs: ts: OFF hl: ON parallel: OFF - toolchain: "config/toolchain/GCC.cmake" + toolchain: "config/toolchain/gcc.cmake" generator: "-G Ninja" - name: "macOS Latest Clang" artifact: "macOS.tar.xz" @@ -61,7 +61,7 @@ jobs: ts: OFF hl: ON parallel: OFF - toolchain: "config/toolchain/GCC.cmake" + toolchain: "config/toolchain/gcc.cmake" generator: "-G Ninja" - name: "Ubuntu Autotools GCC" artifact: "LinuxA.tar.xz" @@ -95,7 +95,7 @@ jobs: ts: ON hl: OFF parallel: OFF - toolchain: "config/toolchain/GCC.cmake" + toolchain: "config/toolchain/gcc.cmake" generator: "-G Ninja" - name: "macOS TS Clang" artifact: "macOSTS.tar.xz" @@ -117,7 +117,7 @@ jobs: ts: ON hl: OFF parallel: OFF - toolchain: "config/toolchain/GCC.cmake" + toolchain: "config/toolchain/gcc.cmake" generator: "-G Ninja" - name: "TS Autotools GCC" artifact: "LinuxATS.tar.xz" @@ -137,7 +137,7 @@ jobs: # cpp: OFF # fortran: OFF # parallel: ON -# toolchain: "config/toolchain/GCC.cmake" +# toolchain: "config/toolchain/gcc.cmake" # generator: "-G Ninja" name: ${{ matrix.name }} diff --git a/.github/workflows/pr-check.yml b/.github/workflows/pr-check.yml index dd8a8ab..74281d5 100644 --- a/.github/workflows/pr-check.yml +++ b/.github/workflows/pr-check.yml @@ -34,7 +34,7 @@ jobs: ts: OFF hl: ON parallel: OFF - toolchain: "config/toolchain/GCC.cmake" + toolchain: "config/toolchain/gcc.cmake" generator: "-G Ninja" - name: "macOS Latest Clang" artifact: "macOS.tar.xz" @@ -56,7 +56,7 @@ jobs: ts: OFF hl: ON parallel: OFF - toolchain: "config/toolchain/GCC.cmake" + toolchain: "config/toolchain/gcc.cmake" generator: "-G Ninja" - name: "Ubuntu Autotools GCC" artifact: "LinuxA.tar.xz" @@ -90,7 +90,7 @@ jobs: ts: ON hl: OFF parallel: OFF - toolchain: "config/toolchain/GCC.cmake" + toolchain: "config/toolchain/gcc.cmake" generator: "-G Ninja" - name: "macOS TS Clang" artifact: "macOSTS.tar.xz" @@ -112,7 +112,7 @@ jobs: ts: ON hl: OFF parallel: OFF - toolchain: "config/toolchain/GCC.cmake" + toolchain: "config/toolchain/gcc.cmake" generator: "-G Ninja" - name: "TS Autotools GCC" artifact: "LinuxATS.tar.xz" @@ -132,7 +132,7 @@ jobs: # cpp: OFF # fortran: OFF # parallel: ON -# toolchain: "config/toolchain/GCC.cmake" +# toolchain: "config/toolchain/gcc.cmake" # generator: "-G Ninja" name: ${{ matrix.name }} diff --git a/MANIFEST b/MANIFEST index 64e730a..d0194bb 100644 --- a/MANIFEST +++ b/MANIFEST @@ -2525,13 +2525,15 @@ ./hl/c++/test/Makefile.in # CMake-specific Files +./config/toolchain/aarch64.cmake ./config/toolchain/build32.cmake ./config/toolchain/clang.cmake ./config/toolchain/crayle.cmake -./config/toolchain/GCC.cmake +./config/toolchain/gcc.cmake +./config/toolchain/icc.cmake ./config/toolchain/intel.cmake ./config/toolchain/mingw64.cmake -./config/toolchain/PGI.cmake +./config/toolchain/pgi.cmake ./config/cmake/cacheinit.cmake ./config/cmake/ConversionTests.c diff --git a/README.txt b/README.txt index 9c5d20f..7efa7f1 100644 --- a/README.txt +++ b/README.txt @@ -1,4 +1,4 @@ -HDF5 version 1.8.23 released on 2023-01-30 +HDF5 version 1.8.23 released on 2023-02-07 ------------------------------------------------------------------------------ Please refer to the release_docs/INSTALL file for installation instructions. diff --git a/config/BlankForm b/config/BlankForm index ce4bf53..68da38d 100644 --- a/config/BlankForm +++ b/config/BlankForm @@ -1,4 +1,4 @@ -# -*- shell-script -*- +# -*- shell-script -*- # # Copyright by The HDF Group. # Copyright by the Board of Trustees of the University of Illinois. @@ -52,39 +52,39 @@ fi # Flags that end with `_CPPFLAGS' are passed to the compiler when # compiling but not when linking. # -# DEBUG_CFLAGS Flags to pass to the compiler to create a -# DEBUG_CPPFLAGS library suitable for use with debugging -# tools. Usually this list will exclude -# optimization switches (like `-O') and include -# switches that turn on symbolic debugging -# support (like `-g'). +# DEBUG_CFLAGS Flags to pass to the compiler to create a +# DEBUG_CPPFLAGS library suitable for use with debugging +# tools. Usually this list will exclude +# optimization switches (like `-O') and include +# switches that turn on symbolic debugging +# support (like `-g'). # -# PROD_CFLAGS Flags to pass to the compiler to create a -# PROD_CPPFLAGS production version of the library. These -# usualy exclude symbolic debugging switches -# (like `-g') and include optimization switches -# (like `-O'). +# PROD_CFLAGS Flags to pass to the compiler to create a +# PROD_CPPFLAGS production version of the library. These +# usually exclude symbolic debugging switches +# (like `-g') and include optimization switches +# (like `-O'). # -# PROFILE_CFLAGS Flags to pass to the compiler to create a -# PROFILE_CPPFLAGS library suitable for performance testing (like -# `-pg'). This may or may not include debugging -# or production flags. -# -# H5_CFLAGS Flags can be added to this variable which -# might already be partially initialized. These -# flags will always be passed to the compiler -# and should include switches to turn on full -# warnings. HDF5 attempts to be ANSI and Posix -# compliant and employ good programming -# practices resulting in few if any -# warnings. +# PROFILE_CFLAGS Flags to pass to the compiler to create a +# PROFILE_CPPFLAGS library suitable for performance testing (like +# `-pg'). This may or may not include debugging +# or production flags. # -# Warning flags do not have to be added to H5_CFLAGS -# variable if the compiler is the GNU gcc -# compiler or a descendent of gcc such as EGCS or PGCC. +# H5_CFLAGS Flags can be added to this variable which +# might already be partially initialized. These +# flags will always be passed to the compiler +# and should include switches to turn on full +# warnings. HDF5 attempts to be ANSI and Posix +# compliant and employ good programming +# practices resulting in few if any +# warnings. +# +# Warning flags do not have to be added to H5_CFLAGS +# variable if the compiler is the GNU gcc +# compiler or a descendent of gcc such as EGCS or PGCC. # # AM_CFLAGS Flags added directly into this variable will -# be propogated to the compiler wrapper scripts (h5cc, +# be propagated to the compiler wrapper scripts (h5cc, # h5c++, et cetera) in addition to being used to compile # the library. # @@ -97,24 +97,24 @@ fi case $CC_BASENAME in gcc) - H5_CFLAGS="$H5_CFLAGS -Wsign-compare" #Only works for some versions - DEBUG_CFLAGS="-g -fverbose-asm" - DEBUG_CPPFLAGS= - PROD_CFLAGS="-O3 -fomit-frame-pointer" - PROD_CPPFLAGS= - PROFILE_CFLAGS="-pg" - PROFILE_CPPFLAGS= - ;; + H5_CFLAGS="$H5_CFLAGS -Wsign-compare" #Only works for some versions + DEBUG_CFLAGS="-g -fverbose-asm" + DEBUG_CPPFLAGS= + PROD_CFLAGS="-O3 -fomit-frame-pointer" + PROD_CPPFLAGS= + PROFILE_CFLAGS="-pg" + PROFILE_CPPFLAGS= + ;; *) - H5_CFLAGS="$H5_CFLAGS -ansi" - DEBUG_CFLAGS="-g" - DEBUG_CPPFLAGS= - PROD_CFLAGS="-O" - PROD_CPPFLAGS= - PROFILE_CFLAGS="-pg" - PROFILE_CPPFLAGS= - ;; + H5_CFLAGS="$H5_CFLAGS -ansi" + DEBUG_CFLAGS="-g" + DEBUG_CPPFLAGS= + PROD_CFLAGS="-O" + PROD_CPPFLAGS= + PROFILE_CFLAGS="-pg" + PROFILE_CPPFLAGS= + ;; esac diff --git a/config/apple b/config/apple index 98dede2..0fb7dca 100644 --- a/config/apple +++ b/config/apple @@ -22,58 +22,60 @@ # No support for OS older than darwin 10.X. if test "X-" = "X-$CC"; then case "$host_os" in - darwin10.*) # Snow Leopard. Use gcc/g++ because clang++ is not available. - CC=gcc - CC_BASENAME=gcc - ;; - *) - CC=clang - CC_BASENAME=clang - - # Production - PROD_CFLAGS="-O3" - PROD_CPPFLAGS= - - # Debug - DEBUG_CFLAGS="-g -O0" - DEBUG_CPPFLAGS= - - # Profile - # Use this for profiling with gprof - # Just "-g" for now. More later. - PROFILE_CFLAGS="-g" - PROFILE_CPPFLAGS= - ;; + darwin10.*) # Snow Leopard. Use gcc/g++ because clang++ is not available. + CC=gcc + CC_BASENAME=gcc + ;; + *) + if test "X-$enable_parallel" = "X-yes"; then + # default to use mpicc which is the defacto MPI compiler name + CC=mpicc + CC_BASENAME=mpicc + else + CC=clang + CC_BASENAME=clang + fi + + # Production + PROD_CFLAGS="-O3" + PROD_CPPFLAGS= + + # Debug + DEBUG_CFLAGS="-g -O0" + DEBUG_CPPFLAGS= + + # Profile + # Use this for profiling with gprof + # Just "-g" for now. More later. + PROFILE_CFLAGS="-g" + PROFILE_CPPFLAGS= + ;; esac fi -# Figure out compiler flags +# Figure out C compiler flags . $srcdir/config/gnu-flags . $srcdir/config/clang-flags +. $srcdir/config/intel-flags + # temp patch: if GCC 4.2.1 is used in Lion or Mountain Lion systems, do not # use -O option as it causes failures in test/dt_arith. case "$host_os" in darwin1[12].*) # lion & mountain lion - #echo cc_vendor=$cc_vendor'-'cc_version=$cc_version - case "$cc_vendor-$cc_version" in - gcc-4.2.1) - # Remove any -O flags - #echo PROD_CFLAGS=$PROD_CFLAGS - PROD_CFLAGS="`echo $PROD_CFLAGS | sed -e 's/-O[0-3]*//'`" - #echo new PROD_CFLAGS=$PROD_CFLAGS - ;; - esac - ;; + #echo cc_vendor=$cc_vendor'-'cc_version=$cc_version + case "$cc_vendor-$cc_version" in + gcc-4.2.1) + # Remove any -O flags + #echo PROD_CFLAGS=$PROD_CFLAGS + PROD_CFLAGS="`echo $PROD_CFLAGS | sed -e 's/-O[0-3]*//'`" + #echo new PROD_CFLAGS=$PROD_CFLAGS + ;; + esac + ;; esac - -. $srcdir/config/intel-flags + if test "X-" = "X-$FC"; then case $CC_BASENAME in - clang) - # clang has no fortran compiler. Use gfortran. - FC=gfortran - FC_BASENAME=gfortran - ;; gcc*) FC=gfortran FC_BASENAME=gfortran @@ -82,15 +84,26 @@ if test "X-" = "X-$FC"; then FC=ifort FC_BASENAME=ifort ;; + mpicc*) + FC=mpif90 + FC_BASENAME=mpif90 + ;; + clang) + # clang has no fortran compiler. Use gfortran. + FC=gfortran + FC_BASENAME=gfortran + ;; esac fi +# Figure out FORTRAN compiler flags +. $srcdir/config/gnu-fflags +. $srcdir/config/intel-fflags + + +# The default C++ compiler is `clang++'. if test "X-" = "X-$CXX"; then case $CC_BASENAME in - clang) - CXX=clang++ - CXX_BASENAME=clang++ - ;; gcc) CXX=g++ CXX_BASENAME=g++ @@ -99,18 +112,21 @@ if test "X-" = "X-$CXX"; then CXX=icpc CXX_BASENAME=icpc ;; + mpicc*) + FC=mpif90 + FC_BASENAME=mpif90 + ;; + clang) + CXX=clang++ + CXX_BASENAME=clang++ + ;; esac fi -case $CXX_BASENAME in - clang++) - PROD_CXXFLAGS="-O3" - DEBUG_CXXFLAGS="-g -O0" - # Use this for profiling with gprof - # Just "-g" for now. More later. - PROFILE_CXXFLAGS="-g" - ;; -esac +# Figure out C++ compiler flags +. $srcdir/config/intel-cxxflags # Do this ahead of GNU to avoid icpc being detected as g++ +. $srcdir/config/gnu-cxxflags +. $srcdir/config/clang-cxxflags # compiler version strings case $CC in @@ -133,16 +149,15 @@ case $CC in echo "No match to get cc_version_info for $CC" ;; esac + # Figure out Fortran compiler flags and version strings case $FC in *gfortran*) - . $srcdir/config/gnu-fflags fc_version_info=`$FC $FCFLAGS $H5_FCFLAGS --version 2>&1 |\ grep 'GCC' | sed 's/\(.*(GCC) [-a-z0-9\. ]*\).*/\1/'` ;; *ifc*|*ifort*) - . $srcdir/config/intel-fflags fc_version_info=`$FC $FCFLAGS $H5_FCFLAGS -V 2>&1 | grep 'Version' |\ sed 's/\(Intel.* Compiler\).*\( Version [a-z0-9\.]*\).*\( Build [0-9]*\)/\1\2\3/'` ;; @@ -156,13 +171,11 @@ esac # get c++ version info case $CXX in clang++) - . $srcdir/config/clang-cxxflags cxx_version_info=`$CXX $CXXFLAGS $H5_CXXFLAGS --version 2>&1 |\ grep 'Apple' | sed 's/(.*//'` ;; *g++*) - . $srcdir/config/gnu-cxxflags cxx_version_info=`$CXX $CXXFLAGS $H5_CXXFLAGS --version 2>&1 |\ grep 'GCC' | sed 's/.*\((GCC) [-a-z0-9\. ]*.*\)/\1/'` ;; diff --git a/config/cmake/HDFCXXCompilerFlags.cmake b/config/cmake/HDFCXXCompilerFlags.cmake index 958fe73..e656146 100644 --- a/config/cmake/HDFCXXCompilerFlags.cmake +++ b/config/cmake/HDFCXXCompilerFlags.cmake @@ -9,6 +9,8 @@ # If you do not have access to either file, you may request a copy from # help@hdfgroup.org. # +ENABLE_LANGUAGE (CXX) + set (CMAKE_CXX_STANDARD 98) set (CMAKE_CXX_STANDARD_REQUIRED TRUE) @@ -133,7 +135,7 @@ else () ADD_H5_FLAGS (HDF5_CMAKE_CXX_FLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/cxx-general") ADD_H5_FLAGS (H5_CXXFLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/cxx-error-general") endif () - elseif (CMAKE_CXX_COMPILER_ID MATCHES "[Cc]lang") + elseif (CMAKE_CXX_COMPILER_ID MATCHES "IntelLLVM" OR CMAKE_CXX_COMPILER_ID MATCHES "[Cc]lang") ADD_H5_FLAGS (HDF5_CMAKE_CXX_FLAGS "${HDF5_SOURCE_DIR}/config/clang-warnings/general") elseif (CMAKE_CXX_COMPILER_ID STREQUAL "PGI") list (APPEND HDF5_CMAKE_CXX_FLAGS "-Minform=inform") @@ -154,14 +156,14 @@ if (HDF5_ENABLE_DEV_WARNINGS) elseif (CMAKE_CXX_COMPILER_ID STREQUAL "GNU") # Use the C warnings as CXX warnings are the same ADD_H5_FLAGS (H5_CXXFLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/developer-general") - elseif (CMAKE_CXX_COMPILER_ID MATCHES "[Cc]lang") + elseif (CMAKE_CXX_COMPILER_ID MATCHES "IntelLLVM" OR CMAKE_CXX_COMPILER_ID MATCHES "[Cc]lang") ADD_H5_FLAGS (H5_CXXFLAGS "${HDF5_SOURCE_DIR}/config/clang-warnings/developer-general") endif () else () if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU") # Use the C warnings as CXX warnings are the same ADD_H5_FLAGS (H5_CXXFLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/no-developer-general") - elseif (CMAKE_CXX_COMPILER_ID MATCHES "[Cc]lang") + elseif (CMAKE_CXX_COMPILER_ID MATCHES "IntelLLVM" OR CMAKE_CXX_COMPILER_ID MATCHES "[Cc]lang") ADD_H5_FLAGS (H5_CXXFLAGS "${HDF5_SOURCE_DIR}/config/clang-warnings/no-developer-general") endif () endif () diff --git a/config/cmake/HDFCompilerFlags.cmake b/config/cmake/HDFCompilerFlags.cmake index eb43b73..b424188 100644 --- a/config/cmake/HDFCompilerFlags.cmake +++ b/config/cmake/HDFCompilerFlags.cmake @@ -34,7 +34,6 @@ endif() # future if(MSVC OR _INTEL_WINDOWS OR _CLANG_MSVC_WINDOWS) add_definitions(-D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE) -else() endif() if(MSVC) @@ -158,7 +157,7 @@ else () # gcc automatically inlines based on the optimization level # this is just a failsafe list (APPEND H5_CFLAGS "-finline-functions") - elseif (CMAKE_C_COMPILER_ID MATCHES "[Cc]lang") + elseif (CMAKE_C_COMPILER_ID MATCHES "IntelLLVM" OR CMAKE_C_COMPILER_ID MATCHES "[Cc]lang") ADD_H5_FLAGS (HDF5_CMAKE_C_FLAGS "${HDF5_SOURCE_DIR}/config/clang-warnings/general") ADD_H5_FLAGS (H5_CFLAGS "${HDF5_SOURCE_DIR}/config/clang-warnings/error-general") elseif (CMAKE_C_COMPILER_ID STREQUAL "PGI") @@ -184,13 +183,13 @@ if (HDF5_ENABLE_DEV_WARNINGS) endif () elseif (CMAKE_C_COMPILER_ID STREQUAL "GNU" AND CMAKE_C_COMPILER_VERSION VERSION_GREATER_EQUAL 4.8) ADD_H5_FLAGS (H5_CFLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/developer-general") - elseif (CMAKE_C_COMPILER_ID MATCHES "[Cc]lang") + elseif (CMAKE_C_COMPILER_ID MATCHES "IntelLLVM" OR CMAKE_C_COMPILER_ID MATCHES "[Cc]lang") ADD_H5_FLAGS (H5_CFLAGS "${HDF5_SOURCE_DIR}/config/clang-warnings/developer-general") endif () else () if (CMAKE_C_COMPILER_ID STREQUAL "GNU" AND CMAKE_C_COMPILER_VERSION VERSION_GREATER_EQUAL 4.8) ADD_H5_FLAGS (H5_CFLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/no-developer-general") - elseif (CMAKE_C_COMPILER_ID MATCHES "[Cc]lang") + elseif (CMAKE_C_COMPILER_ID MATCHES "IntelLLVM" OR CMAKE_C_COMPILER_ID MATCHES "[Cc]lang") ADD_H5_FLAGS (H5_CFLAGS "${HDF5_SOURCE_DIR}/config/clang-warnings/no-developer-general") endif () endif () diff --git a/config/cmake/HDFFortranCompilerFlags.cmake b/config/cmake/HDFFortranCompilerFlags.cmake index 84b3ebe..599ec30 100644 --- a/config/cmake/HDFFortranCompilerFlags.cmake +++ b/config/cmake/HDFFortranCompilerFlags.cmake @@ -62,7 +62,7 @@ if (NOT MSVC AND NOT MINGW) # General flags if (CMAKE_Fortran_COMPILER_ID STREQUAL "Intel") ADD_H5_FLAGS (HDF5_CMAKE_Fortran_FLAGS "${HDF5_SOURCE_DIR}/config/intel-warnings/ifort-general") - list (APPEND HDF5_CMAKE_Fortran_FLAGS "-stand f03" "-free") + list (APPEND HDF5_CMAKE_Fortran_FLAGS "-stand:f03" "-free") elseif (CMAKE_Fortran_COMPILER_ID STREQUAL "GNU") ADD_H5_FLAGS (HDF5_CMAKE_Fortran_FLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/gfort-general") list (APPEND HDF5_CMAKE_Fortran_FLAGS "-ffree-form" "-fimplicit-none") diff --git a/config/cmake_ext_mod/ConfigureChecks.cmake b/config/cmake_ext_mod/ConfigureChecks.cmake index e44eb93..abeab3f 100644 --- a/config/cmake_ext_mod/ConfigureChecks.cmake +++ b/config/cmake_ext_mod/ConfigureChecks.cmake @@ -254,65 +254,63 @@ set (LINUX_LFS 0) set (HDF_EXTRA_C_FLAGS) set (HDF_EXTRA_FLAGS) if (MINGW OR NOT WINDOWS) - # Might want to check explicitly for Linux and possibly Cygwin - # instead of checking for not Solaris or Darwin. - if (NOT ${HDF_PREFIX}_HAVE_SOLARIS AND NOT ${HDF_PREFIX}_HAVE_DARWIN) - # Linux Specific flags - # This was originally defined as _POSIX_SOURCE which was updated to - # _POSIX_C_SOURCE=199506L to expose a greater amount of POSIX - # functionality so clock_gettime and CLOCK_MONOTONIC are defined - # correctly. This was later updated to 200112L so that - # posix_memalign() is visible for the direct VFD code on Linux - # systems. - # POSIX feature information can be found in the gcc manual at: - # http://www.gnu.org/s/libc/manual/html_node/Feature-Test-Macros.html - set (HDF_EXTRA_C_FLAGS -D_POSIX_C_SOURCE=200809L) - - # Need to add this so that O_DIRECT is visible for the direct - # VFD on Linux systems. - set (HDF_EXTRA_C_FLAGS ${HDF_EXTRA_C_FLAGS} -D_GNU_SOURCE) - - option (HDF_ENABLE_LARGE_FILE "Enable support for large (64-bit) files on Linux." ON) - if (HDF_ENABLE_LARGE_FILE AND NOT DEFINED TEST_LFS_WORKS_RUN) - set (msg "Performing TEST_LFS_WORKS") - try_run (TEST_LFS_WORKS_RUN TEST_LFS_WORKS_COMPILE - ${CMAKE_BINARY_DIR} - ${HDF_RESOURCES_EXT_DIR}/HDFTests.c - COMPILE_DEFINITIONS "-DTEST_LFS_WORKS" - ) + if (CMAKE_SYSTEM_NAME MATCHES "Linux") + # Linux Specific flags + # This was originally defined as _POSIX_SOURCE which was updated to + # _POSIX_C_SOURCE=199506L to expose a greater amount of POSIX + # functionality so clock_gettime and CLOCK_MONOTONIC are defined + # correctly. This was later updated to 200112L so that + # posix_memalign() is visible for the direct VFD code on Linux + # systems. + # POSIX feature information can be found in the gcc manual at: + # http://www.gnu.org/s/libc/manual/html_node/Feature-Test-Macros.html + set (HDF_EXTRA_C_FLAGS -D_POSIX_C_SOURCE=200809L) + + # Need to add this so that O_DIRECT is visible for the direct + # VFD on Linux systems. + set (HDF_EXTRA_C_FLAGS ${HDF_EXTRA_C_FLAGS} -D_GNU_SOURCE) + + option (HDF_ENABLE_LARGE_FILE "Enable support for large (64-bit) files on Linux." ON) + if (HDF_ENABLE_LARGE_FILE AND NOT DEFINED TEST_LFS_WORKS_RUN) + set (msg "Performing TEST_LFS_WORKS") + try_run (TEST_LFS_WORKS_RUN TEST_LFS_WORKS_COMPILE + ${CMAKE_BINARY_DIR} + ${HDF_RESOURCES_EXT_DIR}/HDFTests.c + COMPILE_DEFINITIONS "-DTEST_LFS_WORKS" + ) - # The LARGEFILE definitions were from the transition period - # and are probably no longer needed. The FILE_OFFSET_BITS - # check should be generalized for all POSIX systems as it - # is in the Autotools. - if (TEST_LFS_WORKS_COMPILE) - if (TEST_LFS_WORKS_RUN MATCHES 0) - set (TEST_LFS_WORKS 1 CACHE INTERNAL ${msg}) - set (LARGEFILE 1) - set (HDF_EXTRA_FLAGS ${HDF_EXTRA_FLAGS} -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE) - if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0") - message (VERBOSE "${msg}... yes") + # The LARGEFILE definitions were from the transition period + # and are probably no longer needed. The FILE_OFFSET_BITS + # check should be generalized for all POSIX systems as it + # is in the Autotools. + if (TEST_LFS_WORKS_COMPILE) + if (TEST_LFS_WORKS_RUN MATCHES 0) + set (TEST_LFS_WORKS 1 CACHE INTERNAL ${msg}) + set (LARGEFILE 1) + set (HDF_EXTRA_FLAGS ${HDF_EXTRA_FLAGS} -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE) + if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0") + message (VERBOSE "${msg}... yes") + endif () + else () + set (TEST_LFS_WORKS "" CACHE INTERNAL ${msg}) + if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0") + message (VERBOSE "${msg}... no") + endif () + file (APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log + "Test TEST_LFS_WORKS Run failed with the following exit code:\n ${TEST_LFS_WORKS_RUN}\n" + ) endif () else () set (TEST_LFS_WORKS "" CACHE INTERNAL ${msg}) if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0") - message (VERBOSE "${msg}... no") + message (VERBOSE "${msg}... no") endif () file (APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log - "Test TEST_LFS_WORKS Run failed with the following exit code:\n ${TEST_LFS_WORKS_RUN}\n" + "Test TEST_LFS_WORKS Compile failed\n" ) endif () - else () - set (TEST_LFS_WORKS "" CACHE INTERNAL ${msg}) - if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0") - message (VERBOSE "${msg}... no") - endif () - file (APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log - "Test TEST_LFS_WORKS Compile failed\n" - ) endif () - endif () - set (CMAKE_REQUIRED_DEFINITIONS ${CMAKE_REQUIRED_DEFINITIONS} ${HDF_EXTRA_FLAGS}) + set (CMAKE_REQUIRED_DEFINITIONS ${CMAKE_REQUIRED_DEFINITIONS} ${HDF_EXTRA_FLAGS}) endif () endif () @@ -560,7 +558,6 @@ if (MINGW OR NOT WINDOWS) foreach (other_test HAVE_ATTRIBUTE HAVE_C99_FUNC -# STDC_HEADERS HAVE_FUNCTION HAVE_C99_DESIGNATED_INITIALIZER SYSTEM_SCOPE_THREADS diff --git a/config/cmake_ext_mod/NSIS.template.in b/config/cmake_ext_mod/NSIS.template.in index ecced05..db79466 100644 --- a/config/cmake_ext_mod/NSIS.template.in +++ b/config/cmake_ext_mod/NSIS.template.in @@ -849,7 +849,7 @@ Section "Uninstall" @CPACK_NSIS_DELETE_ICONS@ @CPACK_NSIS_DELETE_ICONS_EXTRA@ - ;Delete empty start menu parent diretories + ;Delete empty start menu parent directories StrCpy $MUI_TEMP "$SMPROGRAMS\$MUI_TEMP" startMenuDeleteLoop: @@ -868,7 +868,7 @@ Section "Uninstall" Delete "$SMPROGRAMS\$MUI_TEMP\Uninstall.lnk" @CPACK_NSIS_DELETE_ICONS_EXTRA@ - ;Delete empty start menu parent diretories + ;Delete empty start menu parent directories StrCpy $MUI_TEMP "$SMPROGRAMS\$MUI_TEMP" secondStartMenuDeleteLoop: diff --git a/config/gnu-fflags b/config/gnu-fflags index ce12561..f67c063 100644 --- a/config/gnu-fflags +++ b/config/gnu-fflags @@ -163,7 +163,7 @@ if test "X-gfortran" = "X-$f9x_vendor"; then # gfortran >= 5 (do not include -Wuse-without-only) #if test $f9x_vers_major -ge 5; then - # H5_FCFLAGS="$H5_FCFLAGS $(load_gnu_arguments gfort-5)" + # DEVELOPER_WARNING_FCFLAGS="$DEVELOPER_WARNING_FCFLAGS $(load_gnu_arguments gfort-5)" #fi # gfortran >= 6 diff --git a/config/gnu-warnings/general b/config/gnu-warnings/general index a7a20b7..8b3af50 100644 --- a/config/gnu-warnings/general +++ b/config/gnu-warnings/general @@ -15,7 +15,10 @@ -Winit-self -Winvalid-pch -Wmissing-include-dirs -# +-Wshadow +-Wundef +-Wwrite-strings +-pedantic # NOTE: Due to the divergence in the C and C++, we're dropping support for # compiling the C library with a C++ compiler and dropping the -Wc++-compat # warning. @@ -26,7 +29,3 @@ # it to the developer flags. # -Wno-format-nonliteral --Wshadow --Wundef --Wwrite-strings --pedantic diff --git a/config/ibm-aix b/config/ibm-aix index b4a558d..f48f9d8 100644 --- a/config/ibm-aix +++ b/config/ibm-aix @@ -47,10 +47,10 @@ if test "X-" = "X-$FC"; then fi fi -# While we try to avoid setting FCFLAGS directly for use in compilation, in -# this case we need the -k flag present for some configure checks. As such, -# the configure script saves the user's set FCFLAGS before running, and -# restores them when complete. We must then set up both FCFLAGS and H5_FCFLAGS +# While we try to avoid setting FCFLAGS directly for use in compilation, in +# this case we need the -k flag present for some configure checks. As such, +# the configure script saves the user's set FCFLAGS before running, and +# restores them when complete. We must then set up both FCFLAGS and H5_FCFLAGS # to ensure the flag is present for both configure as well as for the build. if test "X-" = "X-$f9x_flags_set"; then F9XSUFFIXFLAG="-qsuffix=f=f90" diff --git a/config/sanitizer/sanitizers.cmake b/config/sanitizer/sanitizers.cmake index b06992f..4ba043b 100644 --- a/config/sanitizer/sanitizers.cmake +++ b/config/sanitizer/sanitizers.cmake @@ -30,7 +30,7 @@ endfunction() message(STATUS "USE_SANITIZER=${USE_SANITIZER}, CMAKE_C_COMPILER_ID=${CMAKE_C_COMPILER_ID}") if(USE_SANITIZER) - if(INTEL_CLANG OR CMAKE_C_COMPILER_ID MATCHES "[Cc]lang") + if(CMAKE_C_COMPILER_ID MATCHES "IntelLLVM" OR CMAKE_C_COMPILER_ID MATCHES "[Cc]lang") set(CMAKE_EXPORT_COMPILE_COMMANDS ON) if(UNIX) diff --git a/config/sanitizer/tools.cmake b/config/sanitizer/tools.cmake index 242e33f..3a41ad4 100644 --- a/config/sanitizer/tools.cmake +++ b/config/sanitizer/tools.cmake @@ -90,7 +90,7 @@ find_program(CPPCHECK_EXE NAMES "cppcheck") mark_as_advanced(FORCE CPPCHECK_EXE) if(CPPCHECK_EXE) message(STATUS "cppcheck found: ${CPPCHECK_EXE}") - if(CPPECHECK) + if(CPPCHECK) set(CMAKE_CXX_CPPCHECK "${CPPCHECK_EXE};--enable=warning,performance,portability,missingInclude;--template=\"[{severity}][{id}] {message} {callstack} \(On {file}:{line}\)\";--suppress=missingIncludeSystem;--quiet;--verbose;--force" ) diff --git a/config/solaris b/config/solaris index b7c7963..6b6b74d 100644 --- a/config/solaris +++ b/config/solaris @@ -39,7 +39,7 @@ if test "X-" = "X-$cc_flags_set"; then # Debug # NDEBUG is handled explicitly by the configure script - # -g is hanled by the symbols flags + # -g is handled by the symbols flags DEBUG_CFLAGS= # Symbols @@ -101,7 +101,7 @@ if test "X-" = "X-$f9x_flags_set"; then # Debug # NDEBUG is handled explicitly by the configure script - # -g is hanled by the symbols flags + # -g is handled by the symbols flags DEBUG_FCFLAGS= # Symbols @@ -157,7 +157,7 @@ if test -z "$cxx_flags_set"; then # Debug # NDEBUG is handled explicitly by the configure script - # -g is hanled by the symbols flags + # -g is handled by the symbols flags DEBUG_CXXFLAGS= # Symbols diff --git a/config/toolchain/GCC.cmake b/config/toolchain/GCC.cmake deleted file mode 100644 index c41d0ca..0000000 --- a/config/toolchain/GCC.cmake +++ /dev/null @@ -1,11 +0,0 @@ -# Uncomment the following line and the correct system name to use cross-compiling -#set(CMAKE_SYSTEM_NAME Linux) - -set(CMAKE_COMPILER_VENDOR "GCC") - -set(CMAKE_C_COMPILER cc) -set(CMAKE_CXX_COMPILER c++) -set(CMAKE_Fortran_COMPILER gfortran) - -# the following is used if cross-compiling -set(CMAKE_CROSSCOMPILING_EMULATOR "") diff --git a/config/toolchain/PGI.cmake b/config/toolchain/PGI.cmake deleted file mode 100644 index ec58cbb..0000000 --- a/config/toolchain/PGI.cmake +++ /dev/null @@ -1,11 +0,0 @@ -# Uncomment the following to use cross-compiling -#set(CMAKE_SYSTEM_NAME Linux) - -set(CMAKE_COMPILER_VENDOR "PGI") - -set(CMAKE_C_COMPILER pgcc) -set(CMAKE_CXX_COMPILER pgc++) -set(CMAKE_Fortran_COMPILER pgf90) - -# the following is used if cross-compiling -set(CMAKE_CROSSCOMPILING_EMULATOR "") diff --git a/config/toolchain/aarch64.cmake b/config/toolchain/aarch64.cmake new file mode 100644 index 0000000..adb8639 --- /dev/null +++ b/config/toolchain/aarch64.cmake @@ -0,0 +1,17 @@ +set(TOOLCHAIN_PREFIX aarch64-linux-gnu) +set(ANDROID_NDK /opt/android-ndk-r25b-linux/android-ndk-r25b) +set (CMAKE_SYSTEM_NAME Android) +set (CMAKE_ANDROID_ARCH_ABI x86_64) +#set (CMAKE_ANDROID_STANDALONE_TOOLCHAIN ${ANDROID_NDK}/build/cmake/andriod.toolchain.cmake) +set (CMAKE_C_COMPILER ${TOOLCHAIN_PREFIX}-gcc) +set (CMAKE_CXX_COMPILER ${TOOLCHAIN_PREFIX}-g++) +#set (CMAKE_RC_COMPILER ${TOOLCHAIN_PREFIX}-windres) +set (CMAKE_Fortran_COMPILER ${TOOLCHAIN_PREFIX}-gfortran) +set (CMAKE_FIND_ROOT_PATH /usr/${TOOLCHAIN_PREFIX}) +set (CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) +set (CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) +set (CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) +set (CMAKE_CROSSCOMPILING_EMULATOR qemu-aarch64) + +include_directories(/usr/${TOOLCHAIN_PREFIX}/include) + diff --git a/config/toolchain/gcc.cmake b/config/toolchain/gcc.cmake new file mode 100644 index 0000000..c41d0ca --- /dev/null +++ b/config/toolchain/gcc.cmake @@ -0,0 +1,11 @@ +# Uncomment the following line and the correct system name to use cross-compiling +#set(CMAKE_SYSTEM_NAME Linux) + +set(CMAKE_COMPILER_VENDOR "GCC") + +set(CMAKE_C_COMPILER cc) +set(CMAKE_CXX_COMPILER c++) +set(CMAKE_Fortran_COMPILER gfortran) + +# the following is used if cross-compiling +set(CMAKE_CROSSCOMPILING_EMULATOR "") diff --git a/config/toolchain/icc.cmake b/config/toolchain/icc.cmake new file mode 100644 index 0000000..97f6a64 --- /dev/null +++ b/config/toolchain/icc.cmake @@ -0,0 +1,11 @@ +# Uncomment the following to use cross-compiling +#set(CMAKE_SYSTEM_NAME Linux) + +set(CMAKE_COMPILER_VENDOR "intel") + +set(CMAKE_C_COMPILER icc) +set(CMAKE_CXX_COMPILER icpc) +set(CMAKE_Fortran_COMPILER ifort) + +# the following is used if cross-compiling +set(CMAKE_CROSSCOMPILING_EMULATOR "") diff --git a/config/toolchain/intel.cmake b/config/toolchain/intel.cmake index ae1d2f8..f8f60b2 100644 --- a/config/toolchain/intel.cmake +++ b/config/toolchain/intel.cmake @@ -3,16 +3,9 @@ set(CMAKE_COMPILER_VENDOR "intel") -if(USE_SANITIZER) - set(CMAKE_C_COMPILER icl) - set(CMAKE_CXX_COMPILER icl++) - set(CMAKE_Fortran_COMPILER ifort) - set(INTEL_CLANG ON) -else () - set(CMAKE_C_COMPILER icc) - set(CMAKE_CXX_COMPILER icpc) - set(CMAKE_Fortran_COMPILER ifort) -endif () +set(CMAKE_C_COMPILER icx) +set(CMAKE_CXX_COMPILER icpx) +set(CMAKE_Fortran_COMPILER ifx) # the following is used if cross-compiling set(CMAKE_CROSSCOMPILING_EMULATOR "") diff --git a/config/toolchain/pgi.cmake b/config/toolchain/pgi.cmake new file mode 100644 index 0000000..ec58cbb --- /dev/null +++ b/config/toolchain/pgi.cmake @@ -0,0 +1,11 @@ +# Uncomment the following to use cross-compiling +#set(CMAKE_SYSTEM_NAME Linux) + +set(CMAKE_COMPILER_VENDOR "PGI") + +set(CMAKE_C_COMPILER pgcc) +set(CMAKE_CXX_COMPILER pgc++) +set(CMAKE_Fortran_COMPILER pgf90) + +# the following is used if cross-compiling +set(CMAKE_CROSSCOMPILING_EMULATOR "") diff --git a/release_docs/RELEASE.txt b/release_docs/RELEASE.txt index 94eb6eb..57107fc 100644 --- a/release_docs/RELEASE.txt +++ b/release_docs/RELEASE.txt @@ -1,4 +1,4 @@ -HDF5 version 1.8.23 released on 2023-01-30 +HDF5 version 1.8.23 released on 2023-02-07 ================================================================================ @@ -569,6 +569,13 @@ Platforms Tested Known Problems ============== + MacOS using CMake to build HDF5 with ifort versions 2021.2.0 or 2021.3.0 has + a test failure that does not occur when using Autotools to build it. All + tests also pass using CMake with ifort version 2021.8.0 on macOS13. This + failure may not indicate any particular problem with the build. It can + be avoided by building with clang and gfortran for CMake builds or by using + Autotools to build with ifort on macOS. + CMake files do not behave correctly with paths containing spaces. Do not use spaces in paths because the required escaping for handling spaces results in very complex and fragile build files. diff --git a/src/libhdf5.settings.in b/src/libhdf5.settings.in index 0d56eb3..c4bf345 100644 --- a/src/libhdf5.settings.in +++ b/src/libhdf5.settings.in @@ -17,7 +17,7 @@ Compiling Options: Compilation Mode: @CONFIG_MODE@ C Compiler: @CC_VERSION@ C Flags: @CFLAGS@ - H5 C Flags: @H5_CFLAGS@ @H5_ECFLAGS@ + H5 C Flags: @H5_CFLAGS@ AM C Flags: @AM_CFLAGS@ CPPFLAGS: @CPPFLAGS@ H5_CPPFLAGS: @H5_CPPFLAGS@ @@ -48,7 +48,7 @@ Languages: C++: @HDF_CXX@ @BUILD_CXX_CONDITIONAL_TRUE@ C++ Compiler: @CXX_VERSION@ @BUILD_CXX_CONDITIONAL_TRUE@ C++ Flags: @CXXFLAGS@ -@BUILD_CXX_CONDITIONAL_TRUE@ H5 C++ Flags: @H5_CXXFLAGS@ @H5_ECXXFLAGS@ +@BUILD_CXX_CONDITIONAL_TRUE@ H5 C++ Flags: @H5_CXXFLAGS@ @BUILD_CXX_CONDITIONAL_TRUE@ AM C++ Flags: @AM_CXXFLAGS@ @BUILD_CXX_CONDITIONAL_TRUE@ Shared C++ Library: @enable_shared@ @BUILD_CXX_CONDITIONAL_TRUE@ Static C++ Library: @enable_static@ -- cgit v0.12