[Ipopt] Having trouble obtaining mex file using mavericks
Tony Kelman
kelman at berkeley.edu
Wed May 7 18:29:28 EDT 2014
For future reference:
With about half an hour of debugging work over Skype we were able to get
this working again. The Matlab interface, at least when
using --enable-matlab-static, is not happy with using Xcode 5/Clang's libc++
instead of the GCC libstdc++. We fixed it by adding
ADD_CXXFLAGS='-stdlib=libstdc++' to the Ipopt configure call (step 2 in the
list Begum sent). The instructions Begum was working from are intended to
dynamically link to the OS X system libstdc++, Blas, and Lapack, but
statically to libgfortran (there have been issues with Matlab interface
exception handling on Mac if you statically link everything, also depends on
compiler versions and where you install them from). That should allow using
the same mex file on other computers that don't have gfortran compilers
installed, though I forgot to check whether the static linking to
libgfortran did what it was supposed to. Begum, could you let me know at
some point whether the same mex file we just built works on other computers?
I'm especially curious whether a mex file built in Mavericks can work on
older versions of OS X.
-Tony
-----Original Message-----
From: Tony Kelman
Sent: Wednesday, May 07, 2014 1:36 PM
To: Senses,Begum
Subject: Re: [Ipopt] Having trouble obtaining mex file using mavericks
OK, had to at least check. I wasn't able to borrow a Mac with Mavericks yet.
Would you be able to do screen sharing over Skype or something? Or we could
try things back-and-forth over email, but that might be cumbersome.
Where did you get gfortran from? It looks like you have version 4.8.2 of
that, but in step 6 were you seeing
/usr/local/gfortran/lib/gcc/x86_64-apple-darwin11/4.6.2/ in the Matlab
interface Makefile? Or was that just copy-pasted from older instructions?
When you tried -stdlib=libstdc++, did you add that to the call of Ipopt's
configure, or just manually in the Matlab interface Makefile? That might
turn out to be a workable solution here, but you'll need to make sure it
applies to all of the C++ in the base Ipopt library as well as the Matlab
interface.
-Tony
-----Original Message-----
From: Senses,Begum
Sent: Wednesday, May 07, 2014 12:30 PM
To: Tony Kelman
Subject: Re: [Ipopt] Having trouble obtaining mex file using mavericks
Hi Tony,
I updated my ipopt file using svn and tried compiling the new ipopt
file before I sent the message to the group. I also downloaded
Ipopt-3.11.8.zip file from the website. They both gave me the same
error. I can configure and compile IPOPT but I can not use the matlab
interface.
Thank you for your quick reply.
More information about the Ipopt
mailing list