-
Notifications
You must be signed in to change notification settings - Fork 842
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support running in existing MSYS2 installation #377
Comments
One possible solution here is: have stack detect if something like |
Come to think of it, there could be at least three mingw installations in play: the one packaged with GHC, the one packaged with Git/Stack, and the user's version installed with MSYS2. Are they all compatible? Are they interchangeable? Which one should be in the environment? Detecting |
MinGW and msys are two different beasts. At least in everything I've done in MinGHC and stack, we never override the MinGW provided by GHC, as wonky things can happen (AFAIU at least). stack doesn't actually require Git, it just uses it if available, so not adding it in wouldn't break anything. Alternatively, PortableGit provides the git command in a different directory from all other executables, so we could selectively include one or the other directory. |
We seem to have stalled on this. @conklech do you have any feedback on my last point? |
@snoyberg Unfortunately I don't have much feedback on that post. I suppose the best route for progress would be to determine where the pkg-config errors in the original post actually come from; it might be a narrower problem than we've assumed, and unrelated to having parallel MSYS installations or otherwise easily fixable. Interestingly, the presence of the pkg-config tool itself changes the error message given. Without it, this happens:
Installing pkg-config ( So the installed |
What's the output for |
(For the record, it's
There's some path mangling going on:
They're the same file; |
I should have included the contents of the environment variable:
|
OK, I do think that having an option to skip the local MSYS and use your existing one will solve the problem. I'm implementing this now. Could you test master once I push this? |
Err, hold on a sec. Per this msys2 bug report, I should be using the package With that package, things seem to work fine from Possibly NOTABUG. |
Heh, that's interesting. Nonetheless, I see value in offering the ability to not use a custom MSYS, so I'll continue with the (almost complete) implementation. |
Fine by me; and yes, I'll test once you push it. |
Pushed, but completely untested by me. Caveat emptor (though I'll build it on Windows myself now). |
(Should have mentioned: try |
Any other things to try? |
I don't think so. Thanks for confirming, closing this issue. |
Would it be possible to configure stack to default to 'skip-msys' ? |
@conklech, the removal of |
@conklech Spent a whole night on this and it turns out using |
The great virtue of MSYS2 on Windows is that we now have access to a real package manager for C dependencies. Binary packages are available for recent versions of GTK, webkit, and many other useful packages that have historically been difficult or impossible to install on Windows.
It would be great if building a package that uses
gtk
from a clean Windows system were as simple as:Right now this doesn't work; the gtk2hs builders complain that the pkg-config packages glib, cairo, etc. aren't available. Is this because Stack redirects paths to its built-in git+MSYS2 installation?
(I'd be glad to provide logs, more information, etc.; I don't know how much of this is a known limitation and I don't want to dump details unnecessarily.)
The text was updated successfully, but these errors were encountered: