Showing results for 
Search instead for 
Did you mean: 
1 View

Mixed Language linking capitalization

Dear fellow developers,

I've recently came across a compilation problem when using the HDF5 library with the Intel compiler suite (ifort 16.0). I'm using a rather complex setup on Ubuntu 14.04:

What I did
1) Install MPICH using the Intel compilers
2) Install HDF5 using the Intel compilers with MPICH wrappers
3) Install PETSc using the MPICH compilers and telling PETSc where HDF5
is located
4) Trying to compile my application with the PETSc makefile. That Fails :(

I'm pretty sure that I link against the 4 libraries from HDF5 in the correct order. The location to the shared objects are given with -L and even as -Wl,rpath.

However, I get a bunch of these messages:

undefined reference to `h5lib_MP_h5open_f_'

even though the verbose compiler command
tells that it finds the libraries:

attempt to
open /opt//hdf5-1.8.16/Intel/16.0/MPICH/3.2/lib/

Inspecting the library with readelf shows that the missing references are in there:

readelf -Ws /opt/hdf5-1.8.16/Intel/16.0/MPICH/3.2/lib/ | grep -i h5lib_MP_h5open_f_'
   916: 0000000000024600    80 FUNC    GLOBAL DEFAULT   12 h5lib_mp_h5open_f_'
   969: 0000000000024600    80 FUNC    GLOBAL DEFAULT   12 h5lib_mp_h5open_f_'

What puzzles me is the capitalization: The linker is searching for all lowercase functions, except for the added "_MP_". However in the library, only small letters are used.

Did anyone encounter similar problems (not only related to HDF5) before? I assume linking is case sensitive due to its strong connection to C/C++ rather than to Fortran. HDF5 is written in C.

P.S using the GNU compiler suite (v 5.3) in exactly the same order works fine



0 Kudos
2 Replies
1 View

I'm going to guess that when

I'm going to guess that when you built HDF5 the makefile used the "-standard-semantics" command line switch, but that when you built PETSc, the makefile did not have the -standard-semantics switch.

If the HDF5 makefile did not explicitly use -standard-semantics, please list the command flags passed to ifort for both HDF5 and for PETSc.


0 Kudos
1 View

Dear Lorri,

Dear Lorri,

thanks a lot, that solved the issues

best regards,


0 Kudos