-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Meson incorrectly detects MinGW environment when running under MSYS2 #12772
Comments
/cc @lazka |
mesonmain.py:253
The actual value of $MSYSTEM in my shell is
Likely related info here: https://www.msys2.org/news/#2022-10-29-changing-the-default-environment-from-mingw64-to-ucrt64. Although - assuming I'm not misunderstanding the intent of this completely - it might be altogether better to just pass the paths through pathlib, which can fix them to match the msdos/unix-ness of the system, rather than dumping out with an error if there's a flavor mismatch - IF the only issue with mingw and paths was the one sited near that line (#3635). In any case, testing locally with that change seems OK so far (no pkg-config or python path errors)... |
The detection is still correct, every non-MSYS environment is a "mingw" environment. The thing that is out of date is the error message suggesting "mingw-w64-x86_64-python3" which installs it for MINGW64, but with UCRT64 you need "mingw-w64-ucrt-x86_64-python" instead. Maybe instead of the package names we could point to https://packages.msys2.org/base/mingw-w64-python ? |
Suggested by @lazka in order to be clearer when delineating between mingw-w64-x86_64-python and mingw-w64-ucrt-x86_64-python. Fixes: mesonbuild#12772
On a fresh install of MSYS2, in the default MSYS2 shell, after running
pacman -S meson
, meson emits the error:The shell is not in the MinGW environment, it is MSYS2. If we are meant to use the mingw python when running meson under MSYS2, the error message should be changed to make sense for that case and also there needs to be some way to get a working python/meson into the MSYS2 environments (the recommended install command installs into the mingw environment, which I am not using.)
If on the other hand meson is incorrectly detecting the mingw environment present, that also needs a fix.
In short: meson should run properly after some set of install commands when run as 'meson' - this is breaking many builds on MSYS2.
I understand that this project does not have control over the MSYS2 repository, but it is meson that is exiting in error and giving a non-functional workaround here.
Finally, if running meson under the MSYS2 shell is not supported in any way is not supported and we need to use the mingw shell, that also needs to be made explicit and the error message changed.
The text was updated successfully, but these errors were encountered: