[Ipopt] missing -lmpi pkg-config with mumps

Ashutosh Mahajan asm4 at lehigh.edu
Sat Feb 25 14:49:05 EST 2012

Hi all,

I compiled ipopt release version 3.10.2 on linux (ubuntu) with MUMPS. MUMPS
was downloaded using get.mumps in ThirdParty directory. It compiles well, but
pkg-config for libcoinmumps doesn't show -lmpi, even though it was compiled
with it. 

[mahajan at mahajan-desktop lib]$ nm libcoinmumps.a  | grep -i mpi_init
                 U mpi_initialized_
0000000000000110 T mpi_init_
0000000000000120 T mpi_initialized_
0000000000000000 T MPI_Init

but pkg-config doesn't show -lmpi,

[mahajan at mahajan-desktop lib]$ pkg-config --libs-only-l coinmumps
-lcoinmumps -lpthread -lblas -lgfortranbegin -lgfortran -lm -lgcc_s  

[mahajan at mahajan-desktop lib]$ pkg-config --libs-only-l ipopt
-lipopt -llapack -ldl -lcoinmumps -lpthread -lblas -lgfortranbegin -lgfortran -lm -lgcc_s  

Is it a bug?  I'm new to pkg-config, so I might be wrong. We are planning to
release some software that links to ipopt. So it is important for us to detect
the right libraries to link with. 

Ashutosh Mahajan

More information about the Ipopt mailing list