-
Notifications
You must be signed in to change notification settings - Fork 792
build: support building with GTK compiled without x11-backend #3477
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
Comments
This file is required for compilation but we don't use it at runtime if Wayland is used. We could introduce a build option to not complete the X11 support at all but I'm not sure if it's worth it... still I've tagged this to look into it. |
We also hit this issue in Gentoo packaging, as GTK 4 can be built without X. https://bugs.gentoo.org/947032 |
Thanks for the additional data point. I'd like to fix this. |
I tried fixing this one time, but I don't understand Zig's C support enough to fix it. If this was a C project, I would have it done, but I'm still new to Zig. Very interested to see what solutions can be come up with! |
We need to introduce a build option that we then use to avoid ever referencing the |
Possible fix for #3477. Needs testing.
This should be fixed on main with #3748. I'd appreciate any confirmation, it should happen automatically now. |
I tried to build from master (c8950d3):: zig build -fsys=simdutf -Dtarget=native -Doptimize=ReleaseFast -Dpie -Dgtk-x11=false -Dgtk-adwaita=false and it works, thank you! |
Also confirmed on a pure-Wayland Gentoo chroot. |
As a follow-up to #3477 and #3748, this eliminates the use of dlopen to access `libX11` functions by directly linking `libX11` if X11 is enabled. This should also fix problems with systems like NixOS and Void Linux that have reported problems using Ghostty on X11 when using the distribution packages.
Build environment: Fedora 41, gtk4 package compiled with x11-backend option disabled.
I tried to build the package with:
zig build -fsys=simdutf -Dtarget=native -Doptimize=ReleaseFast -Dpie
but it fails with the following errors:
Is there a plan to support "pure" Wayland GTK backend? Or am I missing something?
The text was updated successfully, but these errors were encountered: