make check FAILED testlibinfo.sh on Mac OS X 10.7.5 with GNU and Intel compilers

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.

The testlibinfo.sh does something simple in the first test. It just does this:

if strings ../src/.libs/libhdf5.7.dylib | grep "SUMMARY OF THE HDF5 CONFIGURATION" > /dev/null; then
     echo " PASSED"
else
     echo " FAILED"
     nerrors=`expr $nerrors + 1`
fi

From the message you showed, I think the error was from the command "strings".
Can you "cd test" and hand run the above commands? (They are Bourn sh style commands.
So, if you use cshell, do a "sh" first.)

If you see the same error message, try this:
$ strings /etc/group > /dev/null

If you see the same error message again, something
is wrong with the command "strings" executable.
In that case, check with your system support staff.

Let me know how it turns out.

-Albert Cheng

···

On 1/28/13 12:02 PM, pkablick@atmos.umd.edu wrote:

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.

_______________________________________________
Hdf-forum is for HDF software users discussion.
Hdf-forum@hdfgroup.org
http://mail.hdfgroup.org/mailman/listinfo/hdf-forum_hdfgroup.org