Skip to content
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 build on Fedora37 #22

Merged
merged 2 commits into from
Jan 29, 2023
Merged

Fix build on Fedora37 #22

merged 2 commits into from
Jan 29, 2023

Conversation

edwintorok
Copy link

Fixes #21

Sodivad and others added 2 commits December 29, 2022 23:05
Fixes #5088

(cherry picked from commit e2ade2bfc46d915cd306c63c830b81d800b2575f)
When using shared linking (linking in the normal way with
-lwayland-client) rather than loading Wayland libraries dynamically at
runtime, listing symbols that don't exist in the current version results
in a build failure. We don't actually call wl_proxy_marshal_flags() or
wl_proxy_marshal_array_flags() directly; the reason we need them is
that they're called by the code generated by wayland-scanner >= 1.20.

If we're building against an older Wayland library, then we'll have its
corresponding version of wayland-scanner (mismatched versions are not
supported), so we won't need those two symbols, and can avoid generating
a dependency on them.

Conversely, if we're building against a newer Wayland library, the
generated code will call them unconditionally, so we cannot treat them as
optional and gracefully fall back: that would result in a crash. Instead,
treat them as a mandatory part of the Wayland library, so that if they
are not found at runtime, we can fall back to X11 without crashing.

libwayland 1.18 is in several LTS distributions (Ubuntu 20.04,
Debian 11, RHEL 8) so avoiding a hard dependency on 1.20 is quite
useful.

Signed-off-by: Simon McVittie <smcv@collabora.com>
Resolves: libsdl-org/SDL#5376
(cherry picked from commit d5bbbd3f7345eb55f84eb46bf89462a72c038644)
@edwintorok
Copy link
Author

Upgrading to a new SDL2 seems complicated because this repo and original SDL2 do not share history so git can't figure out how to merge it, so I've cherry-picked just the 2 commits related to the wayland fix and it at least builds now.

@edwintorok
Copy link
Author

Also related to revery-ui/revery#1094

@Et7f3
Copy link
Member

Et7f3 commented Jan 29, 2023

do not share history so git can't figure out how to merge it

Yeah that unfortunate you still have date time to know around which commit it is.

@Et7f3 Et7f3 merged commit 5f771c6 into revery-ui:master Jan 29, 2023
@Et7f3
Copy link
Member

Et7f3 commented Jan 29, 2023

Thanks for those I will try to update esy-sdl with git history so it is easier to track

@Et7f3
Copy link
Member

Et7f3 commented Jan 29, 2023

Oops I rebased and we don't see you are the committer 😓

@Et7f3
Copy link
Member

Et7f3 commented Jan 30, 2023

I began to reconcile the tree in this branch https://github.com/revery-ui/esy-sdl2/tree/git I haven't done history between 2.0.10 and 2.0.14. I will do another round to fix history between and will use it in revery.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Build fails with Wayland 1.20
4 participants