Building error on HDF5 1.12.3

Building the cygwin package for 1.12.3 I found 2 surprises that caused me puzzling build messages and errors:

Comparing with 1.12.2 I found

— hdf5-1.12.2-1.x86_64/origsrc/hdf5-1.12.2/configure.ac 2022-04-19 18:44:03.000000000 +0200
+++ hdf5-1.12.3-1.x86_64/origsrc/hdf5-1.12.3/configure.ac 2023-11-02 04:43:13.000000000 +

-AC_PREREQ([2.69])
+AC_PREREQ([2.71])

the change for AC is wrong as 2.71 complains a lot about obsolete declarations and 2.69 works fine. Reverting to 2.69 cut all the misleading Autoconf messages.

+## Strip out -Werror from CFLAGS since that can cause checks to fail when
+## compiling the test program fails due to warnings
+CFLAGS=“echo $CFLAGS | sed -e 's/-Werror//g'
+CXXFLAGS=“echo $CXXFLAGS | sed -e 's/-Werror//g'
+FCFLAGS=“echo $FCFLAGS | sed -e 's/-Werror//g'
+JAVACFLAGS=“echo $JAVACFLAGS | sed -e 's/-Werror//g'
+CPPFLAGS=“echo $CPPFLAGS | sed -e 's/-Werror//g'

This implementation is error prone.On Cygwin build system the variables are crippled

CFLAGS = -ggdb -O2 -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 …

and stripping “-Werror” leave “=format-security” alone causing configure to estimate
that the C compiler fails to compile.

Hi Marco!

I hear that our developers have already contacted you personally about this, but for people reading this post:

  • Autoconf 2.71 is required due to changes to Intel’s new compilers, so we can’t really change that. If Cygwin is complaining, we should investigate and fix the macros. You can send details to me or any of the other developers and we’ll investigate.

  • The CFLAGS changes were made to support using -Werror when building in CI as the test programs generated by configure would emit warnings and fail. We’ll fix those sed lines to be more robust.