[Ipopt] Get errors of the Ipopt Mex file in Matlab

Peter Carbonetto pcarbo at cs.ubc.ca
Tue Jul 21 15:59:38 EDT 2009


In my mind, there are two possibilities:

1. You are not using the proper version of gcc. For MATLAB 7.6, you should 
be using version 4.1.x (*not* 4.2).

2. There is a problem with your installation of MATLAB. There are reported 
problems with linking to the standard libraries installed with MATLAB, so 
for this I would do some searching on the MathWorks website.

Peter Carbonetto
Ph.D. Candidate
Dept. of Computer Science
University of British Columbia

On Tue, 21 Jul 2009, Gao, Z. wrote:

> Hello all,
> 
> I am trying to use Ipopt in Matlab. I (succesufully?) generated an ipopt.mexglx file and added its path to matlab. But when I tried to run the examples, I got this message:
> 
>   >> examplehs038
>   ??? Invalid MEX-file '/home/gao/CoinIpopt/build/lib/ipopt.mexglx':
>   /opt/matlab/R2008a/bin/glnx86/../../sys/os/glnx86/libstdc++.so.6: version
>   `GLIBCXX_3.4.9' not found (required by
>   /home/gao/CoinIpopt/build/lib/libipopt.so.0).
> 
>   Error in ==> examplehs038 at 33
>     [x info] = ipopt(x0,funcs,options);
> 
> It seems possibly that my gcc version is inconsistent with libstdc++, so I check their versions. And I have
> 
> ||/ Name           Version        Description
> +++-==============-==============-============================================
> ii  gcc            4:4.2.3-1ubunt The GNU C compiler
> ii  g++            4:4.2.3-1ubunt The GNU C++ compiler
> ii  gfortran       4:4.2.3-1ubunt The GNU Fortran 95 compiler
> 
> ii  libstdc++6     4.2.4-1ubuntu4 The GNU Standard C++ Library v3
> ii  libstdc++6-4.2 4.2.4-1ubuntu4 The GNU Standard C++ Library v3 (debugging f
> ii  libstdc++6-4.2 4.2.4-1ubuntu4 The GNU Standard C++ Library v3 (development
> ii  libstdc++6-4.2 4.2.4-1ubuntu4 The GNU Standard C++ Library v3 (documentati
> 
> It seems OK. I have no idea what's going wrong. I am using matlab 7.6 
> and ubuntu 8.04 and run the configure script via
> 
>   ./configure  \
>        ADD_CXXFLAGS="-fPIC -fexceptions"        \
>        ADD_CFLAGS="-fPIC -fexceptions"          \
>        ADD_FFLAGS="-fPIC -fexceptions"
> 
> Thanks.
> 
> Gao, Zhengyuan
> 
> ----------------------------------------------------------
> University of Amsterdam, FEB/ Department of Quantitative Economics
> Roetersstraat 11,  1018WB,  Amsterdam
> Tel: +31 20 525 4221
> Emai: z.gao at uva.nl
> http://home.uva.nl/z.gao
> 
> 



More information about the Ipopt mailing list