-
Notifications
You must be signed in to change notification settings - Fork 7.3k
gtk3: move Wayland support to default feature #49620
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
base: master
Are you sure you want to change the base?
Conversation
Make the Linux Wayland support a default feature instead of a hard dependency so that it can be disabled if wanted. Signed-off-by: Rafael Kitover <[email protected]>
|
Hm, that's strange: I specified to build gtk3 without default features, but it was still trying to build it with wayland:
Need to investigate whether this is an isue on my end or with the vcpkg port configuration itself... |
|
How did you try to install it without default features? The way to do that generally is to install |
|
@rkitover. I specify this in my config file: {
"name": "gtk3",
"default-features": false
}, |
|
I spoke with @AenBleidd about this over Discord. The reason he is seeing This is why our default answer is that by default things should not be default features ( https://learn.microsoft.com/vcpkg/contributing/maintainer-guide#default-features-should-enable-behaviors-not-apis ); people find turning the defaults off next to impossible in practice. #49571 retoractively added a dependency on |
|
Ok, so I will explain why I made this a default feature, and I will turn it off if you disagree.
You guys have a Discord? Can you give me a link? |
|
However, with this change you change the backend to Wayland, meaning that you are changing the behavior to all the users of the gtk3 port, and the majority of them might not even be aware about thus breaking change.
We usually speak in PM, so the link won't be helpful. |
To be clear there isn't anything meaningful that happened here, it was just going back and forth questions to arrive at "oh, the dependency came from wxwidgets". There was no kind of "policy" discussion or similar; normally I just get pinged that macOS is broken for some reason this way 😢 . |
This seems a good reason to make the change but then I'm not sure why it is a feature at all. (That is, |
|
I have a clean build with no system libraries. I build everything using vcpkg (including x11 libraries).
See detailes in the attached archive.
I do not have a list of distributions that actually ships Wayland and Wayland libraries. I maintain an application that should be able to run on very ancient OSs (I have a list though), but I have no idea how can I reliably test my application (or at least the availability of Wayland) on all of them. As for me, this is too risky to make this feature a defaule feature, expecially after we found out that there is no easy way to opt-out from using it. |
|
PR for the reference is anyone is interested: BOINC/boinc#6811 |
There is no change in behavior, the Wayland backend support does not affect running on X11. However, an app linked to the static GTK3 will still need to be dynamically linked to the Wayland libraries. So if you need to build a mostly static binary to run on some very old distribution without Wayland libraries, that would be a problem. But in that case you are likely to have other problems, like the version of glibc. |
I do not agree on that. if("wayland" IN_LIST FEATURES)
list(APPEND OPTIONS -Dwayland_backend=true)
else()
list(APPEND OPTIONS -Dwayland_backend=false)
endif()
No, if you bild everything statically (I do admit that even the static build might require some client support for application to run like the support of Wayland on the particular OS).
This is exactly my case.
No, if you build on the oldest OS you support (in my case this is Debian Buster, however I use it for the particular version of glibc to build with, and I do not know if all the other distributions that has this version of glibc support Wayland (and what is more important, have it installed)). |
There is no change in runtime behavior, nothing is broken.
It is not possible to make completely static binaries on Linux. Some libraries have to be linked dynamically. When people do this, things like X11 and Wayland generally fall into that category.
So you have an edge case that is broken by other ports, as opposed to the default port being broken for everyone who expects Wayland support, which is present in every current build of GTK3. @BillyONeal You decide this, I will remove the default feature if you want. |
I do have a GUI application that required X11 but have as much as possible built statically without direct dependencies. $ readelf -d $(which boincmgr) | grep NEEDED |
| }, | ||
| } | ||
| ], | ||
| "default-features": [ |
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.
As @AenBleidd has experienced, default features are hard to disable because every downstream consumer must specify default-features: false.
Given that, I think the cleanest solution here is to add the feature but not make it a default feature.
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.
Does that mean we should also effectively revert #49571 ?
Make the Linux Wayland support a default feature instead of a hard dependency so that it can be disabled if wanted.
./vcpkg x-add-version --alland committing the result.