Hi Hongkai,<div><br></div><div>I noticed you're using </div><div><br></div><div><meta http-equiv="content-type" content="text/html; charset=utf-8">ADDCXXFLAGS="-ansi -D_GNU_SOURCE -fPIC -fno-omit-frame-pointer -pthread" ... </div>
<div><br></div><div>Instead try</div><div><br></div><div><meta http-equiv="content-type" content="text/html; charset=utf-8">ADD_CXXFLAGS="-ansi -D_GNU_SOURCE -fPIC -fno-omit-frame-pointer -pthread" <br><br></div>
<div>Hope this helps,</div><div> Rodrigo</div><div><br><div class="gmail_quote">On Thu, Dec 9, 2010 at 10:13 PM, hongkai dai <span dir="ltr"><<a href="mailto:daih@csail.mit.edu">daih@csail.mit.edu</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div bgcolor="#ffffff" text="#000000">
Dear,<br>
<br>
I met problems in installing IPOPT-3.9.1 Matlab interface on my 64bit
Linux machine. Here are the steps I used:<br>
<ol>
<li>The Matlab R2010b uses gcc-4.3, so I downloaded gcc-4.3, g++-4.3
and gfortran-4.3.</li>
<li>I revised the mexopts.sh file in my matlab bin subfolder, I set
CC='gcc-4.3' CXX='g++-4.3' FC='gfortran-4.3' for the glnxa64 section. I
tried "Hello world" program and it works well.</li>
<li>I configured IPOPT with following command:<br>
../configure CXX=g++-4.3 CC=gcc-4.3 FC=gfortran-4.3 <br>
ADDCXXFLAGS="-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 -fPIC
-fno-omit-frame-pointer"</li>
<li>In step 2 and 3, I also tried to configure it with g++, gcc-4.3
and gfortran and the same flags.<br>
</li>
<li>Then I typed "make", "make test" and "make install", they all
work well.</li>
<li>Finally I go to the subfolder
/build/Ipopt/contrib/MatlabInterface/src,
modified the Makefile by setting the matlab home and set
MEXSUFFIX=mexa64<br>
<div align="left"><br>
</div>
</li>
</ol>
Then it reports error as following:<br>
/usr/bin/ld: matlabexception.o: relocation R_X86_64_32 against
`.rodata.str1.1' can not be used when making a shared object; recompile
with -fPIC<br>
matlabexception.o: could not read symbols: Bad value<br>
collect2: ld returned 1 exit status<br>
<br>
mex: link of ' "ipopt.mexa64"' failed.<br>
<br>
make: *** [ipopt.mexa64] Error 1<br>
<br>
<br>
Could you help me figure out what I did wrong in the installation
process?<br>
<br>
Best,<br>
Hongkai<br>
</div>
<br>_______________________________________________<br>
Ipopt mailing list<br>
<a href="mailto:Ipopt@list.coin-or.org">Ipopt@list.coin-or.org</a><br>
<a href="http://list.coin-or.org/mailman/listinfo/ipopt" target="_blank">http://list.coin-or.org/mailman/listinfo/ipopt</a><br>
<br></blockquote></div><br><br clear="all"><br>-- <br><span style="font-family:Arial, Helvetica, sans-serif;font-size:14.1667px;border-collapse:collapse;color:rgb(51, 51, 51)"><img src="http://www.cs.cmu.edu/~aml/logos/wordmark.jpg" width="200" height="24"><br>
<strong><span><font color="#000000"><span style="background-color:rgb(255, 255, 255)">Rodrigo</span></font></span><font color="#000000"><span style="background-color:rgb(255, 255, 255)"> López-</span></font><span><font color="#000000"><span style="background-color:rgb(255, 255, 255)">Negrete</span></font></span><font color="#000000"><span style="background-color:rgb(255, 255, 255)"> de la Fuente</span></font></strong><font color="#000000"><span style="background-color:rgb(255, 255, 255)"><br>
</span></font>Doctoral Candidate <br>Email: <a href="mailto:rln@cmu.edu" style="color:rgb(7, 77, 143)" target="_blank"><span>rln@cmu.edu</span></a><div><span style="color:rgb(34, 34, 34)"><span style="background-color:rgb(255, 255, 255)">WWW</span></span><span style="background-color:rgb(255, 255, 255)">: <a href="http://rodrigo.lopez-negrete.org" target="_blank">http://rodrigo.lopez-negrete.org</a></span><span style="background-color:rgb(255, 255, 255)"><br>
</span><br>Department of Chemical Engineering<br>Carnegie Mellon University <br>5000 Forbes Ave. <br>Pittsburgh, PA 15213-3890<br>USA</div></span><br>
</div>