[Ipopt] Trouble building MATLAB interface for Ipopt 3.10.2 on OS/X 10.7.4

Benjamin S. Skrainka skrainka at uchicago.edu
Mon Jul 23 22:02:43 EDT 2012


Greetings!

Apologies if this is the wrong list to post to, but I RTFM'ed,
searched the wiki, the OS/X-specific instructions, etc. but could not
find any solution to my problem when attempting to build Ipopt's
MATLAB interface.  I can build Ipopt without problem:  it passes all
of the tests.

Here is my setup:

OS/X Lion 10.7.4

Ipopt 3.10.2

I built Ipopt with the following configure options under MacPorts:

 ../configure --disable-shared \
 --with-blas=BUILD --with-lapack=BUILD \
 F77=gfortran-mp-4.5 FFLAGS="-fexceptions -m64 -fbackslash" \
 CFLAGS="-fno-common -no-cpp-precomp -fexceptions -arch x86_64 -m64" \
 CXXFLAGS="-fno-common -no-cpp-precomp -fexceptions -arch x86_64 -m64"

There may be some kind of mismatch between gfortran-mp-4.5 and the g++
from Xcode.

When I attempt to build MATLAB, I get the following error:

$ make
g++ -fno-common -no-cpp-precomp -fexceptions -arch x86_64 -m64
-DIPOPT_BUILD -DMATLAB_MEXFILE
`PKG_CONFIG_PATH=/Users/bss/Tools/ipopt/Ipopt-3.10.2/build.matlab/lib/pkgconfig:/Users/bss/Tools/ipopt/Ipopt-3.10.2/build.matlab/share/pkgconfig:
/opt/local/bin/pkg-config --cflags ipopt`
-I/Applications/MATLAB_R2011b.app/extern/include \
        -o matlabexception.o -c
../../../../../Ipopt/contrib/MatlabInterface/src/matlabexception.cpp
Package ipopt was not found in the pkg-config search path.
Perhaps you should add the directory containing `ipopt.pc'
to the PKG_CONFIG_PATH environment variable
No package 'ipopt' found
../../../../../Ipopt/contrib/MatlabInterface/src/matlabexception.cpp:10:23:
error: IpUtils.hpp: No such file or directory
../../../../../Ipopt/contrib/MatlabInterface/src/matlabexception.cpp:
In constructor ‘MatlabException::MatlabException(const char*)’:
../../../../../Ipopt/contrib/MatlabInterface/src/matlabexception.cpp:17:
error: ‘Ipopt’ has not been declared
../../../../../Ipopt/contrib/MatlabInterface/src/matlabexception.cpp:
In copy constructor ‘MatlabException::MatlabException(const
MatlabException&)’:
../../../../../Ipopt/contrib/MatlabInterface/src/matlabexception.cpp:22:
error: ‘Ipopt’ has not been declared
../../../../../Ipopt/contrib/MatlabInterface/src/matlabexception.cpp:
In member function ‘MatlabException& MatlabException::operator=(const
MatlabException&)’:
../../../../../Ipopt/contrib/MatlabInterface/src/matlabexception.cpp:27:
error: ‘Ipopt’ has not been declared
make: *** [matlabexception.o] Error 1

I have edited the Makefil and mex setup per
https://projects.coin-or.org/Ipopt/wiki/Ipopt_on_Mac_OS_X.

I am using MATLAB R2011b and am running OS/X in 64-bit mode.

Thanks for your help!

Cheers,

Ben

-- 
Benjamin S. Skrainka
--------------------------------------------------
Postdoctoral Fellow
Energy Policy Institute at Chicago (EPIC)
Harris School of Public Policy
University of Chicago
--------------------------------------------------
SSRN Author page: http://ssrn.com/author=644819
--------------------------------------------------



More information about the Ipopt mailing list