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
Extend the Curses dependency to use config tools and hand rolled search #7757
Conversation
|
There's also a zlib fix in here, I can split that out if others prefer. |
f9de21b
to
ef5cf66
Compare
|
Hmmmm, not sure why msys fails while everything else succeeds. |
|
I have access to a couple of systems, will mark off when tested:
|
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.
LGTM, minus typos already pointed out.
|
Also, hope msys2/mingw to be tested. |
|
@dcbaker do you have time to update the pull request? |
|
Yes, I have the comments addressed locally, in just trying to get an msys environment set up to figure out why that's failing |
maybe I can help the msys environment, I've already steup it. |
didn't found this header |
|
Hi, I've found the cause of the msys2 error: The ncursesw6-config are showing the msys2 style path, but pkg-config ncursesw --cflags showing the windows style path, and the mingw/gcc compiler just recoginize the windows sytle path, didn't recognize the msys2 style path, so we should return the windows style path instead. |
|
also, lack of pdcurses detection on msys2 |
|
I didn't fixes the reviews for your pull reqeust, I create that just used to verify if the CI passed |
|
@lazka I'm not sure what to do about the config-tool thing. Is there someway for us to patch up the path so that it works correctly? |
ef5cf66
to
e8982e9
Compare
No problem, I found my pull request still have problem, and I know why, on msys2/mingw when the curses are detect by system |
|
Not that I've seen macos, linux, freebsd, and openindiana all just work. |
Yeap, mingw maybe a differen things, but from qemu, there must some platform need the include |
|
I see why things goes wrong So we have no need to disable CursesConfigToolDependency on windows |
I've filed msys2/MINGW-packages#7025 |
I've fixes it consistence with pkg-config in pull request #7773 |
I assume fixing it doesn't hurt though? I've done so in msys2/MINGW-packages#7026 |
Not hurt:), just a bit boring, every package need consider that |
|
@dcbaker I've updated #7773 (comment) and fixes all compiling issues under win32, please have a look and cherry-pick it |
|
How does this tie in with #7773 then? Should both of them be merged or only one? If one, which one? |
|
What I think I'd like to do, is just work around the windows issue for now and merge this, then we'll take the msys issues @lygstate is trying to fix one at a time in a separate MR. does that sound reasonable? The big difference between them is that 7773 is trying to fix a bunch of msys issues as well (that break using this dependency) |
look for (in order): ncursesw, ncurses, curses.
These are mostly duplicated with pkg-config, but maybe someone has one but not another, and they're easy to turn on with the ConfigToolDependency.
has_header returns a tuple of (found: bool, cached: bool), so `if has_header` will always return true because the tuple is non-empty. We need to check if the found value is true or not.
That calls find_library and has_header in conjunction to look for curses implementations that are baked into the system without any other find method.
This is mostly important for the system dependency where we need to roll the version check ourselves.
On win32 there is pdcurses, so we detect it first, because python depends on ncursesw, so if we don't want to use ncursesw, we should make sure pdcurses detect before ncursesw
… windows with msys ncurses-config returns a unix style path (currently, though it's been fixed upstream), which the compilers don't understand, so we can't do that. Additionally, while the system search does work, there's missing include directories that need to be added.
e8982e9
to
a310677
Compare
reasonable |
|
Okay, I've gone ahead and merged this, let me go take a closer look at 7773 now. |
Like many other classic unix libraries curses is a portability pain, there's a bunch of slightly different implementations, that are found different ways. Meson already provides abstractions for making other widely available but not always easy to find libraries easier to use.
This adds all of the methods, and is tested on linux. I can test it on illumos/OpenIndiana and FreeBSD later if needed.
This doesn't resolve the fact that users will likely need to know which header they should
#include. But that's a bigger change to dependencies.Fixes #7693