[Ipopt] Problem compiling IpOpt with Mingw

Max maxsax at libero.it
Sun Jun 20 18:15:58 EDT 2010


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




More information about the Ipopt mailing list