Control: reassign -1 autoconf-archive
Control: retitle -1 autoconf-archive: broken ax_lib_hdf5.m4 macro for HDF5 >= 2.1

Hi,

KIPP CANNON a écrit le 23/10/2026 à 06:43 :
Attached is a minimal example that demonstrates the failure:

- empty main() in a .c that #include's hdf5.h (to confirm headers work)

- the ax_lib_hdf5.m4 macro from the current autoconf-archive package

- configure.ac with enough boiler plate to run the AX_LIB_HDF5 macro

- Makefile.am to compile main.c with configure's compiler and linker flags

- runme.sh to run through the auto* tools, then run configure and
make, and then clean up if that all worked.

When configure runs link tests on libhdf5 they will fail, but those
tests failing are not fatal for the configure script.  make will then
fail when linking for the same reason:  h5cc reports the wrong
LDFLAGS.

Thanks for reporting this issue and providing a reproducer.

Unfortunately your analysis is wrong. The helper script 'h5cc' is correct:

$ h5cc -show
/usr/bin/x86_64-linux-gnu-gcc -I/usr/include/hdf5/serial -lhdf5_serial_hl -lhdf5_serial

There is no need for a '-L' flags since 'libhdf5_serial_hl.so' and 'libhdf5_serial.so' are in the system path for libraries.

In your minimal example the culprit is the 'ax_lib_hdf5.m4' macro. See this pull request [1] I opened a few months ago on the 'autoconf-archive' project.

[1] https://github.com/autoconf-archive/autoconf-archive/pull/343

Reassigning this issue to 'autonconf-archive' then.

Best,
_g.

Attachment: OpenPGP_signature.asc
Description: OpenPGP digital signature

Reply via email to