[Ipopt] Having trouble obtaining mex file using mavericks

Tony Kelman kelman at berkeley.edu
Wed May 7 15:04:50 EDT 2014


Hi Begum,

These errors are due to the different C++ standard library used starting in 
Mavericks, as you found. Have you recompiled Ipopt since upgrading your OS 
and Xcode, or were you trying to use existing binaries? As long as you're 
using Ipopt 3.11.7 or newer, the standard-library linking should be fixed 
for compiling Ipopt itself. Hopefully it should work for compiling the 
Matlab interface too. I don't think I have Matlab installed in my Mavericks 
VM, I can't remember if I've checked whether or not building the Matlab 
interface in Mavericks works. If there are still problems after recompiling 
Ipopt I'll try to borrow a labmate's Mac and see what's wrong.

-Tony


-----Original Message----- 
From: Senses,Begum
Sent: Wednesday, May 07, 2014 11:41 AM
To: Ipopt
Subject: [Ipopt] Having trouble obtaining mex file using mavericks


Hello everyone,

I am having trouble obtaining mex files. I just changed my operating
system to mavericks. I updated my Xcode to version 5.1.1. Before making
these changes everything was working perfectly fine. I assume that the
gfortran version and configuration script that I am currently using
would be helpful understanding the problem therefore I will give them in
detail. Gfortran version information is given as follows:

Using built-in specs.
COLLECT_GCC=gfortran
COLLECT_LTO_WRAPPER=/usr/local/gfortran/libexec/gcc/x86_64-apple-darwin13/4.8.2/lto-wrapper
Target: x86_64-apple-darwin13
Configured with: ../gcc-4.8.2/configure --prefix=/usr/local/gfortran
--with-gmp=/Users/fx/devel/gcc/deps-static/x86_64
--enable-languages=c,c++,fortran,objc,obj-c++
--build=x86_64-apple-darwin13
Thread model: posix
gcc version 4.8.2 (GCC)

I am using the following configuration script that Tony recommended me:

1) Create the build directory with a share subdirectory, and copy
Ipopt/contrib/MatlabInterface/MatlabInterface.site to
build/share/config.site.

2) Run the configure script ./configure --enable-matlab-ma57 CC=gcc
--enable-matlab-static \
   --with-blas='-framework vecLib' --with-lapack='-framework vecLib'

3) make
4) make install

5) Then in build/Ipopt/contrib/MatlabInterface/src/Makefile, on the
LDFLAGS line, comment out
   -static-libgcc -static-libstdc++

6) On LIBS = <...> line, delete -lgcc_eh and
   -L/usr/local/gfortran/lib/gcc/x86_64-apple-darwin11/4.6.2/../../..

7) make
8) make install

All of these step were working perfectly fine until I change my
operating system and upgrade my Xcode 4. to Xcode 5. Now I have trouble
obtaining the mex file. When I perform the 7th step I get the following
errors


<snip>
     mex: link of ' "ipopt.mexmaci64"' failed.


When I search the differences between Xcode 4 and Xcode 5 I learned
that Xcode 5 has removed support for gcc, such that gcc is no longer
actually the GNU Compiler Collection, but is symlinked to the  clang
compiler. If I want to use you need to use libstdc++, and not the
clang++ default of libc++ via xcode. One webpage recommends adding link
flags -stdlib=libstdc++ -mmacosx-version-min=10.6.
(https://support.enthought.com/entries/26184115-GCC-Clang-and-Cython-in-OS-X-10-9-Mavericks)
I tried adding these flags to linker flags in the mex file Makefile I
am still getting the same problem.

Does anybody know a solution to my problem?

Thank you.

-- 
Senses, Begum
_______________________________________________
Ipopt mailing list
Ipopt at list.coin-or.org
http://list.coin-or.org/mailman/listinfo/ipopt 



More information about the Ipopt mailing list