Package: libhdf5-100
Version: 1.10.0-patch1+docs-3
Tags: upstream patch
User: debian-sparc@lists.debian.org
Usertags: sparc64
X-Debbugs-Cc: debian-sparc@lists.debian.org, Ghislain Vaillant <ghisvail@gmail.com>
Control: affects -1 src:h5py
Hi,
Currently libhdf5-100 performs unaligned memory accesses on sparc64 in
certain cases, and this is causing the latest version of h5py to FTBFS
due to the test suite being killed with SIGBUS when doing vlen-related
tests (the tests in question being new in the latest upstream version).
On investigating, there are two issues:
1. NO_ALIGNMENT_RESTRICTIONS is being defined on sparc64. GCC is
sufficiently smart to notice that the test program run when
configuring is performing unaligned accesses, and so instead of
using the usual multi-byte load instructions (which require the
address to be aligned), it expands it out into individual byte
loads, and therefore the test actually succeeds. This is only
because GCC can statically determine that the address is unaligned,
and therefore tries to be helpful (since it knows using multi-byte
loads will never work), whereas for a general address it will assume
the address is aligned and emit a single multi-byte load.
Adding in a few volatile qualifiers in the important places ensures
that GCC can no longer statically prove the relevant addresses are
unaligned, and therefore it uses the normal multi-byte load
instructions and the test program will crash, so configure knows not
to define NO_ALIGNMENT_RESTRICTIONS.
2. Even with that fixed, H5T_vlen_reclaim_recurse needs fixing to
ensure it doesn't perform unaligned accesses when not supported.
With the attached patch, h5py's test suite now passes again. Please feel
free to forward this patch upstream if you deem it acceptable.
Regards,
James
Gbp-Pq: Name fix-unaligned-accesses.patch
so that '_<flavor-name>' is appended to each built library, .e.g.
libhdf5_<flavor-name>.so.
This we can avoid library name collisions when installing both serial
and $mpi flavors of the libraries:
* serial is built with no flavor name
* $mpi parallel versions use --with-flavor=$mpi
===================================================================
Gbp-Pq: Name flavor-configure-option.patch