gtk3: move Wayland support to default feature#49620
Conversation
|
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 |
|
@ras0219-msft @MahmoudGSaleh @vicroms @AugP and I discussed this today. Our understanding is that over time wayland usage will effectively replace X11 at some point, so this ends up being a judgement call on when that has happened. If Wayland and X11 behave like "alternatives" in gtk, we must do exactly as #49571 did: features can't be alternatives so that would foreclose on making it a feature at all. However, the discussion in #49571 (comment) suggests that they don't behave like alternatives. If it is a feature, then under https://learn.microsoft.com/vcpkg/contributing/maintainer-guide#default-features-should-enable-behaviors-not-apis it cannot be a default feature. |
|
Apologies for being absent, I was in the hospital again. So at some point we will need to clean up all of these ports to make Wayland support default dependencies, with an option to disable this with a custom triplet variable. In the meantime, I will remove the default feature here. |
Make the Linux Wayland support a feature instead of a hard dependency due to current issues with other ports and the needs of some users to disable it. Signed-off-by: Rafael Kitover <rkitover@gmail.com>
b2e397f to
390fddf
Compare
|
Default feature has been removed in this PR. |
|
For issues like this, I was thinking it would also be nice if we could have a config file for vcpkg to set global features, like Gentoo has |
|
@rkitover, this is possible to do through the feature testing: https://github.com/microsoft/vcpkg/blob/master/scripts/ci.feature.baseline.txt |
:( Hope things work out for ya
That only affects our testing of the registry, it does not affect "ordinary vcpkg customers" |
BillyONeal
left a comment
There was a problem hiding this comment.
Thanks for working with us and sorry we had to be inflexible on this point
|
Thank you for the update. Now this port with the defaulte features works perfectly fine. |
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.