[Coin-discuss] IPOPT: build and linking questions

John Pye john.pye at anu.edu.au
Sun Jul 22 10:29:57 EDT 2007


Hi all

I am working on building a shared library for IPOPT which I will then
use to provide optimisation capability for the ASCEND modelling
environment. I have a couple of questions from my attempts at this with
version 3.3.2.

To build IPOPT, I have extracted the IPOPT tarball then unzipped MUMPS
4.7.3 to the directory ThirdParty/Mumps/MUMPS and then run "./configure
&& make && make install" in the top-level IPOPT directory. This is on
Fedora 7.

After compiling, I get a libipopt.so installed, but it has numerous
undefined symbols in it. The missing symbols (using 'nm') come from
libgfortran, liblapack, libblas and libpthread. I notice (using 'ldd')
that the resulting library is not linked to any of those libraries.
Should I really be seeing these undefined symbols? I discovered that in
order to compile a trivial test program against libipopt I needed to set
compiler flags to link all these libraries, when I would have expected
only to have to link to ipopt, and for the other dependencies to follow
automatically.

Secondly, thinking about how I can package IPOPT in such a way that it
doesn't include statically-linked copies of other software: is it
possible that I can build IPOPT to dynamically link against a MUMPS
shared library installed somewhere on my system, rather than having
IPOPT build its own private copy? It seems that there would need to be
more './configure' options to facilitate that. The motivation for this
is that MUMPS is a big package and shouldn't need rebuilding for each
new IPOPT version. Also, if IPOPT were to eventually become an
'official' RPM or Debian package (license conditions permitting), it
would probably not be allowed to include statically linked copies of
other libraries.

Cheers
JP

[john at jdpipe ascend]$ ldd /usr/lib/libipopt.so
        linux-gate.so.1 =>  (0x00110000)
        libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x0045d000)
        libm.so.6 => /lib/libm.so.6 (0x00548000)
        libc.so.6 => /lib/libc.so.6 (0x00571000)
        libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x006c5000)
        /lib/ld-linux.so.2 (0x80000000)

[john at jdpipe ascend]$ nm /usr/lib/libipopt.so | grep " U "
 ...
         U _gfortran_adjustl
         U _gfortran_allocate
         U _gfortran_allocate_array
 ...
         U dasum_
         U daxpy_
         U dcopy_
 ...
         U dpotrf_
         U dpotrs_
 ...
         U pthread_create
         U pthread_join
 ...

-------------- next part --------------
A non-text attachment was scrubbed...
Name: john.pye.vcf
Type: text/x-vcard
Size: 277 bytes
Desc: not available
URL: <http://list.coin-or.org/pipermail/coin-discuss/attachments/20070723/e53568a3/attachment.vcf>


More information about the Coin-discuss mailing list