🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: linux.debian.bugs.dist
2 messages
2 total messages Started by Kipp Cannon Thu, 22 Oct 2026 09:00
Bug#1151618: hdf5-helpers: h5cc reports incorrect LDFLAGS, missing required -L option
#1687
Author: Kipp Cannon
Date: Thu, 22 Oct 2026 09:00
61 lines
4118 bytes
Package: hdf5-helpers
Version: 2.2.0+repack-5
Severity: normal
X-Debbugs-Cc: kipp@g.ecc.u-tokyo.ac.jp

The symptom is that autoconf based software that tries to link to libhdf5 fails
during the linking phase.  The configure script will succeed, find libhdf5, but
the build will fail with

"/usr/bin/x86_64-linux-gnu-ld.bfd: cannot find -lhdf5: No such file or
directory"

The work-around is to manually edit the Makefile in the directory with the
failing code, finding the line

HDF5_LDFLAGS =

and changing it to

HDF5_LDFLAGS = -L/usr/lib/x86_64-linux-gnu/hdf5/serial

or whatever is appropriate for the system.

The cause of this bug.  the AX_LIB_HDF5 macro in autoconf-archive runs "h5cc
-showconfig" to retrieve the CLFAGS, LDFLAGS, etc., for compiling software that
links to libhdf5.  It grep's for either H5_LDFLAGS or AM_LDFLAGS or both in the
output, I'm not sure which, and reports their value(s) in an autoconf variable.
There is a comment in the macro source code that one of the two is guaranteed
to be blank so the two values are combined blindly, but I can't find where it
actually does that, I can only find it grep'ing for H5_LDFLAGS, so that's why
I'm not sure what's going on, but that's immaterial because neither of them is
reporting the correct value.

h5cc reports both values to be blank.  However libhdf5.so from libhdf5-dev is
in /usr/lib/x86_64-linux-gnu/hdf5/serial/libhdf5.so and so the correct LDFLAGS
is -L/usr/lib/x86_64-linux-gnu/hdf5/serial

I think h5cc needs to be modified to report -L/usr/lib/x86_64-linux-
gnu/hdf5/serial in one or other of its LDFLAGS variables.  Or libhdf5-dev needs
to be rebuilt with the .so put into the linker's default search path.  I've
assumed the bug is in h5cc, not the install path for libhdf5.so, that seems
deliberate, but the maintainers of these packages might shift the blame.

Since it doesn't report the correct linker flags to the user, it's possible
that h5cc is itself incapable of compiling libhdf5 based software.  I haven't
checked that.


-- System Information:
Debian Release: forky/sid
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: amd64 (x86_64)

Kernel: Linux 7.2.11+deb14-amd64 (SMP w/20 CPU threads; PREEMPT)
Locale: LANG=en_CA.UTF-8, LC_CTYPE=en_CA.UTF-8 (charmap=UTF-8), LANGUAGE=en_CA:en
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

-- no debconf information
Bug#1151618: minimal example
#2207
Author: hotcheeks.oreilly
Date: Mon, 26 Oct 2026 04:10
13 lines
3141 bytes
Hi,

Thanks for the clarification.  Sorry for the duplicate problem report,
I didn't realize that libhdf5.so was no longer intended to be linked to
directly.

Since the libraries and their matching autoconf macro don't live
together, maybe, if it's not already done, something along the lines of
the test script I provided could be added to whatever test suite hdf5-
helpers and/or libhdf5-dev might have, to automatically detect new
incompatibilities with the autoconf-archive package.

-Kipp
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads