[Ipopt] Having trouble obtaining mex file using mavericks

Senses,Begum bgmsenses at ufl.edu
Thu May 8 20:12:48 EDT 2014


Hi everyone,

I also got another error while I was trying to obtain the mex file in 
mavericks. The error is as follows:

/Applications/MATLAB_R2013a.app/extern/include/tmwtypes.h:819:9: error: 
unknown type name 'char16_t'.

To solve this problem I had to go into the tmwtypes.h file(which was in 
the path given above) and change a line.

Find the following part in tmwtypes.h file

#if defined(__STDC_UTF_16__) || 
(defined(_HAS_CHAR16_T_LANGUAGE_SUPPORT) && 
_HAS_CHAR16_T_LANGUAGE_SUPPORT)
typedef char16_t CHAR16_T;
#elif defined(_MSC_VER)
typedef wchar_t CHAR16_T;
#else
typedef UINT16_T CHAR16_T;
#endif

and instead of typedef char16_t CHAR16_T; line use typedef UINT16_T 
CHAR16_T;

On Wed, 7 May 2014 15:29:28 -0700, Tony Kelman wrote:
> 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.

-- 
Senses, Begum


More information about the Ipopt mailing list