[petsc-users] libpetsc.so: undefined reference to `_gfortran_transfer_character_write at GFORTRAN_1.4'

Satish Balay balay at mcs.anl.gov
Fri Apr 18 11:21:08 CDT 2014


detailed logs would have been useful.

Mostlikely you have multiple version of libgfortran.so - and the wrong
version got linked in.

Or you have blas [or something else] compiled with a different version
gfortran so its attempting to link with a different libgfortran.so]

You can look at the link command, and look at all the .so files in the
linkcommand - and do 'ldd libblas.so' etc on all the .so files in the
link command to indentify the differences.

And after you locate the multiple libgfortran.so files [perhaps with
'locate libgfortran.so'] - you can do the following to indentify the
libgfortran library that you should be using.

'nm -Ao libgfortran.so |grep _gfortran_transfer_character_write at GFORTRAN_1.4'

Or use --with-shared-libraries=0 and see if this problem goes away..

Satish

On Fri, 18 Apr 2014, Matteo Parsani wrote:

> Dear PETSc Users and Developers,
> I have compiled successfully PETSc 3.4 with gfortran 4.7.2.
> However, when I compile my code, during the linking phase I get this error:
> 
> /ump/fldmd/home/pmatteo/research/workspace/codes/ssdc/deps/petsc/lib/libpetsc.so:
> undefined reference to `_gfortran_transfer_character_write at GFORTRAN_1.4'
> /ump/fldmd/home/pmatteo/research/workspace/codes/ssdc/deps/petsc/lib/libpetsc.so:
> undefined reference to `_gfortran_transfer_integer_write at GFORTRAN_1.4'
> 
> 
> Any idea?
> Is it related to the gcc compiler options?
> 
> Thank you,
> 
> 



More information about the petsc-users mailing list