[Ipopt] Issues building dlls with MinGW / MSys

Tony Kelman kelman at berkeley.edu
Tue Sep 2 05:41:28 EDT 2014


Hi again.

These errors are a consequence of our old autotools, the wrapper scripts that libtool makes when creating shared libraries on Windows cause some problems with the default flags. You should be able to work around it by adding “coin_skip_warn_cflags=yes coin_skip_warn_cxxflags=yes” to the configure line. You might also need “lt_cv_deplibs_check_method=pass_all” if you’re building for 64-bit (looks like you aren’t though?).

I may have forgotten a few dependency linking flags for HSL in my round of patches last year, if you’re trying to build with the coinhsl folder in the source tree. I’ll look at that now and try to fix it in stable/3.11.

-Tony


From: Guy Charles 
Sent: Tuesday, September 02, 2014 2:27 AM
To: ipopt at list.coin-or.org 
Subject: [Ipopt] Issues building dlls with MinGW / MSys

Hi,

 

Apologies for the multiple posts - they are related but different enough issues to be separate questions.

 

I've searched around to find a solution to the errors that I'm getting in building ipopt dlls on windows, but no joy so far.  Hopefully someone on here is more experienced and will be able to point me in the right direction?

 

Background:  I am using the pyipopt python wrapper to ipopt, and would like to use more than the standard Mumps packages.  I'm OK using the ipopt binaries from the coin download page (http://www.coin-or.org/Binaries/Ipopt/Ipopt-3.11.0-Win32-Win64-dll.7z), but I have issues trying to use the HSL solver dll alongside ipopt.  My previous post showed that error and was asking if they should work together - the answer is not, and that I need to use a different dll build, so I'm trying to build the ipopt dll from the latest source code (3.11.9).

 

I'm working in MinGW / Msys - all should be the latest version (4.8.1-4), freshly installed.  If I do not want to build dlls, the process works fine (i.e. follow the build documentation:  configure;  make; make test ; make install).  This works with or without the HSL libs and with the coin BLAS or different versions of local BLAS routines.  At the end I get all the static libs, ipopt.exe and the hs071 example.  When I change to try to build shared libs I get a problem.  I am running:

 

cd build

make distclean (if I've been messing around with flags)

../configure --enable-shared --enable-dependency-linking

make

 

It seems to go through building the third party dlls OK, but stalls on the ipopt build with the following error:

 

g++ -O3 -pipe -DNDEBUG -pedantic-errors -Wparentheses -Wreturn-type -Wcast-qual -Wall -Wpointer-arith -Wwrite-strings -W

conversion -Wno-unknown-pragmas -Wno-long-long -DIPOPT_BUILD -o .libs/ipopt.exe ampl_ipopt.o  ./.libs/libipoptamplinterf

ace.dll.a /c/Ipopt-3.11.9/Ipopt-3.11.9/build/Ipopt/src/Interfaces/.libs/libipopt.dll.a ../../Interfaces/.libs/libipopt.d

ll.a /c/Ipopt-3.11.9/Ipopt-3.11.9/build/ThirdParty/ASL/.libs/libcoinasl.dll.a /c/Ipopt-3.11.9/Ipopt-3.11.9/build/ThirdPa

rty/Mumps/.libs/libcoinmumps.dll.a -Lc:/mingw/bin/../lib/gcc/mingw32/4.8.1 -Lc:/mingw/bin/../lib/gcc -Lc:/mingw/bin/../l

ib/gcc/mingw32/4.8.1/../../../../mingw32/lib -Lc:/mingw/bin/../lib/gcc/mingw32/4.8.1/../../.. /c/Ipopt-3.11.9/Ipopt-3.11

.9/build/ThirdParty/Metis/.libs/libcoinmetis.dll.a /c/Ipopt-3.11.9/Ipopt-3.11.9/build/ThirdParty/Lapack/.libs/libcoinlap

ack.dll.a /c/Ipopt-3.11.9/Ipopt-3.11.9/build/ThirdParty/Blas/.libs/libcoinblas.dll.a -lgfortran -lmingw32 -lmoldname -lm

ingwex -lmsvcrt -lquadmath -ladvapi32 -lshell32 -luser32 -lkernel32 -L/c/Ipopt-3.11.9/Ipopt-3.11.9/build/lib

creating ipopt.exe

./.libs/lt-ipopt.c:72:24: error: anonymous variadic macros were introduced in C99 [-Wvariadic-macros]

# define DEBUG(format, ...)

                        ^

./.libs/lt-ipopt.c: In function 'main':

./.libs/lt-ipopt.c:113:19: warning: to be safe all intermediate pointers in cast from 'char **' to 'const char **' must

be 'const' qualified [-Wcast-qual]

   execv("/bin/sh",(char const **)newargz);

                   ^

 

 

Has anyone else had this issue or can point me in the right direction?  Do I need to go down the visual studio compiled route instead?   Can I change the #define that it's pointing at to get around the error?

 

 

Thanks,

Guy

 

 

 

 

 

GUY CHARLES

Senior Simulation & Modelling Engineer

 

Red Bull Technology Ltd.
Building 1, Bradbourne Drive
Tilbrook, Milton Keynes, UK
MK7 8BJ


______________________________________________________________________
This email has been scanned by the Symantec Email Security.cloud service.
For more information please visit http://www.symanteccloud.com
______________________________________________________________________



--------------------------------------------------------------------------------
_______________________________________________
Ipopt mailing list
Ipopt at list.coin-or.org
http://list.coin-or.org/mailman/listinfo/ipopt
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://list.coin-or.org/pipermail/ipopt/attachments/20140902/69e410cc/attachment-0001.html>


More information about the Ipopt mailing list