"HDF5 library version mismatched error"

3,667 views
Skip to first unread message

LiZ

unread,
Jul 5, 2015, 5:03:12 AM7/5/15
to em...@googlegroups.com
Hi Steve,

I met a problem when I was using EMAN2.11 on my CentOS 7.1 desktop. However, I think it's not due to the EMAN2 version but about the HDF5 library problem. Because I tried the older version of EMAN2.1 beta4, it came the same result.

I can run the e2projectmanager.py in my project folder normally. But when I used the "evaluate & import micrographs", after I opened a micrograph and clicked the import button, the following text appeared:

______________________________________________________________
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.8.10, library is 1.8.9
        SUMMARY OF THE HDF5 CONFIGURATION
        =================================

General Information:
-------------------
           HDF5 Version: 1.8.9
          Configured on: Thu Jan  8 17:07:03 PST 2015
          Configured by: chimera@debian4-64
         Configure mode: production
            Host system: x86_64-unknown-linux-gnu
          Uname information: Linux debian4-64 2.6.18-6-amd64 #1 SMP Sat Feb 20 23:34:55 UTC 2010 x86_64 GNU/Linux
               Byte sex: little-endian
              Libraries: 
         Installation point: /home/chimera/chimeraBuild_X11/build/foreign/hdf5-1.8.9

Compiling Options:
------------------
               Compilation Mode: production
                     C Compiler: /usr/local/bin/gcc -pipe -std=gnu99 -D_GNU_SOURCE -pthread -fPIC -Wextra -mtune=generic -m64 -I/home/chimera/chimeraBuild_X11/build/build/include -L/home/chimera/chimeraBuild_X11/build/build/lib ( gcc (GCC) 4.6.2)
                         CFLAGS: 
                      H5_CFLAGS: -std=c99 -pedantic -Wall -Wextra -Wundef -Wshadow -Wpointer-arith -Wbad-function-cast -Wcast-qual -Wcast-align -Wwrite-strings -Wconversion -Waggregate-return -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls -Wnested-externs -Winline -Wno-long-long -Wfloat-equal -Wmissing-format-attribute -Wmissing-noreturn -Wpacked -Wdisabled-optimization -Wformat=2 -Wendif-labels -Wdeclaration-after-statement -Wold-style-definition -Winvalid-pch -Wvariadic-macros -Wnonnull -Winit-self -Wmissing-include-dirs -Wswitch-default -Wswitch-enum -Wunused-macros -Wunsafe-loop-optimizations -Wc++-compat -Wstrict-overflow -Wlogical-op -Wlarger-than=2048 -Wvla -Wsync-nand -Wframe-larger-than=16384 -Wpacked-bitfield-compat -Wstrict-aliasing -Wstrict-overflow=5 -Wjump-misses-init -Wunsuffixed-float-constants -Wdouble-promotion -Wsuggest-attribute=const -Wtrampolines -O3 -fomit-frame-pointer -finline-functions
                      AM_CFLAGS: 
                       CPPFLAGS: 
                    H5_CPPFLAGS: -D_POSIX_C_SOURCE=199506L   -DNDEBUG -UH5_DEBUG_API
                    AM_CPPFLAGS: -I/home/chimera/chimeraBuild_X11/build/foreign/zlib-1.2.5/include -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_BSD_SOURCE 
               Shared C Library: yes
               Static C Library: yes
  Statically Linked Executables: no
                        LDFLAGS: 
                     H5_LDFLAGS: 
                     AM_LDFLAGS:  -L/home/chimera/chimeraBuild_X11/build/foreign/zlib-1.2.5/lib
          Extra libraries:  -lz -lrt -lm 
                Archiver: ar
               Ranlib: ranlib
           Debugged Packages: 
            API Tracing: no

Languages:
----------
                        Fortran: no

                            C++: no

Features:
---------
                  Parallel HDF5: no
             High Level library: yes
                   Threadsafety: no
            Default API Mapping: v18
 With Deprecated Public Symbols: yes
         I/O filters (external): deflate(zlib)
         I/O filters (internal): shuffle,fletcher32,nbit,scaleoffset
                            MPE: no
                     Direct VFD: yes
                        dmalloc: no
Clear file buffers before write: yes
           Using memory checker: no
         Function Stack Tracing: no
                           GPFS: no
      Strict File Format Checks: no
   Optimization Instrumentation: no
       Large File Support (LFS): yes
Bye...
____________________________________________

I've never met it before.. How can I solve it?

Best regards,

Liz

Steven Ludtke

unread,
Jul 5, 2015, 11:13:40 AM7/5/15
to em...@googlegroups.com
Hi Liz,

This type of error normally happens when you have LD_LIBRARY_PATH set, and it includes a directory with some of the same libraries EMAN uses, but a different version. The current EMAN2.1 binaries use a clever scheme that does not require LD_LIBRARY_PATH, but it is susceptible to people setting LD_LIBRARY_PATH to make other software work. 

So, 'echo $LD_LIBRARY_PATH' 
if it's set, and needs to be set for some reason, you may need to try adding $EMAN2DIR/lib to the beginning of the path, eg:

export LD_LIBRARY_PATH=$EMAN2DIR/lib:$LD_LIBRARY_PATH

hopefully this won't have any adverse effects on the other software that made you use it in the first place.

If you have multiple software packages installed on a linux machine as binaries, and they use conflicting versions of the same library, I'm afraid the only real solution is to install all of the packages from source so they use the system-provided versions instead.

----------------------------------------------------------------------------
Steven Ludtke, Ph.D.
Professor, Dept of Biochemistry and Mol. Biol.         (www.bcm.edu/biochem)
Co-Director National Center For Macromolecular Imaging        (ncmi.bcm.edu)
Co-Director CIBR Center                          (www.bcm.edu/research/cibr)
Baylor College of Medicine                             





--
--
----------------------------------------------------------------------------------------------
You received this message because you are subscribed to the Google
Groups "EMAN2" group.
To post to this group, send email to em...@googlegroups.com
To unsubscribe from this group, send email to eman2+un...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/eman2

---
You received this message because you are subscribed to the Google Groups "EMAN2" group.
To unsubscribe from this group and stop receiving emails from it, send an email to eman2+un...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

LiZ

unread,
Jul 5, 2015, 10:14:16 PM7/5/15
to em...@googlegroups.com
Thanks! It's been solved.

在 2015年7月5日星期日 UTC+8下午11:13:40,Steve Ludtke写道:

Zhao Zongpei

unread,
Sep 8, 2017, 4:18:39 AM9/8/17
to EMAN2
I have the same problem yesterday, solved by this

"unset LD_LIBRARY_PATH"

在 2015年7月5日星期日 UTC+2下午5:13:40,Steve Ludtke写道:

Steve Ludtke

unread,
Sep 8, 2017, 8:43:39 AM9/8/17
to em...@googlegroups.com
Yes, LD_LIBRARY_PATH tells linux where it should look for extra software libraries on your computer. The system also has its own list, but if you have LD_LIBRARY_PATH set, then it checks that first. Problems arise when two different software packages are installed, both of which use the same library, but use different versions of the library. 

Here's a hypothetical example. Say you downloaded IMOD (just an example) last year, and IMOD was compiled with the FFTW library version 3.4.2. Then you install EMAN2.2, which was compiled 3 months ago, and uses FFTW 3.5.6. If you have LD_LIBRARY_PATH pointing to IMOD, then run an EMAN2.2 program it may have problems due to the different versions of the libraries. Sometimes it will be fine if the versions are reasonably close to each other. It depends on how much the other libraries changed between versions.

EMAN2.2 binaries should NOT cause any problems for your other software. They use a mechanism designed to avoid version conflicts, but it only works if other software does it as well. That is, the EMAN2.2 binaries do not require LD_LIBRARY_PATH to be set, so it will not interfere with your other software. However, if you have set LD_LIBRARY_PATH for your other software, then it will interfere with EMAN2.2 and any other software which uses the same libraries.

There are 2 ways to handle this well:
1) you can write a little scripts or aliases for your account, say "useeman2" and "useimod" and "userelion", which you can run to set/unset the necessary variables before you use each package
2) The better solution, assuming all of the software is open source, is actually to download all of the packages and build them from source on your computer. That way they will all use the native version of the libraries installed on your machine, and they can all coexist peacefully.  However, this means you have to have sufficient technical skill to build/install software yourself, and probably root access to the computer.

Ed Brignole

unread,
Jan 18, 2018, 12:23:32 PM1/18/18
to EMAN2
Hi Steve,

I'm getting a similar "HDF5" issue but the cause appears to be different from what was described below, because LD_LIBRARY_PATH, DYLD_LIBRARY_PATH or PYTHONPATH environment variables are not set. This was after installing the osx daily release downloaded yesterday. I simply followed instructions on the install webpage, removed the previous EMAN2 folder and issued the "bash eman2.mac.daily.sh" command, as far as I could tell install went smoothly, until I tried e2display.py or the following e2proc2d.py test. I tried unsuccessfully to solve the problem with a "conda update eman2", which only accomplished updating certifi and openssl and downgrading ca-certificates, and the original error has not gone away. Here's my env and error messages, let me know what else could help you track down the issue.

Thanks for the help,
Ed


ed$ e2version.py
EMAN 2.2 (GITHUB: 2018-01-14 00:00 - commit: 11bba20 )
Your EMAN2 is running on: Mac OS 10.11.6 x86_64
Your Python version is: 2.7.14

ed$ e2proc2d.py :64:64:1 test.hdf --process mask.sharp:outer_radius=24
1 images, processing 0-0 stepping by 1

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.8.18, library is 1.8.17

        SUMMARY OF THE HDF5 CONFIGURATION
        =================================

General Information:
-------------------
           HDF5 Version: 1.8.17
          Configured on: Sat May 27 16:19:12 UTC 2017
          Configured by: tra...@Traviss-Mac-9.local
         Configure mode: production
            Host system: i386-apple-darwin14.5.0
          Uname information: Darwin Traviss-Mac-9.local 14.5.0 Darwin Kernel Version 14.5.0: Thu Apr 21 20:40:54 PDT 2016; root:xnu-2782.50.3~1/RELEASE_X86_64 x86_64
               Byte sex: little-endian
              Libraries: static, shared
         Installation point: /Applications/EMAN2/2.2_20180117


Compiling Options:
------------------
               Compilation Mode: production
                     C Compiler: /usr/bin/clang ( Apple LLVM version 6.1.0 )
                         CFLAGS:  -arch x86_64 -mmacosx-version-min=10.9 -m64
                      H5_CFLAGS: 
                      AM_CFLAGS:
                       CPPFLAGS:
                    H5_CPPFLAGS:   -DNDEBUG -UH5_DEBUG_API
                    AM_CPPFLAGS:  -I/Applications/EMAN2/2.2_20180117/include

               Shared C Library: yes
               Static C Library: yes
  Statically Linked Executables: no
                        LDFLAGS:  -arch x86_64 -headerpad_max_install_names -mmacosx-version-min=10.9 -lc++ -Wl,-rpath,/Applications/EMAN2/2.2_20180117/lib
                     H5_LDFLAGS:
                     AM_LDFLAGS:  -L/Applications/EMAN2/2.2_20180117/lib
          Extra libraries: -lpthread -lz -ldl -lm
                Archiver: ar
               Ranlib: ranlib
           Debugged Packages:
            API Tracing: no

Languages:
----------
                        Fortran: yes
               Fortran Compiler: /Applications/EMAN2/2.2_20180117/bin/gfortran ( GNU Fortran (GCC) 4.8.5)
          Fortran 2003 Compiler: yes
                  Fortran Flags:
               H5 Fortran Flags:  -pedantic -Wall -Wconversion -Wunderflow -Wimplicit-interface -W -O2 -s
               AM Fortran Flags:
         Shared Fortran Library: no
         Static Fortran Library: yes

                            C++: yes
                   C++ Compiler: /usr/bin/clang++ -stdlib=libc++
                      C++ Flags:  -arch x86_64 -mmacosx-version-min=10.9 -stdlib=libc++ -m64
                   H5 C++ Flags: 
                   AM C++ Flags:
             Shared C++ Library: yes
             Static C++ Library: yes


Features:
---------
                  Parallel HDF5: no
             High Level library: yes
                   Threadsafety: yes

            Default API Mapping: v18
 With Deprecated Public Symbols: yes
         I/O filters (external): deflate(zlib)
                            MPE: no
                     Direct VFD: no

                        dmalloc: no
Clear file buffers before write: yes
           Using memory checker: no
         Function Stack Tracing: no
      Strict File Format Checks: no
   Optimization Instrumentation: no
Bye...
Abort trap: 6


ed$ env
TERM_PROGRAM=Apple_Terminal
BSOFT=/Applications/bsoft
TERM=xterm-256color
SHELL=/bin/bash
TMPDIR=/var/folders/wc/dcvd6tyj0tv1cz7c7k9_q9_w000151/T/
Apple_PubSub_Socket_Render=/private/tmp/com.apple.launchd.kVexCGpGzm/Render
TERM_PROGRAM_VERSION=361.1
TERM_SESSION_ID=ED76F6B4-7FEB-4718-AB87-409268DA5AB6
WEB_DIR=/Applications/Spider22.03/web/
USER=ed
SPRGB_DIR=/Applications/Spider22.03/web//rgb/
SSH_AUTH_SOCK=/private/tmp/com.apple.launchd.SIfL6t6w9o/Listeners
SPMAN_DIR=/Applications/Spider22.03/spider/man/
__CF_USER_TEXT_ENCODING=0x4A1:0x0:0x0
WEBMAN_DIR=/Applications/Spider22.03/web//man
PATH=/Applications/EMAN2/2.2_20180117/bin:/Applications/Spider22.03/web//bin:/Applications/Spider22.03/spider/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/opt/X11/bin:/opt/local/bin:/opt/local/sbin:/Applications/Spider19.00/spire_linux-1.5.4/bin
PWD=/cove/a0/drennan/ed/rnr/10sep30c-11jul08b
EDITOR=/usr/bin/edit
LANG=en_US.UTF-8
XPC_FLAGS=0x0
SPIRE=/Applications/Spider19.00/spire_linux-1.5.4
XPC_SERVICE_NAME=0
SPBIN_DIR=/Applications/Spider22.03/spider/bin/
HOME=/Users/ed
SHLVL=1
LOGNAME=ed
WEBBIN_DIR=/Applications/Spider22.03/web//bin/
SPPROC_DIR=/Users/ed/Documents/spiproc/lib/
SPPARENT_DIR=/Applications/Spider22.03
DISPLAY=/private/tmp/com.apple.launchd.o8dXGmLAKZ/org.macosforge.xquartz:0
SPIDER_DIR=/Applications/Spider22.03/spider
SECURITYSESSIONID=186a7
_=/usr/bin/env


ed$ conda list
# packages in environment at /Applications/EMAN2/2.2_20180117:
#
appnope                   0.1.0                    py27_0 
asn1crypto                0.22.0                   py27_0 
backports                 1.0                      py27_1    conda-forge
backports.functools_lru_cache 1.4                      py27_1    conda-forge
backports.shutil_get_terminal_size 1.0.0                      py_3    conda-forge
backports_abc             0.5                      py27_0 
beautifulsoup4            4.6.0                    py27_0 
boost                     1.63.0                   py27_5    conda-forge
boost-cpp                 1.63.0                        2    conda-forge
bsddb                     1.0                      py27_1 
bzip2                     1.0.6                         3 
ca-certificates           2017.08.26           ha1e5d58_0 
certifi                   2017.11.5        py27hfa9a1c4_0 
cffi                      1.11.2                   py27_0    conda-forge
chardet                   3.0.4                    py27_0 
conda                     4.4.7                    py27_0 
conda-build               3.0.19           py27haae31bb_0 
conda-env                 2.6.0                         0 
conda-verify              2.0.0                    py27_0 
contextlib2               0.5.5                    py27_0 
cryptography              2.1.4                    py27_0    conda-forge
cycler                    0.10.0                   py27_0 
db                        5.3.28                        1 
decorator                 4.1.2                    py27_0 
eman2                     2.2                      py27_0    file:///Users/eman/anaconda/conda-bld
enum34                    1.1.6                    py27_1    conda-forge
fftw-mpi                  3.3.6                         2    cryoem
filelock                  2.0.7                    py27_0 
freetype                  2.8.1                         0    conda-forge
ftgl                      2.1.3                         1    cryoem
functools32               3.2.3.2                  py27_1    conda-forge
futures                   3.2.0                    py27_0    conda-forge
glob2                     0.5                      py27_0 
gsl                       2.2.1                         0 
hdf5                      1.8.17                       11    conda-forge
icu                       58.2                          0    conda-forge
idna                      2.6                      py27_1    conda-forge
ipaddress                 1.0.18                   py27_0 
ipython                   5.5.0                    py27_0    conda-forge
ipython_genutils          0.2.0                    py27_0 
jinja2                    2.10                     py27_0    conda-forge
jpeg                      9b                            2    conda-forge
libffi                    3.2.1                         3    conda-forge
libgcc                    4.8.5                         1 
libgfortran               3.0.0                         1 
libgpuarray               0.7.5                         0    conda-forge
libpng                    1.6.34                        0    conda-forge
libtiff                   4.0.9                         0    conda-forge
mako                      1.0.7                    py27_0    conda-forge
markupsafe                1.0                      py27_0 
matplotlib                2.1.1                    py27_2    conda-forge
mkl                       2017.0.3                      0 
ncurses                   5.9                          10 
nose                      1.3.7                    py27_2    conda-forge
numpy                     1.13.1                   py27_0 
openmpi                   3.0.0                         0    conda-forge
openssl                   1.0.2n               hdbc3d79_0 
path.py                   10.3.1                   py27_0 
pathlib2                  2.3.0                    py27_0 
pexpect                   4.3.1                    py27_0    conda-forge
pickleshare               0.7.4                    py27_0 
pip                       9.0.1                    py27_1 
pkginfo                   1.4.1                    py27_0 
prompt_toolkit            1.0.15                   py27_0 
ptyprocess                0.5.2                    py27_0 
pycosat                   0.6.3                    py27_0    conda-forge
pycparser                 2.18                     py27_0 
pydusa                    1.15                    np113_9    cryoem
pygments                  2.2.0                    py27_0 
pygpu                     0.7.5                    py27_0    conda-forge
pyopengl                  3.1.0                    py27_0    conda-forge
pyopenssl                 17.4.0                   py27_0    conda-forge
pyparsing                 2.2.0                    py27_0 
pyqt                      4.11.4                   py27_4 
pysocks                   1.6.8                    py27_1    conda-forge
python                    2.7.14                        4    conda-forge
python-dateutil           2.6.1                    py27_0 
pytz                      2017.3                     py_2    conda-forge
pyyaml                    3.12                     py27_1    conda-forge
qt                        4.8.7                         4 
readline                  7.0                           0    conda-forge
requests                  2.18.4                   py27_1    conda-forge
ruamel_yaml               0.11.14                  py27_1 
scandir                   1.6                      py27_0    conda-forge
scikit-learn              0.19.0              np113py27_0 
scipy                     0.19.1              np113py27_0 
setuptools                38.4.0                   py27_0    conda-forge
simplegeneric             0.8.1                    py27_1 
singledispatch            3.4.0.3                  py27_0 
sip                       4.18                     py27_1    conda-forge
six                       1.11.0                   py27_1    conda-forge
sqlite                    3.20.1                        2    conda-forge
ssl_match_hostname        3.5.0.1                  py27_1    conda-forge
subprocess32              3.2.7                    py27_0 
theano                    1.0.1                    py27_1    conda-forge
tk                        8.6.7                         0    conda-forge
tornado                   4.5.3                    py27_0    conda-forge
traitlets                 4.3.2                    py27_0 
urllib3                   1.22                     py27_0    conda-forge
wcwidth                   0.1.7                    py27_0 
wheel                     0.30.0                   py27_2    conda-forge
xz                        5.2.3                         0 
yaml                      0.1.6                         0 
zlib                      1.2.11                        0 



Reply all
Reply to author
Forward
0 new messages