[Ipopt] Installed libipopt.so has undefined symbols

Andreas Waechter andreasw at watson.ibm.com
Tue May 26 11:51:59 EDT 2009


Hi Thomas,

I'm not sure what you mean by "standard way" or by "providing two 
libraries".  The libraries that are missing are system libraries 
pre-installed on your machine.  All code that is compiled by the Ipopt 
Makefiles is included in the libipopt.so (except the code that is not 
needed if you use Ipopt as a library and not an AMPL executable).  There 
is no way to include the missing libraries also in libipopt.so, and it 
wouldn't be a good idea anyway.

It is not uncommon for software packages (open source or not) to depend on 
system libraries. In your case, Ipopt needs libpthreads.so and 
liblapack.so.  Since this can be different for different users and 
operating systems, this is detected by configure and put into the example 
Makefiles and the text file for convenience, so that a user doesn't have 
to take care of this by hand.

(Instead of using those *.txt files, there is another way to do this on 
Linux, by calling a program that outputs a text string with the missing 
library flags.  But we haven't switched to that on COIN [yet?].)

I hope this clarifies.

Regards,

Andreas

On Tue, 26 May 2009, Thomas Moulard wrote:

> On Tue, May 26, 2009 at 11:49 PM, Andreas Waechter
> <andreasw at watson.ibm.com> wrote:
>> Hi Thomas,
>>
>> Then you configure Ipopt, it finds out what other libraries it has to be
>> linked with, and it puts this information into the example Makefiles, see in
>> the LIBS variable, see, e.g.,
>>
>> YOUR_IPOPT_INST_DIR/Ipopt/examples/hs071_cpp/Makefile
>>
>> (where "YOUR_IPOPT_INST_DIR" is the directory where you installed Ipopt,
>> usually where you run configure).
>>
>> Alternatively, it also creates a file
>>
>> YOUR_IPOPT_INST_DIR/share/doc/coin/Ipopt/ipopt_addlibs_cpp.txt
>>
>> which contains those libraries as text as well.
>>
>> You can use that for example as in
>>
>> g++ test.cc -lipopt `cat
>> YOUR_IPOPT_INST_DIR/share/doc/coin/Ipopt/ipopt_addlibs_cpp.txt`
>
> I see. Is there a specific reason to not handle dependencies in the
> standard way?
> If there is one, why not provide two libraries?
>
> -- 
> Thomas Moulard
>
> _______________________________________________
> Ipopt mailing list
> Ipopt at list.coin-or.org
> http://list.coin-or.org/mailman/listinfo/ipopt
>
>



More information about the Ipopt mailing list