[petsc-users] strange linking problem

Juha Jäykkä juhaj at iki.fi
Wed Jun 20 03:52:55 CDT 2012


Dear list,

I have a strange linking problem with libpetsc.so. After running 'make 
PETSC_DIR=$(pwd) PETSC_ARCH=linux-gnu-cxx-opt all', the library looks like 
this:

~> nm linux-gnu-cxx-opt/lib/libpetsc.so|grep SAMappingInitializePackage
000000000048b4fe T SAMappingInitializePackage
                 U _Z26SAMappingInitializePackagePKc
00000000006060b0 r _ZZ26SAMappingInitializePackageE8__func__

And, of course, make install will not fix it and therefore make test fails and 
all programs using it fail.

Any ideas what could be causing this? It looks to me as if part of the code 
was compiled with mpicxx and got the names mangled in C++ fashion (hence 
_Z26SAMappingInitializePackagePKc) but for other parts, mpicc was used (hence 
no mangling and SAMappingInitializePackage). But why?

I have --CC=mpicc.openmpi-gcc-1.4.4 --CXX=mpicxx.openmpi-gcc-1.4.4 on the 
congfigure line, so the compilers should be fine. The complete configure line 
is:

./configure --prefix=${PREFIX}/petsc --with-shared-libraries --with-
debugging=0 --with-fortran=0 --with-clanguage=C++ --with-dynamic-loading --
with-c-support --useThreads=0 --with-mpi-shared=1 --with-hdf5=1 --with-gnu-
compilers=1 --with-vendor-compilers=\[pathscale,intel\] --with-hdf5-
dir=${HDF5_DIR} --with-petsc-arch=linux-gnu-cxx-opt --CC=mpicc.openmpi-
gcc-1.4.4 --CXX=mpicxx.openmpi-gcc-1.4.4

and is the exact same line as I have used on numerous other machines, too.

Any ideas what's wrong or how to debug this?

Cheers,
Juha
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 230 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20120620/e0ddaffc/attachment.pgp>


More information about the petsc-users mailing list