I believe I've pinpointed the bug underneath this old question.
Fixing it requires changing only a single character!
To recap, building HDF 1.8.5 patch 1 and 1.8.6 fails on Intel 11.1 when
configuring with --enable-fortran --enable-shared --enable-parallel. The
problem is that down within the Fortran sources libtool generates a link line
libtool: link: mpif90 -shared .libs/H5f90global.o
.libs/H5fortran_types.o .libs/H5_ff.o .libs/H5Aff.o .libs/H5Dff.o
.libs/H5Eff.o .libs/H5Fff.o .libs/H5Gff.o .libs/H5Iff.o .libs/H5Lff.o
.libs/H5Off.o .libs/H5Pff.o .libs/H5Rff.o .libs/H5Sff.o .libs/H5Tff.o
.libs/H5Zff.o .libs/H5_DBLE_InterfaceInclude.o .libs/H5f90kit.o
.libs/H5_f.o .libs/H5Af.o .libs/H5Df.o .libs/H5Ef.o .libs/H5Ff.o
.libs/H5Gf.o .libs/H5If.o .libs/H5Lf.o .libs/H5Of.o .libs/H5Pf.o
.libs/H5Rf.o .libs/H5Sf.o .libs/H5Tf.o .libs/H5Zf.o .libs/H5FDmpiof.o
.libs/HDF5mpio.o .libs/H5FDmpioff.o -lz -lm -soname
libhdf5_fortran.so.6 -o .libs/libhdf5_fortran.so.6.0.4
ifort: command line warning #10156: ignoring option '-s'; no
argument required
ifort: error #10236: File not found: 'libhdf5_fortran.so.6'
The problem is that Intel 11.1 demands '-Xlinker -soname -Xlinker
libhdf5_fortran.so.6' be specified (see
http://software.intel.com/en-us/articles/intel-compiler-error-10236-with-soname-corrupts-shared-library-on-linux/).
New since last time...
>From some testing, using '-Wl,' works too. The libtool configuration generated
by configure appears to have been stitched up to appropriately add '-Wl,' on
non-GCC systems around line 20091 of HDF5 1.8.6's configure.ac:
case $host_os in
linux* | freebsd* )
# If gcc is not used, need to set $wl to use "-Wl,"
if $CC -v 2>&1 | grep '^gcc' > /dev/null ; then
: using gcc
else
echo 'fixing $wl in' $ofile
ed - $ofile <<EOF 2> /dev/null
/^wl=""/s//wl="-Wl,"/
w
q
EOF
fi
;;
esac
which results in the displayed line
fixing $wl in libtool
at configure time on this platform. The bug is is that the ed snippet only
replaces the first wl="" literal in the generated ./libtool. Replacing all of
them must occur for --enable-fortran --enable-shared to work on this platform.
You can observe this by seeing that the 'FC' tag in libtool still contains
wl="".
Revising this ed snippet to read
ed - $ofile <<EOF 2> /dev/null
g/^wl=""/s//wl="-Wl,"/
w
q
EOF
fixes the problem. I've added the 'g' prefix to ensure all lines are changed.
Thanks,
Rhys
_______________________________________________
Hdf-forum is for HDF software users discussion.
[email protected]
http://mail.hdfgroup.org/mailman/listinfo/hdf-forum_hdfgroup.org