-
Notifications
You must be signed in to change notification settings - Fork 843
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
MSYS paths incorrectly recognized as relative on Windows #1989
Comments
Yeah, seems like a good thing to fix. I suppose it'd be done by munging the paths when invoking Cabal configure. PRs appreciated! :) |
Are there any good workarounds in the meanwhile? Other than passing |
I don't know if this matches what you're doing @unhammer but I eventually discovered that the Also see #2547 in case that might apply to what you're doing since it mentions the extra steps I had to figure out to make this setup work. |
In our case, the problem is kind of the other way around. I have |
I am not certain this is a manifestation of the same problem, but it also seems to involve
|
On Windows, I'd like to use Unix-style paths, which reference directories inside the Stack-installed MSYS2 environment, for library and include directories. My tests below were on Windows 7 64-bit with 32-bit Stack.
Steps to reproduce
Clone https://github.com/mtolly/stack-msys. The important parts are, in
stack.yaml
,And in
stack-msys.cabal
:The
base64-bytestring
is not important -- it can be any other package, but for whatever reason the problem only shows up when you have at least one dependency that needs to be compiled beforehand. (So, if you don't see the problem becausebase64-bytestring
is already compiled, try either changing it to some other package, or deleting the precompiled one from your%AppData%/stack/snapshots
folder.)Expected:
The directories, by virtue of starting with
/
, are recognized as Unix absolute paths and so are located relative to the Stack-local MSYS2 installation; for example mine would beC:\Users\Mike\AppData\Local\Programs\stack\i386-windows\msys2-20150512\<dir starts here>
.The directory may not exist; this should be ignored with just a warning, not a fatal error. Specifically my end goal here is to have this in my
stack.yaml
:Actual:
This is from, inside
cmd.exe
, runningstack exec bash
, so apologies for the hard wrapping.Note that the two warnings about the dirs not existing are false, since they do exist.
Here is the verbose output.
This problem does not occur if, instead of specifying the dirs in
stack.yaml
, I pass them on the command line withstack build --extra-lib-dirs=/mingw32/lib --extra-include-dirs=/mingw32/include
. I suspect this is just because the MSYS shell is converting them to Windows paths before Stack even sees them, but it's possible Stack could be treating them differently as well.The text was updated successfully, but these errors were encountered: