[Ipopt-tickets] [Ipopt] #215: unable to build IPOPT with MinGW-w64 x86_64-w64-mingw32-gcc-4.8.0-win64_rubenvb compiler
Ipopt
coin-trac at coin-or.org
Thu Aug 15 06:08:44 EDT 2013
#215: unable to build IPOPT with MinGW-w64
x86_64-w64-mingw32-gcc-4.8.0-win64_rubenvb compiler
-------------------+------------------------
Reporter: jpye | Owner: ipopt-team
Type: defect | Status: new
Priority: normal | Component: Ipopt
Version: 3.11 | Severity: major
Keywords: |
-------------------+------------------------
I am unable to build IPOPT 3.11.3 on a MinGW-w64 build environment as
described on the following wiki page:
http://ascend4.org/Setting_up_a_MinGW-w64_build_environment
I first ran the download scripts for third-party BLAS, LAPACK, METIS and
MUMPS. Then I ran ./configure --prefix=/mingw.
Firstly note that config.guess incorrectly identifies the platform as i686
-pc-mingw32.
The build fails when configure enters the BLAS directory:
{{{
configure: configuring in ThirdParty/Blas
configure: running /bin/sh './configure' --prefix=/mingw '--
prefix=/mingw' --cache-file=/dev/null --srcdir=.
checking for svnversion... yes
checking build system type... i686-pc-mingw32
checking whether we want to compile in debug mode... no
checking for gcc... gcc
checking for C compiler default output file name... a.exe
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables... .exe
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ANSI C... none needed
configure: C compiler options are: -O3 -pipe -DNDEBUG -pedantic-errors
-Wimplicit -Wparentheses -Wsequence-point -Wreturn-type -Wc
ast-qual -Wall -Wno-unknown-pragmas -Wno-long-long -DBLAS_BUILD
configure: Trying to determine Fortran compiler name
checking for gfortran... gfortran
checking whether we are using the GNU Fortran 77 compiler... yes
checking whether gfortran accepts -g... yes
configure: Fortran compiler options are: -O3 -pipe
checking how to get verbose linking output from gfortran... -v
checking for Fortran libraries of gfortran... -lstdc++ -lm'
-Lc:/mingw/64/bin/../lib/gcc/x86_64-w64-mingw32/4.8.0 -Lc:/mingw/64/b
in/../lib/gcc
-Lc:/mingw/64/bin/../lib/gcc/x86_64-w64-mingw32/4.8.0/../../../../x86_64-w64-mingw32/lib/../lib
-Lc:/mingw/64/bin/..
/lib/gcc/x86_64-w64-mingw32/4.8.0/../../../../lib
-Lc:/mingw/64/bin/../lib/gcc/x86_64-w64-mingw32/4.8.0/../../../../x86_64-w64-min
gw32/lib -Lc:/mingw/64/bin/../lib/gcc/x86_64-w64-mingw32/4.8.0/../../..
-lgfortran -lmingw32 -lgcc_s -lmoldname -lmingwex -lmsvcrt
-lquadmath -lm -ladvapi32 -lshell32 -luser32 -lkernel32
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
john at win7_off64 ~/Ipopt-3.11.3
$
}}}
My compiler provides the following 'gcc -v' output:
{{{
$ gcc -v
Using built-in specs.
COLLECT_GCC=c:\mingw\64\bin\gcc.exe
COLLECT_LTO_WRAPPER=c:/mingw/64/bin/../libexec/gcc/x86_64-w64-mingw32/4.8.0
/lto-wrapper.exe
Target: x86_64-w64-mingw32
Configured with: /home/ruben/mingw-w64/src/gcc/configure
--host=x86_64-w64-mingw32 --build=x86_64-linux-gnu --target=x86_64-w64-mi
ngw32 --with-sysroot=/home/ruben/mingw-w64/mingw64mingw64/mingw64
--prefix=/home/ruben/mingw-w64/mingw64mingw64/mingw64 --with-gmp
=/home/ruben/mingw-w64/prereq/x86_64-w64-mingw32/install --with-
mpfr=/home/ruben/mingw-w64/prereq/x86_64-w64-mingw32/install --wit
h-mpc=/home/ruben/mingw-w64/prereq/x86_64-w64-mingw32/install --with-
cloog=/home/ruben/mingw-w64/prereq/x86_64-w64-mingw32/install
--disable-cloog-version-check --with-
isl=/home/ruben/mingw-w64/prereq/x86_64-w64-mingw32/install --enable-
cloog-backend=isl --wit
h-host-libstdcxx='-static -lstdc++ -lm' --enable-shared --enable-static
--enable-threads=win32 --enable-plugins --disable-multilib
--enable-languages=c,lto,c++,objc,obj-c++,fortran,java --enable-libgomp
--enable-fully-dynamic-string --enable-libstdcxx-time --d
isable-nls --disable-werror --enable-checking=release --with-gnu-as
--with-gnu-ld --disable-win32-registry --disable-rpath --disab
le-werror --with-libiconv-
prefix=/home/ruben/mingw-w64/prereq/x86_64-w64-mingw32/install --with-
pkgversion=rubenvb-4.8.0 --with-bu
gurl=mingw-w64-public at lists.sourceforge.net CC= CFLAGS='-O2 -march=nocona
-mtune=core2 -fomit-frame-pointer -momit-leaf-frame-poin
ter' CXXFLAGS='-O2 -march=nocona -mtune=core2 -fomit-frame-pointer -momit-
leaf-frame-pointer' LDFLAGS= 'BOOT_CFLAGS=-O2 -march=noc
ona -mtune=core2 -fomit-frame-pointer -momit-leaf-frame-pointer'
'BOOT_CXXFLAGS=-O2 -march=nocona -mtune=core2 -fomit-frame-pointe
r -momit-leaf-frame-pointer' BOOT_LDFLAGS= 'CFLAGS_FOR_TARGET= -O2
-march=nocona -mtune=core2 -fgraphite-identity -floop-interchan
ge -floop-block -floop-parallelize-all' 'CXXFLAGS_FOR_TARGET= -O2
-march=nocona -mtune=core2 -fgraphite-identity -floop-interchang
e -floop-block -floop-parallelize-all' LDFLAGS_FOR_TARGET=
Thread model: win32
gcc version 4.8.0 (rubenvb-4.8.0)
}}}
I suspect that IPOPT is incorrectly parsing this GCC output, because there
is a stray apostrophe in "-lm'" that is triggering an error in the
config.log output, attached to this bug.
I have had no problem building GSL or SUNDIALS with the same build
environment. Neither of these build/link to fortran code, though, to my
knowledge.
I have tried to build also with the tdm-gcc compiler, and I get other,
different errors relating to missing 'cygpath' and and attempt to run a
tool called 'lib' which doesn't exist. It looks as though MinGW platform
detection is somehow broken at the moment, perhaps?
I tried building 3.10.1 and 3.10.4, but I get the same problems as above
with the rubenvb builds in that case, still.
--
Ticket URL: <https://projects.coin-or.org/Ipopt/ticket/215>
Ipopt <http://projects.coin-or.org/Ipopt>
Interior-point optimizer for nonlinear programs.
More information about the Ipopt-tickets
mailing list