Build error due to Clp linking (windows,mingw64) #11
I'm interested in evaluating this software as emergency/open-source MICQP solver (potentially replacing automatic-differentiation based internals). In regards to my potential use-case, i'm focusing on a mingw-64-based windows build now. Not having binary-releases available maybe indicates all that trouble.
I'm pretty positive, that i solved the preparation of Cbc + Ipopt for now (the tests do). Building SHOT however does not work for me.
I modified some cmake-based scripts (in a rather hacky way) for my case as it will fail to find Cbc + Ipopt otherwise:
cmake was then started with:
(mumps may be missing due to my recent experiments; i'm pretty sure i was there on my first approach)
invoking make then results eventually in:
This is only a partial output, as further experiments (see comment about mumps above) induced more linking errors, probably because i forgot to prepare Mumps (so this one should be ignored for now):
Above further experiments are building Cbc/Clp
Maybe these lines:
are a potential source of trouble.
I'm wondering, why the coinbrew-based installs of Cbc never had those linking errors, which SHOT has.
Not being an expert in regards to any of these build-tools, it's hard to tell how to proceed. As i see it, mingw64 only provides a microsoft-based MPI implementation
I'm afraid, that there is a limited amount of people trying to build this software for windows yet, and probably even less reading this opened issue. Maybe @svigerske has tried a windows-based install?
But maybe this problem also translates to Linux? I should try a linux-based install later (although this one is also not much fun due to the experimental::filesystem thingy which excludes vanilla Uubuntu-LTS -> SHOT really asks for a very modern build-system; but well; that is fine as i'm only using VirtualBox-based Linux instances).
Has anyone a hint? How did people succeed in compiling SHOT? I suppose, coinbrew will play a role for most (in regards to dependencies).
Thanks for reading!
The text was updated successfully, but these errors were encountered:
Seems that Clp was build with use of Mumps, but the Mumps library (
I would think that clp.pc in
Not sure, what went wrong there, as i was sure Mumps was valid within the coinbrew toolchain.
Sadly, now i'm getting
which points to the Dual ABI stuff
At the moment, i'm not sure where this comes from, as:
Not sure, where somewhat got compiled with different ABI settings and why (how is it even possible: i'm using gcc version 9.2.0 (Rev2, Built by MSYS2 project)).
Enough for today :-/
Still won't do, despite many attempts in regards to
coinbrew itself feels very chaotic as in a small change in building-decisions (to fix the negative result) seems to lead to completely different build-paths (what worked last time won't do now, need to continue changing things) when trying to install multiple projects (e.g. cbc + ipopt).
So i wasn't successful but will close the ticket, as the described problem is not there anymore + the remaining problems seem to be more about CoinOR builds and potentially Mingw64-related specifics, not necessarily SHOT-related.
Without knowing exactly what went wrong with above, i essentially tried it with a fresh mingw64 install and also did two changes to my workflow. For anyone looking at SHOT + Windows (mingw64), i essentially did:
Setup MSYS2 + mingw64
Prepare dependencies: cbc + ipopt
workflow change (1): instead of messing up sequential building of cbc and ipopt, we can use the fact, that bonmin and SHOT share some similarities, especially their dependencies: both will need cbc + ipopt (without commercials) and not much more (in an asymmetric fashion). Assuming building and installing bonmin:
workflow change (2): we really make sure to use the new ABI (Dual ABI). Not sure, why it should not be used, but better safe then sorry.
Help SHOT finding ipopt: replace path in
Help SHOT finding cbc: replace path in
Finally, it will look like:
(Very) partial output:
Hello, I am following these steps to try to compile SHOT on windows using mingw64, everything is fine until
You should use the switches
Do you need to compile SHOT for Windows for some special reason, or could you just use the binaries available here: https://github.com/coin-or/SHOT/releases? These have Cbc and Ipopt included so no need to compile these separately.
Thanks for the heads up with the new release on windows. I am just wondering is there a example on how to use the binary files to pass in evaluation constrains, etc in a more programmatic way (API callback) instead of use any .nl or .osil file to store the information?
@AllenShi666 As you noticed, I answered you by mail, but I will include similar information here as well in case somebody else is interested.
You can provide the optimization problem either as a file (.nl/.osil) or as a SHOT problem object (https://github.com/coin-or/SHOT/blob/master/src/Model/Problem.h). For examples, you can have a look at https://github.com/coin-or/SHOT/blob/master/test/ModelTest.cpp, where simple models are created programmatically. There is however thus far no example of solving a problem created, but I will add this in the coming days. For reference, I created an issue on this on GitHub (#79).
So in short, yes, you can create a model using the API (and this is more or less how the GAMS integration is implemented), but unfortunately it is not well documented at the moment.
Using this example code you can create a problem instance directly and then solve the problem using SHOT. Let me know if you need any further assistance.
I almost am succeeding in compiling SHOT... but can I ask how can I handle this error?
I got this error after I ran commands
on MSYS2 MinGW x64. I am trying to compile it on Windows 10 64bit.