<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">I tried again with Matlab R2010a with the same result. Any ideas? Anyone?<div><br></div><div>Thanks in advance,</div><div><br><div>
<span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; -webkit-text-decorations-in-effect: none; text-indent: 0px; -webkit-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; -webkit-text-decorations-in-effect: none; text-indent: 0px; -webkit-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><div>-- </div><div>Ray Zimmerman</div><div>Senior Research Associate</div><div>419A Warren Hall, Cornell University, Ithaca, NY 14853</div><div>phone: (607) 255-9645</div><br class="Apple-interchange-newline"></span></div></span></div></span><br class="Apple-interchange-newline"></span><br class="Apple-interchange-newline">
</div>
<br><div><div>On Sep 30, 2011, at 3:08 PM, Ray Zimmerman wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">I've finally gotten back to trying to build Ipopt and the Matlab interface on my Mac. I've been able to build Ipopt successfully, but I'm having trouble with the MEX build. Here is my setup ...<div><br></div><div>OS X 10.6.8 Snow Leopard</div><div>Ipopt-3.10.1</div><div>gcc -v : gcc version 4.2.1 (Apple Inc. build 5666) (dot 3)</div><div>gfortran -v : gcc version 4.2.1 (Apple Inc. build 5664)</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>(from <a href="http://r.research.att.com/tools/">http://r.research.att.com/tools/</a>)</div><div>Matlab R2011b (7.13)</div><div><br></div><div>Using ...</div><div><br></div><div><div><font class="Apple-style-span" face="Courier">../configure --with-blas="-framework vecLib" \</font></div><div><font class="Apple-style-span" face="Courier"> --with-lapack="-framework vecLib" F77=gfortran \</font></div><div><font class="Apple-style-span" face="Courier"> FFLAGS="-fexceptions -m64 -fbackslash" \</font></div><div><font class="Apple-style-span" face="Courier"> CFLAGS="-fno-common -no-cpp-precomp -arch x86_64 -m64" \</font></div><div><font class="Apple-style-span" face="Courier"> CXXFLAGS="-fno-common -no-cpp-precomp -fexceptions -arch x86_64 -m64" \</font></div><div><font class="Apple-style-span" face="Courier"> -disable-shared CC=gcc-4.0 CXX=g++-4.0</font></div><div><br></div><div><div>I added the following line to ~/.matlab/R2011b/mexopts.sh (from a Mar 9, 2010 posting by Peter)</div><div><font class="Apple-style-span" face="Courier"> LDFLAGS="$LDFLAGS -framework vecLib"</font></div></div><div><br></div><div>In Ipopt-3.10.1/build/Ipopt/contrib/MatlabInterface/src/Makefile</div><div><div><font class="Apple-style-span" face="Courier"> MATLAB_HOME = /Applications/-math/MATLAB_R2011b.app/</font></div><div><font class="Apple-style-span" face="Courier"> MEXSUFFIX = mexmaci64</font></div></div><div><br></div><div><br></div><div>When I run 'make' for the MatlabInterface, I get the following:</div><div><br></div><div><div><font class="Apple-style-span" face="Courier">$ make</font></div><div><font class="Apple-style-span" face="Courier">/Applications/-math/MATLAB_R2011b.app//bin/mex -v -cxx -O CC="g++-4.0" CXX="g++-4.0" LD="g++-4.0" COPTIMFLAGS="-fno-common -no-cpp-precomp -fexceptions -arch x86_64 -m64 -DIPOPT_BUILD -DMATLAB_MEXFILE " CXXOPTIMFLAGS="-fno-common -no-cpp-precomp -fexceptions -arch x86_64 -m64 -DIPOPT_BUILD -DMATLAB_MEXFILE " LDOPTIMFLAGS="-fno-common -no-cpp-precomp -fexceptions -arch x86_64 -m64 -DIPOPT_BUILD -DMATLAB_MEXFILE " -L/Users/ray/build/Ipopt-3.10.1/build/lib -lipopt -L/Users/ray/build/Ipopt-3.10.1/build/lib -lcoinmumps -lpthread -framework vecLib -L/usr/lib/gcc/i686-apple-darwin10/4.2.1/x86_64 -L/usr/lib/i686-apple-darwin10/4.2.1 -L/usr/lib/gcc/i686-apple-darwin10/4.2.1 -L/usr/lib/gcc/i686-apple-darwin10/4.2.1/../../../i686-apple-darwin10/4.2.1 -L/usr/lib/gcc/i686-apple-darwin10/4.2.1/../../.. -lgfortranbegin -lgfortran -lSystem -L/Users/ray/build/Ipopt-3.10.1/build/lib -lcoinmetis -framework vecLib -framework vecLib -framework vecLib -lm -ldl -output ipopt.mexmaci64 matlabexception.o matlabfunctionhandle.o matlabjournal.o iterate.o ipoptoptions.o options.o sparsematrix.o callbackfunctions.o matlabinfo.o matlabprogram.o ipopt.o</font></div><div><font class="Apple-style-span" face="Courier">-> mexopts.sh sourced from directory (DIR = $PREF_DIR)</font></div><div><font class="Apple-style-span" face="Courier"> FILE = /Users/ray/.matlab/R2011b/mexopts.sh</font></div><div><font class="Apple-style-span" face="Courier">----------------------------------------------------------------</font></div><div><font class="Apple-style-span" face="Courier">-> MATLAB = /Applications/-math/MATLAB_R2011b.app</font></div><div><font class="Apple-style-span" face="Courier">-> CC = g++-4.0</font></div><div><font class="Apple-style-span" face="Courier">-> CC flags:</font></div><div><font class="Apple-style-span" face="Courier"> CFLAGS = -fno-common -no-cpp-precomp -arch x86_64 -isysroot /Developer/SDKs/MacOSX10.6.sdk -mmacosx-version-min=10.5 -fexceptions</font></div><div><font class="Apple-style-span" face="Courier"> CDEBUGFLAGS = -g</font></div><div><font class="Apple-style-span" face="Courier"> COPTIMFLAGS = -fno-common -no-cpp-precomp -fexceptions -arch x86_64 -m64 -DIPOPT_BUILD -DMATLAB_MEXFILE </font></div><div><font class="Apple-style-span" face="Courier"> CLIBS = -L/Applications/-math/MATLAB_R2011b.app/bin/maci64 -lmx -lmex -lmat -lstdc++</font></div><div><font class="Apple-style-span" face="Courier"> arguments = -DMX_COMPAT_32</font></div><div><font class="Apple-style-span" face="Courier">-> CXX = g++-4.0</font></div><div><font class="Apple-style-span" face="Courier">-> CXX flags:</font></div><div><font class="Apple-style-span" face="Courier"> CXXFLAGS = -fno-common -no-cpp-precomp -fexceptions -arch x86_64 -isysroot /Developer/SDKs/MacOSX10.6.sdk -mmacosx-version-min=10.5</font></div><div><font class="Apple-style-span" face="Courier"> CXXDEBUGFLAGS = -g</font></div><div><font class="Apple-style-span" face="Courier"> CXXOPTIMFLAGS = -fno-common -no-cpp-precomp -fexceptions -arch x86_64 -m64 -DIPOPT_BUILD -DMATLAB_MEXFILE </font></div><div><font class="Apple-style-span" face="Courier"> CXXLIBS = -L/Applications/-math/MATLAB_R2011b.app/bin/maci64 -lmx -lmex -lmat -lstdc++</font></div><div><font class="Apple-style-span" face="Courier"> arguments = -DMX_COMPAT_32</font></div><div><font class="Apple-style-span" face="Courier">-> FC = gfortran</font></div><div><font class="Apple-style-span" face="Courier">-> FC flags:</font></div><div><font class="Apple-style-span" face="Courier"> FFLAGS = -fexceptions -m64 -fbackslash</font></div><div><font class="Apple-style-span" face="Courier"> FDEBUGFLAGS = -g</font></div><div><font class="Apple-style-span" face="Courier"> FOPTIMFLAGS = -O</font></div><div><font class="Apple-style-span" face="Courier"> FLIBS = -L/Applications/-math/MATLAB_R2011b.app/bin/maci64 -lmx -lmex -lmat -L -lgfortran -L/usr/lib/gcc/i686-apple-darwin10/4.2.1/x86_64 -lgfortranbegin</font></div><div><font class="Apple-style-span" face="Courier"> arguments = -DMX_COMPAT_32</font></div><div><font class="Apple-style-span" face="Courier">-> LD = g++-4.0</font></div><div><font class="Apple-style-span" face="Courier">-> Link flags:</font></div><div><font class="Apple-style-span" face="Courier"> LDFLAGS = -Wl,-twolevel_namespace -undefined error -arch x86_64 -Wl,-syslibroot,/Developer/SDKs/MacOSX10.6.sdk -mmacosx-version-min=10.5 -bundle -Wl,-exported_symbols_list,/Applications/-math/MATLAB_R2011b.app/extern/lib/maci64/mexFunction.map -framework vecLib</font></div><div><font class="Apple-style-span" face="Courier"> LDDEBUGFLAGS = -g</font></div><div><font class="Apple-style-span" face="Courier"> LDOPTIMFLAGS = -fno-common -no-cpp-precomp -fexceptions -arch x86_64 -m64 -DIPOPT_BUILD -DMATLAB_MEXFILE </font></div><div><font class="Apple-style-span" face="Courier"> LDEXTENSION = .mexmaci64</font></div><div><font class="Apple-style-span" face="Courier"> arguments = -L/Users/ray/build/Ipopt-3.10.1/build/lib -lipopt -L/Users/ray/build/Ipopt-3.10.1/build/lib -lcoinmumps -lpthread</font></div><div><font class="Apple-style-span" face="Courier">-> LDCXX = </font></div><div><font class="Apple-style-span" face="Courier">-> Link flags:</font></div><div><font class="Apple-style-span" face="Courier"> LDCXXFLAGS = </font></div><div><font class="Apple-style-span" face="Courier"> LDCXXDEBUGFLAGS = </font></div><div><font class="Apple-style-span" face="Courier"> LDCXXOPTIMFLAGS = </font></div><div><font class="Apple-style-span" face="Courier"> LDCXXEXTENSION = </font></div><div><font class="Apple-style-span" face="Courier"> arguments = -L/Users/ray/build/Ipopt-3.10.1/build/lib -lipopt -L/Users/ray/build/Ipopt-3.10.1/build/lib -lcoinmumps -lpthread</font></div><div><font class="Apple-style-span" face="Courier">----------------------------------------------------------------</font></div><div><font class="Apple-style-span" face="Courier"><br></font></div><div><font class="Apple-style-span" face="Courier"><br></font></div><div><font class="Apple-style-span" face="Courier"> mex: -framework not a valid option.</font></div><div><font class="Apple-style-span" face="Courier"><br></font></div><div><font class="Apple-style-span" face="Courier"> Usage:</font></div><div><font class="Apple-style-span" face="Courier"> MEX [option1 ... optionN] sourcefile1 [... sourcefileN]</font></div><div><font class="Apple-style-span" face="Courier"> [objectfile1 ... objectfileN] [libraryfile1 ... libraryfileN]</font></div><div><font class="Apple-style-span" face="Courier"><br></font></div><div><font class="Apple-style-span" face="Courier"> Use the -help option for more information, or consult the MATLAB External Interfaces Guide.</font></div><div><font class="Apple-style-span" face="Courier"><br></font></div><div><font class="Apple-style-span" face="Courier">make: *** [ipopt.mexmaci64] Error 1</font></div></div></div><div><br></div><div><br></div><div>So if I manually attempt to run the same call to mex, with all of the '-framework vecLib' entries removed (why are there 4 of them anyway)? Then I get the following error ...</div><div><br></div><div><div><font class="Apple-style-span" face="Courier">ld: library not found for -lgfortranbegin</font></div><div><font class="Apple-style-span" face="Courier">collect2: ld returned 1 exit status</font></div><div><font class="Apple-style-span" face="Courier"><br></font></div><div><font class="Apple-style-span" face="Courier"> mex: link of ' "ipopt.mexmaci64"' failed.</font></div></div><div><br></div><div>But I do have ...</div><div><div><font class="Apple-style-span" face="Courier"> /usr/lib/gcc/i686-apple-darwin10/4.2.1/libgfortranbegin.a</font></div><div><font class="Apple-style-span" face="Courier"> /usr/lib/gcc/i686-apple-darwin10/4.2.1/libgfortranbegin.la</font></div><div><font class="Apple-style-span" face="Courier"> /usr/lib/gcc/i686-apple-darwin10/4.2.1/x86_64/libgfortranbegin.a</font></div><div><font class="Apple-style-span" face="Courier"> /usr/lib/gcc/i686-apple-darwin10/4.2.1/x86_64/libgfortranbegin.la</font></div> </div><div>I'm guessing all I need is a nudge in the right direction. Any help is appreciated. By the way, once I am successful with this build, I hope to try it on OS X 10.7 Lion as well.</div><div><br></div><div>Thanks,</div><div><br></div><br><div>
<div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; font-size: 12px; "><div>-- </div><div>Ray Zimmerman</div><div>Senior Research Associate</div><div>419A Warren Hall, Cornell University, Ithaca, NY 14853</div><div>phone: (607) 255-9645</div><br class="Apple-interchange-newline"></div></div><br class="Apple-interchange-newline"><br class="Apple-interchange-newline">
</div>
<br></div>_______________________________________________<br>Ipopt mailing list<br><a href="mailto:Ipopt@list.coin-or.org">Ipopt@list.coin-or.org</a><br>http://list.coin-or.org/mailman/listinfo/ipopt<br></blockquote></div><br></div></body></html>