Your message dated Thu, 29 Oct 2026 15:44:35 +0000
with message-id <[email protected]>
and subject line Bug#1152292: fixed in hdf5 2.2.0+repack-6
has caused the Debian Bug report #1152292,
regarding hdf5: testhdf5_fortran fails to link with LTO (GCC PR 117303)
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
1152292: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1152292
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: hdf5
Version: 2.2.0+repack-5
Severity: minor
Tags: patch upstream
Control: forwarded -1 https://github.com/HDFGroup/hdf5/pull/6794

Dear Maintainer,

With LTO enabled, the build fails linking the Fortran test program:

 /usr/bin/ld: ...ltrans.o:(.rodata+0x58): undefined reference to 
`test_append_flush_callback'
 collect2: error: ld returned 1 exit status
 make[4]: *** [fortran/test/CMakeFiles/testhdf5_fortran.dir/build.make:333: 
bin/testhdf5_fortran] Error 1

fortran/test/tH5F_SWMR.F90 passes C_FUNLOC(test_append_flush_callback)
directly as an actual argument. gfortran stores the function address in
a static constant, and LTO does not see that as a reference, so it drops
the callback. This is GCC PR 117303
(https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117303), fixed in GCC 16
and on the gcc-15 branch.

Debian does not build with LTO by default, so the Debian build is not
affected. Ubuntu enables LTO by default, so Ubuntu builds of this
package fail. I hit it building 2.2.0+repack-5 for Ubuntu 24.04 (GCC 13).
Anyone building with DEB_BUILD_MAINT_OPTIONS=optimize=+lto and GCC 11 to
15 would hit it too.

The attached quilt patch assigns C_FUNLOC to a variable first, as the
other Fortran tests already do. It is the upstream fix
(https://github.com/HDFGroup/hdf5/pull/6794), so it can be dropped once
that is in a release.

Thanks,
Scot Breitenfeld
The HDF Group
Description: Fix testhdf5_fortran link failure with LTO
 Passing C_FUNLOC() directly as an argument hits GCC PR 117303 with LTO
 (undefined reference to test_append_flush_callback). Assign it to a
 variable first.
Origin: upstream, https://github.com/HDFGroup/hdf5/pull/6794
Bug: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117303

diff --git a/fortran/test/tH5F_SWMR.F90 b/fortran/test/tH5F_SWMR.F90
--- a/fortran/test/tH5F_SWMR.F90
+++ b/fortran/test/tH5F_SWMR.F90
@@ -110,6 +110,7 @@ CONTAINS
     INTEGER(HSIZE_T), DIMENSION(1:2) :: boundary
     INTEGER :: ndims
     TYPE(C_FUNPTR) :: callback_func
+    TYPE(C_FUNPTR) :: append_cb
     TYPE(C_PTR) :: user_data
     LOGICAL :: flag_set
 #ifdef H5_HAVE_HL
@@ -121,6 +122,9 @@ CONTAINS
 #endif
 
     ! Initialize
+    ! Assign C_FUNLOC to a variable rather than passing it directly as an argument:
+    ! with LTO, gfortran before GCC 16 drops the callback and fails to link (GCC PR 117303)
+    append_cb = C_FUNLOC(test_append_flush_callback)
     filename = "swmr_test.h5"
     CALL h5_fixname_f(filename, fix_filename, H5P_DEFAULT_F, error)
     CALL check("h5_fixname_f", error, total_error)
@@ -245,7 +249,7 @@ CONTAINS
     CALL verify("h5pset_append_flush_f: counter initial value", INT(callback_counter), 0, total_error)
 
     ! Set append flush with callback function and user data
-    CALL h5pset_append_flush_f(dapl_id, ndims, boundary, error, C_FUNLOC(test_append_flush_callback), C_LOC(callback_counter))
+    CALL h5pset_append_flush_f(dapl_id, ndims, boundary, error, append_cb, C_LOC(callback_counter))
     CALL check("h5pset_append_flush_f (with callback)", error, total_error)
 
     ! Verify counter is still 0 (callback not invoked yet - only invoked during dataset operations)
@@ -302,7 +306,7 @@ CONTAINS
     ! Set append flush with boundary=1 and our callback
     boundary(1) = 1
     CALL h5pset_append_flush_f(dapl_id, 1, boundary(1:1), error, &
-                                C_FUNLOC(test_append_flush_callback), C_LOC(callback_counter))
+                                append_cb, C_LOC(callback_counter))
     CALL check("h5pset_append_flush_f (for append test)", error, total_error)
 
     ! Create dataset with the callback-enabled DAPL

Attachment: smime.p7s
Description: S/MIME cryptographic signature


--- End Message ---
--- Begin Message ---
Source: hdf5
Source-Version: 2.2.0+repack-6
Done: Gilles Filippini <[email protected]>

We believe that the bug you reported is fixed in the latest version of
hdf5, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to [email protected],
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Gilles Filippini <[email protected]> (supplier of updated hdf5 package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing [email protected])


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

Format: 1.8
Date: Thu, 29 Oct 2026 15:13:05 +0100
Source: hdf5
Architecture: source
Version: 2.2.0+repack-6
Distribution: unstable
Urgency: medium
Maintainer: Gilles Filippini <[email protected]>
Changed-By: Gilles Filippini <[email protected]>
Closes: 1040862 1149918 1152290 1152291 1152292
Changes:
 hdf5 (2.2.0+repack-6) unstable; urgency=medium
 .
   * Drop build-dependency on libcurl4-openssl-dev, unneeded as we don't
     enable ROS3 VFD which depends on aws-c-s3 (not in Debian yet)
     (closes: #1040862, #1149918)
   * Build-Depends on pkgconf, required by the hdf5 helper scripts
     (closes: #1152291)
   * hdf5-helper, libhdf5-{openmpi,mpich}-dev: Depends: pkgconf
     (requested bu h5cc et al; closes: #1152290)
   * New path from upstream PR 6794 to fix testhdf5_fortran link failure
     with LTO (closes: #1152292)
Checksums-Sha1:
 28d002a09aeaa47025841a8d91170f0209b61db1 3889 hdf5_2.2.0+repack-6.dsc
 bece325ed210bcf200c8238b41eac08018e2602e 167976 
hdf5_2.2.0+repack-6.debian.tar.xz
 75f3ec95d2d6a37c3ddc8a03525410868b2829c6 33451 
hdf5_2.2.0+repack-6_amd64.buildinfo
Checksums-Sha256:
 4043d8d7fcccaba1afc92b6eca9b67be4bfbf3919e6a5459dc96084fdb00653d 3889 
hdf5_2.2.0+repack-6.dsc
 7d5098c8f2f8cd9b2126fc8cf407827c92a844d6d9f92c5384403677e02ef1cf 167976 
hdf5_2.2.0+repack-6.debian.tar.xz
 056137a83489e339c7e062d14ddeeef8a138e0117c28de689190fff71ac9ebe8 33451 
hdf5_2.2.0+repack-6_amd64.buildinfo
Files:
 f80206bfb05c4e324a41e32e4f02e6b9 3889 science optional hdf5_2.2.0+repack-6.dsc
 0b6565dfb48ed5c72ee12fc509964c6b 167976 science optional 
hdf5_2.2.0+repack-6.debian.tar.xz
 13072630c89aeb78c6d09410d588b7d5 33451 science optional 
hdf5_2.2.0+repack-6_amd64.buildinfo

-----BEGIN PGP SIGNATURE-----

iQFEBAEBCgAuFiEEoJObzArDE05WtIyR7+hsbH/+z4MFAmrjW1MQHHBpbmlAZGVi
aWFuLm9yZwAKCRDv6Gxsf/7Pgx3jCACGgTCkc30/tUqHCmORQhp/umJ+Xl/rsbcS
yDAr/jcZmBre22yNGi+PP/iu2GsdU3Pze0ZBb2LNxRequEBtdz6cIQ30D6oJhc/1
sXE+RX896elWsC1zFlrSCJBf2hwm7drVuXqN8DolM3JEsjDlF7PFdz4/SFlUHKVB
ymJeqznpLC/gmghxRPu/4CpTMSHYoFkRydv1nwUP0Fli0EWh78IXNav94f1n88cS
QP2du5nJm2BZzvS2vID16TCxu/NG3JEQZp/jTxp9SwdEv2KGQBMerbag7URBpmBH
n+qCv7KoW2Zc3qgyIhOV0Stbzusg+7hCnsF2UXIHBdg52HxCqCy2
=XIyj
-----END PGP SIGNATURE-----

Attachment: pgpAISNnUmaWM.pgp
Description: PGP signature


--- End Message ---

Reply via email to