[Ipopt] FW: IPOPT MATLAB Interface Linking Porblem

Jonathan Hogg jonathan.hogg at stfc.ac.uk
Wed Apr 11 10:33:12 EDT 2012


It looks like */"-I/usr/local/MATLAB/R2011a /extern/include"/* shouldn't 
have a space in it.
Is there a space at the end of your line

MATLAB_HOME = /usr/local/MATLAB/R2011a

that can be deleted?

Jonathan.

On 11/04/12 12:08, Ge, Ming wrote:
>
> Hello Everyone:
>
> I am a new starter of IPOPT and Linux system, I am trying to install 
> IPOPT into my Ubuntu system but I got some problems in the final step: 
> Linking IPOPT with MATLAB interface.
>
> The Linux system I am using is Ubuntu 10.04 x64, MATLAB version is 
> 2011a x64, GCC version is 4.3.4 and IPOPT 3.9.3
>
> I followed the standard installation guide, ran and passed the initial 
> "configure", "make", "make test" and "make install", and finally after 
> I modified the "Makefile" by filling in the MATLAB installation folder:
>
> MATLAB_HOME = /usr/local/MATLAB/R2011a
>
> And
>
> MEXSUFFIX   = mexa64
>
> I ran the command "sudo  make install" it gave the following error:
>
> */g++-4.3 -O3 -pipe -DNDEBUG -pedantic-errors -Wimplicit -Wparentheses 
> -Wreturn-type -Wcast-qual -Wall -Wpointer-arith -Wwrite-strings 
> -Wconversion -Wno-unknown-pragmas -ansi -D_GNU_SOURCE -fPIC 
> -fno-omit-frame-pointer -pthread  -DMATLAB_MEXFILE  
> `PKG_CONFIG_PATH=/home/ming/Documents/Ipopt-3.9.3/build/lib/pkgconfig: 
> /usr/bin/pkg-config --cflags ipopt` -I/usr/local/MATLAB/R2011a 
> /extern/include \/*
>
> */        -o matlabexception.o -c 
> ../../../../../Ipopt/contrib/MatlabInterface/src/matlabexception.cpp/*
>
> */g++-4.3: /extern/include: No such file or directory/*
>
> */make: *** [matlabexception.o] Error 1/*
>
> And produce only one file: /matlabexception.o/
>
> The "configure" command I tried at the beginning are:
>
> */sudo ../configure CXX=g++-4.3 CC=gcc-4.3 F77=gfortran-4.3 
> ADD_CXXFLAGS="-fPIC -fexceptions" ADD_CFLAGS="-fPIC -fexceptions" 
> ADD_FFLAGS="-fPIC -fexceptions"/*
>
> */sudo ../configure CXX=g++-4.3 CC=gcc-4.3 F77=gfortran-4.3 
> ADD_CXXFLAGS="/* */-ansi -D_GNU_SOURCE -fPIC -fno-omit-frame-pointer 
> -pthread" ADD_CFLAGS="-ansi -D_GNU_SOURCE  -fexceptions -fPIC 
> -fno-omit-frame-pointer -pthread" ADD_FFLAGS="/* */-fexceptions 
> -fbackslash -fPIC -fno-omit-frame-pointer"/*
>
> When I run the command "mex -v" in my MATLAB it gives:
>
> /-> mexopts.sh sourced from directory (DIR = $HOME/.matlab/$REL_VERSION)/
>
> /   FILE = /home/ming/.matlab/R2011a/mexopts.sh/
>
> /----------------------------------------------------------------/
>
> /->    MATLAB                = /usr/local/MATLAB/R2011a/
>
> /->    CC                    = gcc/
>
> /->    CC flags:/
>
> /         CFLAGS             = -ansi -D_GNU_SOURCE  -fexceptions -fPIC 
> -fno-omit-frame-pointer -pthread/
>
> /         CDEBUGFLAGS        = -g/
>
> /         COPTIMFLAGS        = -O -DNDEBUG/
>
> /         CLIBS              = 
> -Wl,-rpath-link,/usr/local/MATLAB/R2011a/bin/glnxa64 
> -L/usr/local/MATLAB/R2011a/bin/glnxa64 -lmx -lmex -lmat -lm -lstdc++/
>
> /         arguments          =  -DMX_COMPAT_32/
>
> /->    CXX                   = g++/
>
> /->    CXX flags:/
>
> /         CXXFLAGS           = -ansi -D_GNU_SOURCE -fPIC 
> -fno-omit-frame-pointer -pthread/
>
> /         CXXDEBUGFLAGS      = -g/
>
> /         CXXOPTIMFLAGS      = -O -DNDEBUG/
>
> /         CXXLIBS            = 
> -Wl,-rpath-link,/usr/local/MATLAB/R2011a/bin/glnxa64 
> -L/usr/local/MATLAB/R2011a/bin/glnxa64 -lmx -lmex -lmat -lm/
>
> /         arguments          =  -DMX_COMPAT_32/
>
> /->    FC                    = gfortran/
>
> /->    FC flags:/
>
> /         FFLAGS             = -fexceptions -fbackslash -fPIC 
> -fno-omit-frame-pointer/
>
> /         FDEBUGFLAGS        = -g/
>
> /         FOPTIMFLAGS        = -O/
>
> /         FLIBS              = 
> -Wl,-rpath-link,/usr/local/MATLAB/R2011a/bin/glnxa64 
> -L/usr/local/MATLAB/R2011a/bin/glnxa64 -lmx -lmex -lmat -lm/
>
> /         arguments          =  -DMX_COMPAT_32/
>
> /->    LD                    = gcc/
>
> /->    Link flags:/
>
> /         LDFLAGS            = -pthread -shared 
> -Wl,--version-script,/usr/local/MATLAB/R2011a/extern/lib/glnxa64/mexFunction.map 
> -Wl,--no-undefined/
>
> /        LDDEBUGFLAGS       = -g/
>
> /         LDOPTIMFLAGS       = -O/
>
> /         LDEXTENSION        = .mexa64/
>
> /         arguments          = /
>
> /->    LDCXX                 = /
>
> /->    Link flags:/
>
> /         LDCXXFLAGS         = /
>
> /         LDCXXDEBUGFLAGS    = /
>
> /         LDCXXOPTIMFLAGS    = /
>
> /         LDCXXEXTENSION     = /
>
> /         arguments          = /
>
> /----------------------------------------------------------------/
>
> //
>
> //
>
> /    mex:  no file name given./
>
> //
>
> /    Usage:/
>
> /      MEX [option1 ... optionN] sourcefile1 [... sourcefileN]/
>
> /          [objectfile1 ... objectfileN] [libraryfile1 ... libraryfileN]/
>
> //
>
> /    Use the -help option for more information, or consult the MATLAB 
> External Interfaces Guide./
>
> //
>
> /??? Error using ==> mex at 208/
>
> I hope the information below can help you guys making suggestions. Any 
> help is appreciated.
>
> //
>
> Best Regards
>
> Stephen
>
>
>
> _______________________________________________
> Ipopt mailing list
> Ipopt at list.coin-or.org
> http://list.coin-or.org/mailman/listinfo/ipopt


-- 
Scanned by iCritical.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://list.coin-or.org/pipermail/ipopt/attachments/20120411/41cbac02/attachment.html>


More information about the Ipopt mailing list