[Ipopt] Compiling IPOPT with ma57 source code

Senses,Begum bgmsenses at ufl.edu
Tue Jun 17 18:43:24 EDT 2014


Hi Tony,

When I --enable-matlab-static I can not obtain the mex file. When I run 
make to obtain mexfile I get the following errors.

Undefined symbols for architecture x86_64:
   "___addtf3", referenced from:
       _write_float in libgfortran.a(write.o)
       __gfortran_random_r16 in libgfortran.a(random.o)
       __gfortran_arandom_r16 in libgfortran.a(random.o)
   "___divtf3", referenced from:
       _write_float in libgfortran.a(write.o)
   "___eqtf2", referenced from:
       _write_float in libgfortran.a(write.o)
   "___floatunditf", referenced from:
       __gfortran_random_r16 in libgfortran.a(random.o)
       __gfortran_arandom_r16 in libgfortran.a(random.o)
   "___getf2", referenced from:
       _write_float in libgfortran.a(write.o)
   "___gttf2", referenced from:
       _write_float in libgfortran.a(write.o)
   "___lttf2", referenced from:
       _write_float in libgfortran.a(write.o)
       ___quadmath_printf_fp in libquadmath.a(printf_fp.o)
   "___multf3", referenced from:
       _write_float in libgfortran.a(write.o)
       __gfortran_random_r16 in libgfortran.a(random.o)
       __gfortran_arandom_r16 in libgfortran.a(random.o)
       _round_and_return in libquadmath.a(strtoflt128.o)
       _strtoflt128 in libquadmath.a(strtoflt128.o)
   "___subtf3", referenced from:
       _write_float in libgfortran.a(write.o)
   "___trunctfdf2", referenced from:
       _write_float in libgfortran.a(write.o)
   "___unordtf2", referenced from:
       _write_float in libgfortran.a(write.o)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see 
invocation)

     mex: link of ' "ipopt.mexmaci64"' failed.



On Tue, 17 Jun 2014 14:19:30 -0700, Tony Kelman wrote:
> Hi Begum,
>
> Try --enable-matlab-static. And the .site file, hopefully you're
> using that too. It also seems from discussion with Anil that it would
> be better to leave off the '-framework vecLib' parts and use the
> reference BLAS instead, since he was seeing strange non-repeatable
> results. Still haven't gotten to the bottom of what was causing that
> one, but the reference BLAS appeared to fix it.
>
> -Tony
>
>
>
> -----Original Message----- From: Senses,Begum
> Sent: Tuesday, June 17, 2014 2:12 PM
> To: Ipopt
> Subject: [Ipopt] Compiling IPOPT with ma57 source code
>
>
> Hello everyone,
>
> I am using ipopt with ma57. I can compile ipopt using the flag
> --enable-matlab-ma57. But now I need to compile ipopt with ma57 
> source
> code. I am aware of the fact that somebody else asked this question
> before (https://projects.coin-or.org/Ipopt/ticket/232) but the 
> answers
> did not solve my problem. Now, I will explain what I did to compile
> ipopt with ma57 source code. First, I put coinhsl into Thirdparty 
> folder
> and used the following configuration script.
>
> ./configure --disable-shared CC=gcc --with-blas='-framework vecLib'
> --with-lapack='-framework vecLib' ADD_CXXFLAGS='-stdlib=libstdc++'
>
> This configuration script worked fine. I was also able to run make 
> and
> make install. I even obtained a mexfile. But when I try to run my
> problem from Matlab I got the following error.
>
> Invalid MEX-file
> '.../ipopt.mexmaci64':
> dlopen(.../ipopt.mexmaci64,
> 6): Symbol not found: __gfortran_transfer_array_write
>   Referenced from:
>   .../ipopt.mexmaci64
>   Expected in:
>   /Applications/MATLAB_R2013a.app/sys/os/maci64/libgfortran.3.dylib
>  in
>  
> /Users/bgmsenses/Documents/Dropbox/gpops2new/nlp/ipopt/ipopt.mexmaci64
>
> I tried to change the FC_LIBDIR line in mexopts.sh from
>
> FC_LIBDIR=`$FC -print-file-name=libgfortran.dylib 2>&1 | sed -n
> '1s/\/*libgfortran\.dylib//p'`
>
> to
>
> FC_LIBDIR=`$FC -print-file-name=libgfortran.a 2>&1 | sed -n
> '1s/\/*libgfortran\.a//p'`
>
> but it is still giving me the same problem.
>
> I am using mac 0SX 10.8.5, gcc 4.8.2 and XCODE 5.1.1. I know my
> gfortran is too new for matlab mexfile and I am supposed to have
> gfortran 4.2 but I am also working with ma57 separately on this 
> computer
> so I dont want to mess with my gfortran compiler. Is there a way to 
> fix
> my problem without changing gfortran compiler?
>
> Thank you.

-- 
Senses, Begum


More information about the Ipopt mailing list