-
Notifications
You must be signed in to change notification settings - Fork 988
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
Ensure meson's prefix is a valid absolute path #17206
Conversation
Thanks for your contribution! This PR is failing in Windows with:
It is possible that the |
Thanks for the logs! I don't think it's the \ vs / since the native files also use backslashes – and I was able to build inih (see our discussion in #17204) with this change. I will try to get the full test suite up and running on our build machine and see if I can reproduce and fix the issue. |
Probably not worth the effort. The full suite, specially the |
The path / is not considered an absolute path on Windows, failing with: ERROR: prefix value '/' must be an absolute path os.path.abspath ensures that "/" becomes a valid absolute path on all major platforms, resolving to "/" on Linux and macOS, and to "C:/" (or whichever filesystem is currently active, could be E:/ as well) on Windows. Closes conan-io#17204.
9ed628c
to
aaf9837
Compare
tl;dr:
Switching it to long read: Okay, that took longer than I expected. I had to change test\utils\tools.py as our mvsc has version 194 (in contrast to the default test version 191) and it took me a while to figure that out. Here's the result of the unmodified (except for the version as described above) develop2 branch with pip-installed meson:
I haven't checked yet why this particular test fails, maybe it's because I changed the compiler version locally and this assumes a specific hash? This is the (shortened) output with the choco-installed meson:
And the error is exactly what I observed initially:
With my fix, I can reproduce the error observed in the CI pipeline:
A related issue seems to be #14213 and the test there checks if the prefix is set correctly. It appears that particular test catches problematic backslashes in the prefix path, so I updated the code and added a |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Many thanks for your contribution @shoeffner
Checked that without this the test suite fails in Python 3.13.
We might need to add it to our CI, it seems that 3.13 is changing a few things that are breaking.
Lets merge this to include it in next Conan 2.9 asap
The path / is not considered an absolute path on Windows, failing with:
os.path.abspath ensures that "/" becomes a valid absolute path on all major platforms, resolving to "/" on Linux and macOS, and to "C:\" (or whichever filesystem is currently active, could be E:\ as well) on Windows.
Closes #17204.
Changelog: Fix: Use a valid prefix path for
meson.configure()
on Windows, to avoid failures in Python 3.13.Docs: Omit
develop
branch, documenting this one. -> No