[Ipopt] Problem compiling IpOpt with Mingw

Stefan Vigerske stefan at math.hu-berlin.de
Fri Jun 25 04:28:27 EDT 2010


Hi,

if it's only the linear solver loader that makes the linking fail, then
you may just add --disable-linear-solver-loader to your configure call.
This should not harm as long as you have some linear solver available at
Ipopt build time (e.g., Mumps, Pardiso, or MA27).

Stefan

Max wrote:
> Hi all,
> I want compile matlab interface for ipopt in windows using MinGW/gnumex, but
> I encounter problems compiling IpOpt to create libipopt.a
> 
> My system use:
> - Windows XP SP3
> - Matlab R2008a
> - MinGW 5.1.6
> - MSys 1.0.11
> - IpOpt 3.8.1 (from tarball and svn)
> 
> First I've followed Ipopt guide using configure useful for matlab interface:
> 
> ./configure --enable-doscompile --disable-shared --enable-static CXX=g++
> CC=gcc F77=g77 ADD_CXXFLAGS="-fexceptions" ADD_CFLAGS="-fexceptions"
> ADD_FFLAGS="-fexceptions"
> 
> and all is ok, but launching make result is:
> 
> [...]
> Making all in src/Interfaces
> make[2]: Entering directory `/e/projs/Gas/CoinIpopt/Ipopt/src/Interfaces'
> /bin/sh ../../../libtool --tag=CXX --mode=link
> g++  -O3 -fomit-frame-pointer -mno-cygwin -pipe -DNDEBUG -pedantic-errors -Wimplicit
> -Wparentheses -Wreturn-type-Wcast-qual -Wall -Wpointer-arith -Wwrite-strings
> -Wconversion -Wno-unknown-pragmas -fexceptions  -I`echo
> ./../Common` -I`echo ./../LinAlg` -I`echo
> ./../Algorithm/LinearSolvers` -I`echo ./../LinAlg/TMatrices` -I`echo
> ./../Algorithm` -I`echo ./../Algorithm/Inexact` -I`echo
> ./../contrib/CGPenalty`   -o libipopt.la -rpath /e/projs/Gas/CoinIpopt/lib
> IpInterfacesRegOp.lo IpIpoptApplication.lo IpSolveStatistics.lo
> IpStdCInterface.lo IpStdFInterface.lo IpStdInterfaceTNLP.lo IpTNLPAdapter.lo
> IpTNLPReducer.lo ../contrib/LinearSolverLoader/libLinearSolverLoader.la
> ../../../ThirdParty/HSL/libcoinhsl.la
> ../../../ThirdParty/Metis/libcoinmetis.la
> ../../../ThirdParty/Lapack/libcoinlapack.la
> ../../../ThirdParty/Blas/libcoinblas.la ../contrib/CGPenalty/libcgpenalty.la
> ../Algorithm/libipoptalg.la ../Algorithm/LinearSolvers/liblinsolvers.la
> ../Common/libcommon.la ../LinAlg/liblinalg.la
> ../LinAlg/TMatrices/libtmatrices.la
> libtool: link: warning: undefined symbols not allowed in i686-pc-mingw32
> shared
> libraries
> rm -fr  .libs/libipopt.lax
> rm -fr .libs/libipopt.lax
> mkdir .libs/libipopt.lax
> rm -fr .libs/libipopt.lax/libLinearSolverLoader.a
> mkdir .libs/libipopt.lax/libLinearSolverLoader.a
> (cd .libs/libipopt.lax/libLinearSolverLoader.a && ar x
> /e/projs/Gas/CoinIpopt/Ipopt/src/Interfaces/../contrib/LinearSolverLoader/.libs/libLinearSolverLoader.a)
> libtool: link: ERROR: object name conflicts:
> .libs/libipopt.lax/libLinearSolverLoader.a//e/projs/Gas/CoinIpopt/Ipopt/src/Interfaces/../contrib/LinearSolverLoader/.libs/libLinearSolverLoader.a
> make[2]: *** [libipopt.la] Error 1
> make[2]: Leaving directory `/e/projs/Gas/CoinIpopt/Ipopt/src/Interfaces'
> make[1]: *** [all-recursive] Error 1
> make[1]: Leaving directory `/e/projs/Gas/CoinIpopt/Ipopt'
> make: *** [all-recursive] Error 1
> 
> 
> After (in a clean directory with distribution and source files) I've
> followed the procedure from Rodrigo Lopez-Negrete, downloading part of
> Mingw-TDM (3 files), copying content in Mingw installation directory and
> making backup of lib/libstdc++*, but at configure-time (using same command
> above) error reported is:
> 
> [...]
> checking whether to enable maintainer-specific portions of Makefiles... no
> configure: Using libtool script in directory ../..
> checking how to get verbose linking output from g77... -v
> checking for Fortran libraries of
> 77...  -LE:/Compilatori/MinGW/bin/../lib/gcc/mingw32/3.4.5 -LE:/Compilatori/MinGW/bin/../lib/gcc
> -LE:/Compilatori/MinGW/bin/../lib/gcc/mingw32/3.4.5/../../../../mingw32/lib
> -LE:/Compilatori/MinGW/bin/../lib/gcc/mingw32/3.4.5/../../.. -lfrtbegin -lg2c
> -lmingw32 -lmoldname -lmingwex -lmsvcrt -luser32 -lkernel32 -ladvapi32 -lshell32
> checking for dummy main to link with Fortran libraries... unknown
> configure: error: linking to Fortran libraries from C fails
> See `config.log' for more details.
> configure: error: /bin/sh './configure' failed for ThirdParty/Blas
> 
> 
> Finally I've repeated same tests with IpOpt obtained by svn, but results are
> the same
> 
> Where I'm wrong?
> 
> Thanks in advance
> 
> Max
> 
> 
> _______________________________________________
> Ipopt mailing list
> Ipopt at list.coin-or.org
> http://list.coin-or.org/mailman/listinfo/ipopt
> 


-- 
Stefan Vigerske
Humboldt University Berlin, Numerical Mathematics
http://www.math.hu-berlin.de/~stefan



More information about the Ipopt mailing list