-
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
[feature request] enable usage on pkg-config on MSYS2 (Windows) #3653
Comments
Do you run meson with mingw Python or the cygwin one? If the mingw one you need to install the mingw pkg-config: |
What's the return value of Like @lazka said, |
Hi all, actually I was using the pkg-config from msys but I tried using the one from mingw64 as suggested and I have the same problem as before. Now, with the package from mingw64, I get from python3's shutil the following:
and from the bash shell:
and still Meson obstinately refuse to use it! :-) Here the output:
In addition I may mention that I installed Meson from msys using python's pip installer. |
Which python3 are you using? The same story as pkg-config is also for python3. Also MSYS2 ships with meson, so you don't need to use pip. |
Python 3.6.2 from msys. I am just realizing now that meson is available as a msys2 package. I tried the meson install with pacman and now it works, thank you! Yet I am wondering if there isn't something that should be fixed anyway because the pip install was otherwise working and it is legitimate to install meson using pip. |
I'm guessing that you are using I used I'm going to put a warning about that in meson. |
This mistake seems to be a very common hiccup for people trying to use Meson with MSYS2 on Windows from git or with pip. msys/python uses POSIX paths with '/' as the root instead of a drive like `C:/`, and also does not identify the platform as Windows. This means that configure checks will be wrong, and many build tools will be unable to parse the paths that are returned by functions in Python such as shutil.which. Closes #3653
This mistake seems to be a very common hiccup for people trying to use Meson with MSYS2 on Windows from git or with pip. msys/python uses POSIX paths with '/' as the root instead of a drive like `C:/`, and also does not identify the platform as Windows. This means that configure checks will be wrong, and many build tools will be unable to parse the paths that are returned by functions in Python such as shutil.which. Closes #3653
This mistake seems to be a very common hiccup for people trying to use Meson with MSYS2 on Windows from git or with pip. msys/python uses POSIX paths with '/' as the root instead of a drive like `C:/`, and also does not identify the platform as Windows. This means that configure checks will be wrong, and many build tools will be unable to parse the paths that are returned by functions in Python such as shutil.which. Closes #3653
This mistake seems to be a very common hiccup for people trying to use Meson with MSYS2 on Windows from git or with pip. msys/python uses POSIX paths with '/' as the root instead of a drive like `C:/`, and also does not identify the platform as Windows. This means that configure checks will be wrong, and many build tools will be unable to parse the paths that are returned by functions in Python such as shutil.which. Closes #3653
Ok, got it, thank you very much for looking at that and for the good work you are doing on Meson. |
This mistake seems to be a very common hiccup for people trying to use Meson with MSYS2 on Windows from git or with pip. msys/python uses POSIX paths with '/' as the root instead of a drive like `C:/`, and also does not identify the platform as Windows. This means that configure checks will be wrong, and many build tools will be unable to parse the paths that are returned by functions in Python such as shutil.which. Closes mesonbuild#3653
Please amend this patch to detect where meson is installed before issuing that error. If meson is installed in |
The point is that MSYS Python is completely broken for a build system's purposes, so it should never be used. If MSYS2 is shipping meson in its non-mingw distribution, that's wrong and it should stop doing that. |
How would you propose to build |
I don't know, how is |
It's built just fine. The only thing i had to patch out of meson to make it work on MSYS-MSYS2 is the After i patched that out, meson worked just fine, and i was able to compile msys2-glib (naturally, i had to also build msys2-ninja), and the only patches that needed were the ones that Cygwin applies anyway. No idea what you mean by |
I can't check right now because MSYS2 completely broke for me at some point (refuses to update saying I'd be happy to review and merge a PR that disables the error when |
The incompatibility also comes from other MSYS2 tools like |
msys/python in MSYS2 pretends to be cygwin in all cases for some time now, so this check was impossible to hit. The underlying confusion it tried to prevent is still there, namely trying to build with mingw but wrongly using a msys/cygwin python/meson. We can use the MSYSTEM env var to detect if we are in a mingw shell, and in case the Python doesn't match we suggest installing mingw variants of both python and meson. Using msys/python + meson in a MSYS environment works fine on the other hand, so no need to error out in that case. Fixes mesonbuild#8726 Also addresses the concern raised in mesonbuild#3653 (comment)
msys/python in MSYS2 pretends to be cygwin in all cases for some time now, so this check was impossible to hit. The underlying confusion it tried to prevent is still there, namely trying to build with mingw but wrongly using a msys/cygwin python/meson. We can use the MSYSTEM env var to detect if we are in a mingw shell, and in case the Python doesn't match we suggest installing mingw variants of both python and meson. Using msys/python + meson in a MSYS environment works fine on the other hand, so no need to error out in that case. Fixes #8726 Also addresses the concern raised in #3653 (comment)
Hi all,
I stumbled on a problem using meson on q MSYS2 system. On this system one can use unix-like path like /usr/lib on the MSYS2 bash shell.
If you install pkg-config using pacman, the standard packaging system, you gen a functional pkg-config. The problem arise when you invoke Meson and what happens is that Meson is not able to recognize and use the MSYS2-provided pkg-config.
By doing some investigations the problem seems to be the path:
Otherwise the pkg-config is a native windows executable that can be ran without any problem.
I did some investigations and I think that Meson is confused by the fact that pkg-config is located in /usr/bin and this is not a Windows-like PATH.
So the paradox is that you have a working pkg-config from your shell, it is a native windows executable, but Meson is unable to use it.
I confess that I don't what could be the best approach to fix this problem but I use and I like very much Meson so I would love to have this case, usage inside MSYS2 bash, fixed.
Thank you in advance for any help.
Francesco
The text was updated successfully, but these errors were encountered: