[Ipopt] IPOPT Matlab Interface on Snow Leopard

Anil Rao anilvrao at gmail.com
Wed Nov 25 12:55:37 EST 2009


I am having a problem compiling the IPOPT Matlab mex file on Mac OS-X 10.6
(Snow Leopard).  Specifically, I am able to compile, but the linker is
giving me the errors listed below.  In addition, I am getting a bunch of
undefined symbols (I have no idea why).  I am using Matlab R2009b 64-bit
(i.e., the newly released version of Matlab for 64-bit Intel Macs).  The
configure command I used to compile the IPOPT library is as follows:

./configure --prefix=$HOME/ipopt/install
ADD_CFLAGS="-fno-common -fexceptions -no-cpp-precomp -fPIC"
ADD_CXXFLAGS="-fno-common -fexceptions -no-cpp-precomp -fPIC"
ADD_FFLAGS="-x f77-cpp-input -fPIC -fno-common"
FLIBS="-lgfortran -lg2c -lfrtbegin -lSystem"
F77=gfortran CC=gcc CXX=g++ -disable-shared

If anyone can help me determine how to fix the problem, I am grateful.

- Anil

-> g++ -O3 -fomit-frame-pointer -pipe -DNDEBUG -Wimplicit -Wparentheses
-Wreturn-type -Wcast-qual -Wall -Wpointer-arith -Wwrite-strings -Wconversion
-Wno-unknown-pragmas -fno-common -fexceptions -no-cpp-precomp -fPIC
-DMATLAB_MEXFILE   -Wl,-twolevel_namespace -undefined error -arch x86_64
-Wl,-syslibroot,/Developer/SDKs/MacOSX10.5.sdk -mmacosx-version-min=10.5
-bundle
-Wl,-exported_symbols_list,/Applications/MATLAB_R2009b.app/extern/lib/maci64/mexFunction.map
-o  "ipopt.mexmaci64"   "matlabexception.o"  "matlabfunctionhandle.o"
"matlabjournal.o"  "iterate.o"  "ipoptoptions.o"  "options.o"
"sparsematrix.o"  "callbackfunctions.o"  "matlabinfo.o"  "matlabprogram.o"
"ipopt.o"  -L/Users/anilvrao/ipopt/install/lib -lipopt -llapack -lblas -lm
-ldl -lgfortran -lg2c -lfrtbegin -lSystem
-L/Applications/MATLAB_R2009b.app/bin/maci64 -lmx -lmex -lmat -lstdc++

ld: warning: in /Developer/SDKs/MacOSX10.5.sdk/usr/local/lib/libg2c.dylib,
file is not of required architecture
ld: warning: in /Developer/SDKs/MacOSX10.5.sdk/usr/local/lib/libfrtbegin.a,
file is not of required architecture
Undefined symbols:
  "std::basic_ostream<char, std::char_traits<char> >&
std::__ostream_insert<char, std::char_traits<char>
>(std::basic_ostream<char, std::char_traits<char> >&, char const*, long)",
referenced from:
      Ipopt::StreamJournal::PrintImpl(Ipopt::EJournalCategory,
Ipopt::EJournalLevel, char const*)in libipopt.a(IpJournalist.o)
      Ipopt::StreamJournal::PrintfImpl(Ipopt::EJournalCategory,
Ipopt::EJournalLevel, char const*, __va_list_tag*)in
libipopt.a(IpJournalist.o)
ld: symbol(s) not found
collect2: ld returned 1 exit status

    mex: link of ' "ipopt.mexmaci64"' failed.



-- 
Anil V. Rao
Assistant Professor
Dept. of Mechanical and Aerospace Engineering
University of Florida
MAE-A Room 314
Gainesville, FL 32611-6250
E-mail:  anilvrao at ufl.edu
Tel: (352) 392-5523 (office)
     (352) 672-1529 (cell)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://list.coin-or.org/pipermail/ipopt/attachments/20091125/0d056ace/attachment.html 


More information about the Ipopt mailing list