[Ipopt] Issues building dlls with MinGW / MSys
Tony Kelman
kelman at berkeley.edu
Tue Sep 2 13:00:27 EDT 2014
Guy,
Happy to help, I tend to respond quickly if something comes across the list while I’m online and it’s a problem that I’ve seen before.
That looks like a complete set of dll’s. “make install” will put them all in one place, by default in build/bin. Ipopt’s “make test” isn’t currently set up to copy dll’s into the test folder or add build/bin to the path temporarily while running the tests, the dll capability from the standard ../configure; make build is relatively recent. You could do one of those steps manually. The location of the dll’s for libgcc, libgfortran etc varies depending on your compiler installation (and whether you’re using MSYS, Cygwin, cross-compiling, etc), so it’s tough to figure out the right way to do this automatically in a way that would always work. To get the test executables to run, all dll dependencies need to be either in the same folder as the executable (build/Ipopt/test) or on the path.
In response to your other email, I was going to suggest that you might be able to try cross-compiling if you have access to any Linux machines running up-to-date Ubuntu, Fedora, openSUSE, or Arch distributions that you can install packages on. But maybe that’s more complicated, it can be faster to build Ipopt and all its dependencies that way (Windows builds can be pretty slow) but maybe not worth the trouble.
Can you tell me exactly which MinGW version you installed and where from? There are subtle differences in threading model, exception handling, and other version incompatibilities so it’s best to stick with the same libgcc, libgfortran, etc that were used to compile a library whenever possible. Perhaps the easiest way to install my opensuse builds would be through a Julia package called WinRPM.jl that’s specifically designed to parse the rpm metadata and download all the dependencies properly. Julia itself is kind of a big download (http://julialang.org/downloads/), but you might find you like it better than Matlab or Python. There are some really smart guys at MIT working on an optimization modeling language called JuMP (http://jump.readthedocs.org/en/latest/), that does automatic differentiation and interfaces to Ipopt along with a bunch of other optimization solvers.
I’m not sure whether this will work within the restrictions of your network, but if you want to try this route, you should be able to get my Ipopt dll’s and all the correct dependencies by running the following commands in Julia:
Pkg.add("WinRPM")
using WinRPM
push!(WinRPM.sources, "http://download.opensuse.org/repositories/home:/kelman:/mingw-coinor/openSUSE_13.1")
WinRPM.update()
WinRPM.install("coin-or-Ipopt")
Pkg.dir("WinRPM","deps","usr",Sys.MACHINE,"sys-root","mingw","bin")
If that all works, you should get a whole set of dll’s and dependencies inside the folder returned by Pkg.dir(...). I recommend checking the DLL’s under Dependency Walker to verify all the dependencies are right.
You can also download the builds manually from http://download.opensuse.org/repositories/home:/kelman:/mingw-coinor/openSUSE_13.1/noarch/mingw32-coin-or-Ipopt-3.11.9-10.13.noarch.rpm (open the rpm file in 7zip, keep going deeper internally until you see a bin directory) but you’ll have to grab the dependencies separately. The dependency packages will be either in https://build.opensuse.org/project/show/home:kelman:mingw-coinor or https://build.opensuse.org/project/show/windows:mingw:win32 (or https://build.opensuse.org/project/show/windows:mingw:win64 for 64 bit).
-Tony
P.S: I like seeing multiple teams able to win, the Canadian GP and the last couple races have been very exciting to watch.
From: Guy Charles
Sent: Tuesday, September 02, 2014 9:08 AM
To: Tony Kelman ; ipopt at list.coin-or.org
Subject: RE: [Ipopt] Issues building dlls with MinGW / MSys
Tony,
Thanks again - this is easily getting beyond my comfort zone, so I appreciate the detailed help.
I don't get the errors using the additional configs: "coin_skip_warn_cflags=yes coin_skip_warn_cxxflags=yes", but I'm not sure that I'm necessarily getting to the end of the make process sucessfully. NB - still using the 3.11.9 source code without your last fixes, but I'm not compiling in HSL at the moment to keep things as simple as possible. No I'm not building 64 bit, but I potentially will be at a later date.
There are a number of dll files produced and scattered around the build/Ipopt directory:
\build\ThirdParty\ASL\.libs\libcoinasl-l.dll
\build\ThirdParty\Blas\.libs\libcoinblas-l.dll
\build\ThirdParty\Lapack\.libs\libcoinlapack-l.dll
\build\ThirdParty\Metis\.libs\libcoinmetis-l.dll
\build\ThirdParty\Mumps\.libs\libcoinmumps-l.dll
\build\Ipopt\src\Interfaces\.libs\libipopt-1.dll
\build\Ipopt\src\Apps\AmplSolver\.libs\libipoptamplinterface-1.dll
Are these all the dll files that get built? Should there be more, or more steps to collect them into one place so that "make test" works? make test complains that it can't find libipopt-1.dll, and I don't seem to be able to find a location to put this in to get the test to work.
There is only the ipopt.exe file produced in the build\bin folder.
Again, not my usual area of work so appreciating all the help. I'll try out a few more of the alternatives that you've suggested too.
cheers,
Guy
PS - Glad to hear you're an F1 fan - hope you're a Red Bull supporter!
______________________________________________________________________
This email has been scanned by the Symantec Email Security.cloud service.
For more information please visit http://www.symanteccloud.com
______________________________________________________________________
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://list.coin-or.org/pipermail/ipopt/attachments/20140902/807fb08d/attachment-0001.html>
More information about the Ipopt
mailing list