<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
</head>
<body 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>
</body>
</html>