My understanding is that releases of HDF5 which differ in only the last (patch) 
digit are not *always* ABI (Application Binary Interface) compatible. They try 
to be but for practical reasons they are not always.

When the are not, compiling (e.g. using headers) with one version of the 
library but linking (e.g. using .a,.so,.dyllib) to another can fail for all 
sorts of hard-to-diagnose reasons.

The version check HDF5 has implemented is a sufficient but not always necessary 
check. It always prevent potentially bad things from happening. But, that is at 
the expense of not allowing things to proceed when they may be able to.

The HDF5_DISABLE_VERSION_CHECK env. variable setting is a way to work-around 
the not-always-necessary cases.

But, all that said, the issue here is that HDF5 developers are leaving it up to 
users of the library to decide if two versions are ABI compatible. Or, more 
correctly, they make no claim that two last-digit-differing versions will be 
ABI compatible. If two versions are, or at least are within the confines of the 
subset of calls made by a particular application, that is more by coincidence 
then by design. At least that is my impression.

OTOH, HDF5 develepers could build-in to the library knowledge of its ABI 
compatible version history so that when headers and libs from two different 
versions are mixed, it generates an error only when the two are indeed known 
not to be ABI compatible.

Mark

PS: In at least one case in the past (1.6.0 to 1.6.2 I think) two different 
versions were not even file format compatible if you were using checksuming 
feature.

From: Hdf-forum 
<[email protected]<mailto:[email protected]>>
 on behalf of Marco Atzeri 
<[email protected]<mailto:[email protected]>>
Reply-To: HDF Users Discussion List 
<[email protected]<mailto:[email protected]>>
Date: Tuesday, June 21, 2016 at 1:54 AM
To: "[email protected]<mailto:[email protected]>" 
<[email protected]<mailto:[email protected]>>
Subject: [Hdf-forum] HDF5_DISABLE_VERSION_CHECK and disable_version_check

Could someone explain me the logic behind the version check ?

Or two sequential versions have compatible API or they don't have.

hdf5-1.8.17 and hdf5-1.8.16 both produces the same API version

usr/bin/cyghdf5-10.dll
usr/bin/cyghdf5_hl-10.dll

I don't understand the logic to state that they have the same API
but scare the users:

-------------------------------------------------------------------
Warning! ***HDF5 library version mismatched error***
The HDF5 header files used to compile this application do not match
the version used by the HDF5 library to which this application is linked.
Data corruption or segmentation faults may occur if the application
continues.
This can happen when an application was compiled by one version of HDF5 but
linked with a different version of static or shared HDF5 library.
You should recompile the application or check your shared library related
settings such as 'LD_LIBRARY_PATH'.
'HDF5_DISABLE_VERSION_CHECK' environment variable is set to 1,
application will
continue at your own risk.
--------------------------------------------------------------------

As example of puzzled users:
https://cygwin.com/ml/cygwin/2016-06/msg00267.html

I am not really a fan of rebuilding every program depending from HDF5
if the API is still compatible, it is against the reason of having a
API version.

Thanks in advance
Marco Atzeri

(cygwin package maintainer)

_______________________________________________
Hdf-forum is for HDF software users discussion.
[email protected]<mailto:[email protected]>
http://lists.hdfgroup.org/mailman/listinfo/hdf-forum_lists.hdfgroup.org
Twitter: https://twitter.com/hdf5

_______________________________________________
Hdf-forum is for HDF software users discussion.
[email protected]
http://lists.hdfgroup.org/mailman/listinfo/hdf-forum_lists.hdfgroup.org
Twitter: https://twitter.com/hdf5

Reply via email to