[petsc-dev] Why do we pass -L/usr/lib ?

Jed Brown jed at jedbrown.org
Thu Nov 6 09:07:39 CST 2014


I configure with

python2 ./configure --with-suitesparse-dir=/usr --with-metis-dir=/usr --with-parmetis-dir=/opt/mpich --with-mpi-dir=/opt/mpich PETSC_ARCH=mpich-test

I get the wrong libparmetis.so.

/opt/mpich/bin/mpif90 -fPIC -Wall -Wno-unused-variable -ffree-line-length-0 -Wno-unused-dummy-argument -g -O0   -o ex5f ex5f.o -Wl,-rpath,/home/jed/petsc/mpich-test/lib -L/home/jed/petsc/mpich-test/lib  -lpetsc -Wl,-rpath,/usr/lib -L/usr/lib -lumfpack -lklu -lcholmod -lbtf -lccolamd -lcolamd -lcamd -lamd -lsuitesparseconfig -llapack -lblas -Wl,-rpath,/opt/mpich/lib -L/opt/mpich/lib -lparmetis -lmetis -lX11 -lhwloc -lpthread -lssl -lcrypto -lm -Wl,-rpath,/usr/lib/gcc/x86_64-unknown-linux-gnu/4.9.1 -L/usr/lib/gcc/x86_64-unknown-linux-gnu/4.9.1 -lmpifort -lgfortran -lm -lgfortran -lm -lquadmath -lm -lmpicxx -lstdc++ -Wl,-rpath,/opt/mpich/lib -L/opt/mpich/lib -Wl,-rpath,/usr/lib/gcc/x86_64-unknown-linux-gnu/4.9.1 -L/usr/lib/gcc/x86_64-unknown-linux-gnu/4.9.1 -ldl -Wl,-rpath,/opt/mpich/lib -lmpi -lgcc_s -ldl 
/usr/bin/ld: warning: libmpi.so.1, needed by /usr/lib/libparmetis.so, may conflict with libmpi.so.12
/usr/bin/ld: warning: libmpi.so.1, needed by /usr/lib/libparmetis.so, may conflict with libmpi.so.12


If I don't pass --with-suitesparse-dir=/usr, then -L/opt/mpich/lib (not
actually needed) is passed before -L/usr/lib (also not needed) and I get
the correct one.  Why don't we *not* pass these paths that are not
needed?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 818 bytes
Desc: not available
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20141106/130218e1/attachment.sig>


More information about the petsc-dev mailing list