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
[bug] unix_path() uses WSL path flavor on Windows #8883
Comments
Hi @srnwk I am afraid I don't understand the issue completely, I would need a bit more of context:
|
Sorry, choose the cmake generator for example, unix_path() is being called by the xapian-core recipe in this case: https://github.com/conan-io/conan-center-index/blob/master/recipes/xapian-core/all/conanfile.py#L147 As for the expected behavior - I wouldn't expect |
Ok, thanks, now it is clear. I have been able to reproduce it. This is very unfortunate, the detection is being done with I have no idea how this could be fixed, seems challenging without breaking, lets investigate a bit further:
|
If you are running in WSL you will have a number of environment variables set like |
|
I see, good point. I think the My biggest concern is that this is too messy and fragile at this moment, so it is very likely that changing anything there will be breaking to many people, even if we are apparently fixing some bugs. |
unfortunately, I don't see a safe and easy way to fix it without breakage. probably, declaring explicit |
Stumbled on the same problem then I tried to build the Interesting is that the a Note that I also found #8161, which seems to be about the same issue. |
Thanks for the feedback @lieser Yes, it might be an issue of path priorities, because The whole management of the |
I appear to be also hit by this. I am unable to build autoconf, as the added /mnt/ fails the package test. I disabled the test, but then automake also fails because it sets the environment variable wrong. I'd be happy with any kind of workaround at this point |
I'm not sure if the change fixed it; since I still have the same issue in 1.50.0 |
Hi @robindegen This issue was closed by the introduction of a new mechanism, defining |
I'm still having issues like this when trying to build autoconf and automake to start using swig. I'm still investigating deeper where exactly it is going wrong. From what I currently understand it seems to already go wrong in the autoconf package. That one builds just fine with the proper msys paths, but then it sets all the environment vars (using tools.unix_path) like "AUTOCONF" to /mnt/. And then when building automake it ofcourse uses those environment variables to find the autoconf executable. I tried modifying the conanfiles to use win_bash=True and removing the parameter in the affected packages. |
If you are talking about the |
When
conans.client.tools.win.unix_path()
is called and the path_flavor is left to be determined automatically,it will call OSInfo.detect_windows_subsystem().
When this happens on a Windows 10 system with WSL installed, this will find C:\Windows\System32\bash.exe,
run
uname -a
inside WSL and identify the subsystem as WSL, and choose the WSL path flavor.Example of the generated conanbuildinfo.txt:
This also makes
conan install
run slower than it needs to when it has to wait for WSL startup before misidentifying the subsystem.Environment Details (include every applicable attribute)
Steps to reproduce (Include if Applicable)
conan install xapian-core/1.4.16
The text was updated successfully, but these errors were encountered: