Hello,
Noob here. I'm trying to build HDF5 on Mac OS X 10.7.5, but I've run into
a problem that I haven't been able to fix. Any help or suggestions are
appreciated.
I've tried to build with both GNU and Intel compilers, and I get the same
failure with both compiler suites on make check:
···
============================
Testing testlibinfo.sh
*** Error ignored
Finished testing testlibinfo.sh
testlibinfo.sh Test Log
Check file ../src/.libs/libhdf5.7.dylib
strings: object: ../src/.libs/libhdf5.7.dylib malformed object (unknown
load command 15)
FAILED
Check file ../src/.libs/libhdf5.a PASSED
Check file testhdf5 -SKIP-
***1 errors encountered***
0.31 real 0.03 user 0.05 sys
Finished testing testlibinfo.sh
============================
Based on suggestions from other fora, here is some information about the
dynamic library using file, otool and lipo:
$ file src/.libs/libhdf5.7.dylib
src/.libs/libhdf5.7.dylib: Mach-O 64-bit dynamically linked shared library
x86_64
$ otool -L src/.libs/libhdf5.7.dylib
src/.libs/libhdf5.7.dylib:
/usr/local/lib/libhdf5.7.dylib (compatibility version 8.0.0, current
version 8.4.0)
/usr/lib/libz.1.dylib (compatibility version 1.0.0, current version
1.2.5)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version
159.1.0)
mac64/libcilkrts.5.dylib (compatibility version 0.0.0, current version
0.0.0)
/usr/lib/libstdc++.6.dylib (compatibility version 7.0.0, current version
52.0.0)
/usr/lib/libgcc_s.1.dylib (compatibility version 1.0.0, current version
1094.0.0)
$ lipo -info src/.libs/libhdf5.7.dylib
Non-fat file: src/.libs/libhdf5.7.dylib is architecture: x86_64
I run the following bash script to perform the build:
############################################################
#!/bin/bash
# version of HDF5
export HDF5=hdf5-1.8.10-patch1
# location of installation
export PREFIX=/usr/local
# location of compiler
export COMPREFIX=/usr
# c preprocessor
export CPP='icc -E'
# c compiler
export CC=$COMPREFIX/bin/icc
# archiver and linker
export AR=$COMPREFIX/bin/xiar
export LD=$COMPREFIX/bin/xild
# c flags
export CFLAGS='-O0'
# linker flags
export LDFLAGS=-L$COMPREFIX/lib
# compression libraries used by HDF5
export ZLIB=$COMPREFIX
rm -rf $HDF5-intel-serial
tar xzf $HDF5.tar.gz
mv $HDF5 $HDF5-intel-serial
cd $HDF5-intel-serial
./configure --prefix=$PREFIX --with-zlib=$ZLIB
# tell make to continue even if errors are encountered
export HDF5_Make_Ignore=yes
# use shared libraries
export HDF5_USE_SHLIB=yes
make all
make check
############################################################
Also, here is some system information that may be helpful:
$uname -a
Darwin kestrel.local 11.4.2 Darwin Kernel Version 11.4.2: Thu Aug 23
16:25:48 PDT 2012; root:xnu-1699.32.7~1/RELEASE_X86_64 x86_64
$ which icc && which ifort && which icpc
/usr/bin/icc
/usr/bin/ifort
/usr/bin/icpc
$ icc --version && ifort --version && icpc --version
icc (ICC) 13.0.1 20121010
Copyright (C) 1985-2012 Intel Corporation. All rights reserved.
ifort (IFORT) 13.0.1 20121010
Copyright (C) 1985-2012 Intel Corporation. All rights reserved.
icpc (ICC) 13.0.1 20121010
Copyright (C) 1985-2012 Intel Corporation. All rights reserved.
$ which gcc && which gfortran && which g++
/usr/local/bin/gcc
/usr/local/bin/gfortran
/usr/local/bin/g++
$ gcc --version && gfortran --version && g++ --version
gcc (GCC) 4.8.0 20120603 (experimental)
Copyright (C) 2012 Free Software Foundation, Inc.
GNU Fortran (GCC) 4.8.0 20120603 (experimental)
Copyright (C) 2012 Free Software Foundation, Inc.
g++ (GCC) 4.8.0 20120603 (experimental)
Copyright (C) 2012 Free Software Foundation, Inc.