Opened 6 years ago

Closed 6 years ago

#56312 closed defect (fixed)

hdf5: header library version mismatch

Reported by: tenomoto (Takeshi Enomoto) Owned by: mamoll (Mark Moll)
Priority: Normal Milestone:
Component: ports Version:
Keywords: Cc: fvaccari, basmac, mmpagani (Marco Pagani), Dave-Allured (Dave Allured)
Port: hdf5

Description

Binaries using hdf5 stops with the following error due to version mismatch between header and library. The version numbers in src/Makefile.in (lines 869 and on) may be relevant. As said in the error message, we could ignore by setting environmental variable HDF5_DISABLE_VERSION_CHECK to 1 or 2.

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'.
You can, at your own risk, disable this warning by setting the environment
variable 'HDF5_DISABLE_VERSION_CHECK' to a value of '1'.
Setting it to 2 or higher will suppress the warning messages totally.
Headers are 1.10.1, library is 1.10.2
	    SUMMARY OF THE HDF5 CONFIGURATION
	    =================================

General Information:
-------------------
                   HDF5 Version: 1.10.2
                  Configured on: Sun Apr  8 19:45:55 UTC 2018
                  Configured by: macports@highsierra.internal.macports.net
                    Host system: x86_64-apple-darwin17.4.0
              Uname information: Darwin highsierra.internal.macports.net 17.4.0 Darwin Kernel Version 17.4.0: Sun Dec 17 09:19:54 PST 2017; root:xnu-4570.41.2~1/RELEASE_X86_64 x86_64
                       Byte sex: little-endian
             Installation point: /opt/local

Compiling Options:
------------------
                     Build Mode: production
              Debugging Symbols: no
                        Asserts: no
                      Profiling: no
             Optimization Level: high

Linking Options:
----------------
                      Libraries: static, shared
  Statically Linked Executables: 
                        LDFLAGS: -L/opt/local/lib -Wl,-headerpad_max_install_names 
                     H5_LDFLAGS: 
                     AM_LDFLAGS: 
                Extra libraries: -lz -ldl -lm 
                       Archiver: ar
                       AR_FLAGS: cr
                         Ranlib: ranlib

Languages:
----------
                              C: yes
                     C Compiler: /usr/bin/clang
                       CPPFLAGS: -I/opt/local/include
                    H5_CPPFLAGS:   -DNDEBUG -UH5_DEBUG_API
                    AM_CPPFLAGS: 
                        C Flags: -pipe -Os 
                     H5 C Flags:     
                     AM C Flags: 
               Shared C Library: yes
               Static C Library: yes


                        Fortran: no

                            C++: yes
                   C++ Compiler: /usr/bin/clang++
                      C++ Flags: -pipe -Os -stdlib=libc++ 
                   H5 C++ Flags:    
                   AM C++ Flags: 
             Shared C++ Library: yes
             Static C++ Library: yes

                           Java: no


Features:
---------
                  Parallel HDF5: no
             High-level library: yes
                   Threadsafety: no
            Default API mapping: v110
 With deprecated public symbols: yes
         I/O filters (external): deflate(zlib)
                            MPE: no
                     Direct VFD: no
                        dmalloc: no
 Packages w/ extra debug output: none
                    API tracing: no
           Using memory checker: no
Memory allocation sanity checks: no
            Metadata trace file: no
         Function stack tracing: no
      Strict file format checks: no
   Optimization instrumentation: no

Change History (14)

comment:1 Changed 6 years ago by mamoll (Mark Moll)

I rev bumped all ports that depend on hdf5 after I updated the hdf5 port not too long ago. It's possible I missed one. Which port caused this error?

comment:2 Changed 6 years ago by ryandesign (Ryan Carsten Schmidt)

Cc: mamoll removed

comment:3 Changed 6 years ago by tenomoto (Takeshi Enomoto)

I don't think that this is a rev bump problem. I think you rev bumped all the ports including those causing error. In src/Makefile.in, versions for some are 100, others are 101 and 102. port contents hdf5 shows that ${prefix}/lib/libhdf5.101.dylib is installed rather than ${prefix}/lib/libhdf5.102.dylib. May be better to report upstream.

comment:4 Changed 6 years ago by fvaccari

Cc: fvaccari added

comment:5 Changed 6 years ago by basmac

Cc: basmac added

comment:6 Changed 6 years ago by basmac

Still have to set HDF5_DISABLE_VERSION_CHECK=2 (May 11, 2018)

comment:7 Changed 6 years ago by mmpagani (Marco Pagani)

Cc: mmpagani added

comment:8 in reply to:  1 ; Changed 6 years ago by Dave-Allured (Dave Allured)

Replying to mamoll:

I rev bumped all ports that depend on hdf5 after I updated the hdf5 port not too long ago. It's possible I missed one. Which port caused this error?

Yup, it looks like netcdf was missed. Pull request submitted. That should fix it for netcdf, also many other ports that depend on netcdf.

https://github.com/macports/macports-ports/pull/1829

Last edited 6 years ago by Dave-Allured (Dave Allured) (previous) (diff)

comment:9 Changed 6 years ago by Dave-Allured (Dave Allured)

Cc: Dave-Allured added

comment:10 in reply to:  8 Changed 6 years ago by Dave-Allured (Dave Allured)

Replying to Dave-Allured: This pull request failed. Netcdf maintainer, please rev bump the netcdf port file so that netcdf build will link to hdf5 1.10.2 rather than 1.10.1. Thank you.

comment:11 Changed 6 years ago by basmac

any work being done on fixing this issue ?

comment:12 Changed 6 years ago by mamoll (Mark Moll)

I can't reproduce this problem on my machine running macOS 10.3.5 and MacPorts 2.5.

comment:13 Changed 6 years ago by basmac

The fix for us using netcdf programs which generate the hdf5 message above regarding mismatch, was to uninstall netcdf and netcdf-fortran and netcdf-cxx, and install from scratch with "port -s". Installing the binary package which I tried last week does not fix the mismatch problem. So maybe the binary package can be fixed for others ? So the first thought above that the rev bump for netcdf should fix this problem globally, might be correct.

comment:14 Changed 6 years ago by mamoll (Mark Moll)

Resolution: fixed
Status: assignedclosed

In 42b10a965e493cf5716143522c376b96d582c5f6/macports-ports (master):

science/netcdf: rev bump to account for new version of hdf5. closes #56312

Note: See TracTickets for help on using tickets.