[Ipopt] Created shared objects for Ipopt using the Intel compilers

Greg Kopff greg at q10stats.com
Wed Jul 22 01:31:57 EDT 2015


G’day.

=================
The past
=================

I have previously used the GCC to compile Ipopt on Linux, using the stock settings.  I use MUMPS.  When I execute a 'make install', I end up with the following in the target lib directory:

libcoinmumps.la
libcoinmumps.so -> libcoinmumps.so.1.4.13
libcoinmumps.so.1 -> libcoinmumps.so.1.4.13
libcoinmumps.so.1.4.13
libipopt.la
libipopt.so -> libipopt.so.1.9.8
libipopt.so.1 -> libipopt.so.1.9.8
libipopt.so.1.9.8

I also build the jipopt shared object so I can interface Ipopt from Java.

This all works a treat.  :-)


=================
The present
=================

I’ve recently obtained the Intel C/C++/Fortran compilers (and Intel MKL) and I am trying to compile Ipopt with them.  I use the following configure command:

CC=icc CXX=icpc F77=ifort ./configure --with-blas-lib=-lblas --with-blas-incdir=$MKLROOT/include --with-lapack-lib=-llapack --with-lapack-incdir=$MKLROOT/include --prefix=$HOME/ipopt-3.11.8-intel

I can successfully build Ipopt (by running ‘make’) and pass the unit tests (by running 'make test’).

However, when I do a ‘make install’, I end up with the following in the target lib directory:

libcoinmumps.a
libcoinmumps.la
libipopt.a
libipopt.la

I only get static ‘.a’ archive libraries produced, and no ‘.so’ shared objects.


=================
The question
=================

How can I get the Intel compiler to create shared objects for ipopt (and mumps)?


=================
The things tried so far
=================

I tried adding CFLAGS=-fPIC to the configure script to coax it to produce a shareable object, but to no effect.

I tried adding LDFLAGS=-shared to the configure script, but it immediately fails to configure and reports:

  checking for C compiler default output file name... a.out
  checking whether the C compiler works... configure: error: cannot run C compiled programs.


Any advice on compiling Ipopt with the Intel compilers would be greatly appreciated.

Kindest regards,

—
Greg.


More information about the Ipopt mailing list