[Ipopt] How to install Ipopt-3.9.1 interface with my Matlab R2010b on a Linux machine?
Rodrigo Lopez-Negrete
r.lopez.negrete at gmail.com
Sat Dec 11 14:25:33 EST 2010
Hi Hongkai,
I noticed you're using
ADDCXXFLAGS="-ansi -D_GNU_SOURCE -fPIC -fno-omit-frame-pointer -pthread"
...
Instead try
ADD_CXXFLAGS="-ansi -D_GNU_SOURCE -fPIC -fno-omit-frame-pointer -pthread"
Hope this helps,
Rodrigo
On Thu, Dec 9, 2010 at 10:13 PM, hongkai dai <daih at csail.mit.edu> wrote:
> Dear,
>
> I met problems in installing IPOPT-3.9.1 Matlab interface on my 64bit Linux
> machine. Here are the steps I used:
>
> 1. The Matlab R2010b uses gcc-4.3, so I downloaded gcc-4.3, g++-4.3 and
> gfortran-4.3.
> 2. 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.
> 3. I configured IPOPT with following command:
> ../configure CXX=g++-4.3 CC=gcc-4.3 FC=gfortran-4.3
> 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"
> 4. In step 2 and 3, I also tried to configure it with g++, gcc-4.3 and
> gfortran and the same flags.
> 5. Then I typed "make", "make test" and "make install", they all work
> well.
> 6. Finally I go to the subfolder
> /build/Ipopt/contrib/MatlabInterface/src, modified the Makefile by setting
> the matlab home and set MEXSUFFIX=mexa64
>
>
> Then it reports error as following:
> /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
> matlabexception.o: could not read symbols: Bad value
> collect2: ld returned 1 exit status
>
> mex: link of ' "ipopt.mexa64"' failed.
>
> make: *** [ipopt.mexa64] Error 1
>
>
> Could you help me figure out what I did wrong in the installation process?
>
> Best,
> Hongkai
>
> _______________________________________________
> Ipopt mailing list
> Ipopt at list.coin-or.org
> http://list.coin-or.org/mailman/listinfo/ipopt
>
>
--
*Rodrigo López-Negrete de la Fuente*
Doctoral Candidate
Email: rln at cmu.edu
WWW: http://rodrigo.lopez-negrete.org
Department of Chemical Engineering
Carnegie Mellon University
5000 Forbes Ave.
Pittsburgh, PA 15213-3890
USA
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://list.coin-or.org/pipermail/ipopt/attachments/20101211/84800909/attachment.html
More information about the Ipopt
mailing list