-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
fix external_project failing due to the drive letter in the path on Windows #13916
base: master
Are you sure you want to change the base?
fix external_project failing due to the drive letter in the path on Windows #13916
Conversation
fdc35d9
to
20a9be7
Compare
How do we know that all scripts for configuring an external project via --prefix etc. are necessarily running from cygwin? In comparison, we have existing functions for determining if meson is being run from a cygwin or msys2 environment. I suppose that it may be fairly rare for homebrewed build systems to exist and actual autoconf scripts won't run without some runtime environment similar to cygwin / msys2. How does a bare mingw install handle this? |
It does not necessarily need to be running on cygwin, as long as there is Initially I didn't think about other environment that provide So if we need to support such environments, maybe the path conversion should be done only when Edit: I've updated the code for this. |
482c609
to
699562d
Compare
bd1f2ea
to
2675d06
Compare
2675d06
to
d413795
Compare
I've pushed some additional fixes (see edited description), and now CI passed. |
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.
Some of these commits are missing explanations for why they are needed.
Using "added" for some commits and "fix" for others is inconsistent style ;) consistency would be "add / fix" or "added / fixed". Git style is to use imperative mood: https://cbea.ms/git-commit/#imperative
This comment was marked as resolved.
This comment was marked as resolved.
d413795
to
c579566
Compare
On Cygwin, MSYS2 and GitBash, the configure command should be converted to unix style path by cygpath command, because the colon in the drive letter breaks many configure scripts.
It is needed to run test case common/230 on windows.
This computation of prefix and rel_prefix was re-written in mesonbuild#13886 but it introduced another bug where the leading slash was missing. In addition drive root should have trailing slash, or it would use different path as base of relpath in some cases.
c579566
to
e5eeb77
Compare
@eli-schwartz Thanks for review! I fixed them all, so please check it again. |
closes #13699
On Windows, the windows-style configure command path (like
C:/path/to/configure
) seems to break many configure scripts because they treat the colon in the drive letter as path separator.Converting the configure command to unix-style path (like
/c/path/to/configure
) usingcygpath
command fixes the issue.cygpath
should be available on cygwin, msys2 and gitbash.Edit: this PR also includes fix for enabling test cases/common/230 external project on msys2. (related to #13895)
To enable this, I had to add
windows
and!windows
as platform value in test configuration.Edit: Also includes fix for a bug where the leading
/
in the prefix is missing on MinGW, which appears to be introduced in #13886.I'm new to contributing to meson. Please let me know if there are something I need to change.