[Ipopt-tickets] Re: [Ipopt] #25: Segmentation fault

Ipopt coin-trac at coin-or.org
Sun Dec 31 15:26:38 EST 2006


#25: Segmentation fault
--------------------------------+-------------------------------------------
  Reporter:  Armand             |       Owner:  andreasw
      Type:  defect             |      Status:  assigned
  Priority:  normal             |   Component:  Ipopt   
   Version:  3.2 (C++ Version)  |    Severity:  major   
Resolution:                     |    Keywords:          
--------------------------------+-------------------------------------------
Comment (by andreasw):

 Hi again (in the old year, at least in the US...)

 I was able to build a non-dynamic ipopt executable, and I would think it
 would work for you from Matlab.  However, unfortunlately, I had to do some
 "hacking" in order to make it work, since the GNU libtool doesn't seem to
 do the right thing all the time.

 Here is what I did:

  1. I set the environment variables {{{AM_LDFLAGS}}} to "{{{-all-
 static}}}" (e.g., with {{{export AM_LDFLAGS=-all-static}}} in the bash
 shell).
  1. With a brand-new version (or after 'make distclean'), I configured,
 using the following options
 {{{
 configure ADD_CXXFLAGS=-static ADD_FFLAGS=-static ADD_CFLAGS=-static
 --disable-shared
 }}}
  1. Ran {{{make install}}}.  This will fail when trying to link the
 {{{ipopt}}} executable (at least it did on my Linux machine).  The error
 message in my case said something like "{{{cannot find -lgcc_s}}}"
  1. Change into the subdirectory, where the ipopt executable is built
 {{{
 cd Ipopt/src/Apps/AmplSolver
 }}}
  1. Copy and paste the ''link'' command that failed during make (this
 starts with the C++ compiler name and goes over several lines) into the
 command line and hit ENTER; this should give the same error message as
 before.
  1. Repeat the last step, but now edit the line to delete the reference to
 the library that it complained about ({{{-lgcc_s}}} in my case), and also
 replace all *.so files by the "{{{-l}}}" reference (e.g., something like
 {{{/usr/lib/libg2c.so}}} becomes {{{-lg2c}}}).
  1. This worked for me, and the new {{{ipopt}}} executable should work.
 (There is a warning message regarding 'dlopen', but you can ignore that.)
  1. If you try {{{ldd ipopt}}} it should now say "{{{not a dynamic
 executable}}}".  You can now take this executable and put it where you
 want it to be.

 Hopefully this works also for you (I assume here that you are still using
 Linux).

-- 
Ticket URL: <https://projects.coin-or.org/Ipopt/ticket/25#comment:5>
Ipopt <http://projects.coin-or.org/Ipopt>
Interior-point optimizer for nonlinear programs.



More information about the Ipopt-tickets mailing list