<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>--&nbsp;</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 : &nbsp;gcc version 4.2.1 (Apple Inc. build 5666) (dot 3)</div><div>gfortran -v &nbsp;: &nbsp;gcc version 4.2.1 (Apple Inc. build 5664)</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>(from&nbsp;<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">&nbsp; &nbsp; --with-lapack="-framework vecLib" F77=gfortran \</font></div><div><font class="Apple-style-span" face="Courier">&nbsp; &nbsp; FFLAGS="-fexceptions -m64 -fbackslash" \</font></div><div><font class="Apple-style-span" face="Courier">&nbsp; &nbsp; CFLAGS="-fno-common -no-cpp-precomp -arch x86_64 -m64" \</font></div><div><font class="Apple-style-span" face="Courier">&nbsp; &nbsp; CXXFLAGS="-fno-common -no-cpp-precomp -fexceptions -arch x86_64 -m64" \</font></div><div><font class="Apple-style-span" face="Courier">&nbsp; &nbsp; -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">&nbsp; &nbsp; 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">&nbsp; &nbsp; MATLAB_HOME = /Applications/-math/MATLAB_R2011b.app/</font></div><div><font class="Apple-style-span" face="Courier">&nbsp; &nbsp; MEXSUFFIX &nbsp; = 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 &nbsp; -DIPOPT_BUILD -DMATLAB_MEXFILE " CXXOPTIMFLAGS="-fno-common -no-cpp-precomp -fexceptions -arch x86_64 -m64 &nbsp; -DIPOPT_BUILD -DMATLAB_MEXFILE " LDOPTIMFLAGS="-fno-common -no-cpp-precomp -fexceptions -arch x86_64 -m64 &nbsp; -DIPOPT_BUILD -DMATLAB_MEXFILE &nbsp;" &nbsp;-L/Users/ray/build/Ipopt-3.10.1/build/lib -lipopt &nbsp;-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 &nbsp;-L/Users/ray/build/Ipopt-3.10.1/build/lib -lcoinmetis &nbsp;-framework vecLib -framework vecLib -framework vecLib -lm &nbsp;-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">-&gt; mexopts.sh sourced from directory (DIR = $PREF_DIR)</font></div><div><font class="Apple-style-span" face="Courier">&nbsp; &nbsp;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">-&gt; &nbsp; &nbsp;MATLAB &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;= /Applications/-math/MATLAB_R2011b.app</font></div><div><font class="Apple-style-span" face="Courier">-&gt; &nbsp; &nbsp;CC &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;= g++-4.0</font></div><div><font class="Apple-style-span" face="Courier">-&gt; &nbsp; &nbsp;CC flags:</font></div><div><font class="Apple-style-span" face="Courier">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;CFLAGS &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; = -fno-common -no-cpp-precomp -arch x86_64 -isysroot /Developer/SDKs/MacOSX10.6.sdk -mmacosx-version-min=10.5 &nbsp;-fexceptions</font></div><div><font class="Apple-style-span" face="Courier">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;CDEBUGFLAGS &nbsp; &nbsp; &nbsp; &nbsp;= -g</font></div><div><font class="Apple-style-span" face="Courier">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;COPTIMFLAGS &nbsp; &nbsp; &nbsp; &nbsp;= -fno-common -no-cpp-precomp -fexceptions -arch x86_64 -m64 &nbsp; -DIPOPT_BUILD -DMATLAB_MEXFILE&nbsp;</font></div><div><font class="Apple-style-span" face="Courier">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;CLIBS &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;= -L/Applications/-math/MATLAB_R2011b.app/bin/maci64 -lmx -lmex -lmat -lstdc++</font></div><div><font class="Apple-style-span" face="Courier">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;arguments &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;= &nbsp;-DMX_COMPAT_32</font></div><div><font class="Apple-style-span" face="Courier">-&gt; &nbsp; &nbsp;CXX &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; = g++-4.0</font></div><div><font class="Apple-style-span" face="Courier">-&gt; &nbsp; &nbsp;CXX flags:</font></div><div><font class="Apple-style-span" face="Courier">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;CXXFLAGS &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; = -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">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;CXXDEBUGFLAGS &nbsp; &nbsp; &nbsp;= -g</font></div><div><font class="Apple-style-span" face="Courier">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;CXXOPTIMFLAGS &nbsp; &nbsp; &nbsp;= -fno-common -no-cpp-precomp -fexceptions -arch x86_64 -m64 &nbsp; -DIPOPT_BUILD -DMATLAB_MEXFILE&nbsp;</font></div><div><font class="Apple-style-span" face="Courier">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;CXXLIBS &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;= -L/Applications/-math/MATLAB_R2011b.app/bin/maci64 -lmx -lmex -lmat -lstdc++</font></div><div><font class="Apple-style-span" face="Courier">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;arguments &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;= &nbsp;-DMX_COMPAT_32</font></div><div><font class="Apple-style-span" face="Courier">-&gt; &nbsp; &nbsp;FC &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;= gfortran</font></div><div><font class="Apple-style-span" face="Courier">-&gt; &nbsp; &nbsp;FC flags:</font></div><div><font class="Apple-style-span" face="Courier">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;FFLAGS &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; = -fexceptions -m64 -fbackslash</font></div><div><font class="Apple-style-span" face="Courier">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;FDEBUGFLAGS &nbsp; &nbsp; &nbsp; &nbsp;= -g</font></div><div><font class="Apple-style-span" face="Courier">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;FOPTIMFLAGS &nbsp; &nbsp; &nbsp; &nbsp;= -O</font></div><div><font class="Apple-style-span" face="Courier">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;FLIBS &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;= -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">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;arguments &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;= &nbsp;-DMX_COMPAT_32</font></div><div><font class="Apple-style-span" face="Courier">-&gt; &nbsp; &nbsp;LD &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;= g++-4.0</font></div><div><font class="Apple-style-span" face="Courier">-&gt; &nbsp; &nbsp;Link flags:</font></div><div><font class="Apple-style-span" face="Courier">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;LDFLAGS &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;= -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">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;LDDEBUGFLAGS &nbsp; &nbsp; &nbsp; = -g</font></div><div><font class="Apple-style-span" face="Courier">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;LDOPTIMFLAGS &nbsp; &nbsp; &nbsp; = -fno-common -no-cpp-precomp -fexceptions -arch x86_64 -m64 &nbsp; -DIPOPT_BUILD -DMATLAB_MEXFILE &nbsp;</font></div><div><font class="Apple-style-span" face="Courier">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;LDEXTENSION &nbsp; &nbsp; &nbsp; &nbsp;= .mexmaci64</font></div><div><font class="Apple-style-span" face="Courier">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;arguments &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;= &nbsp;-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">-&gt; &nbsp; &nbsp;LDCXX &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; =&nbsp;</font></div><div><font class="Apple-style-span" face="Courier">-&gt; &nbsp; &nbsp;Link flags:</font></div><div><font class="Apple-style-span" face="Courier">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;LDCXXFLAGS &nbsp; &nbsp; &nbsp; &nbsp; =&nbsp;</font></div><div><font class="Apple-style-span" face="Courier">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;LDCXXDEBUGFLAGS &nbsp; &nbsp;=&nbsp;</font></div><div><font class="Apple-style-span" face="Courier">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;LDCXXOPTIMFLAGS &nbsp; &nbsp;=&nbsp;</font></div><div><font class="Apple-style-span" face="Courier">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;LDCXXEXTENSION &nbsp; &nbsp; =&nbsp;</font></div><div><font class="Apple-style-span" face="Courier">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;arguments &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;= &nbsp;-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">&nbsp; &nbsp; mex: &nbsp;-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">&nbsp; &nbsp; Usage:</font></div><div><font class="Apple-style-span" face="Courier">&nbsp; &nbsp; &nbsp; MEX [option1 ... optionN] sourcefile1 [... sourcefileN]</font></div><div><font class="Apple-style-span" face="Courier">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; [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">&nbsp; &nbsp; 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">&nbsp; &nbsp; 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">&nbsp; &nbsp; /usr/lib/gcc/i686-apple-darwin10/4.2.1/libgfortranbegin.a</font></div><div><font class="Apple-style-span" face="Courier">&nbsp; &nbsp; /usr/lib/gcc/i686-apple-darwin10/4.2.1/libgfortranbegin.la</font></div><div><font class="Apple-style-span" face="Courier">&nbsp; &nbsp; /usr/lib/gcc/i686-apple-darwin10/4.2.1/x86_64/libgfortranbegin.a</font></div><div><font class="Apple-style-span" face="Courier">&nbsp; &nbsp; /usr/lib/gcc/i686-apple-darwin10/4.2.1/x86_64/libgfortranbegin.la</font></div>&nbsp; &nbsp;&nbsp;</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>--&nbsp;</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>