On 14 April 2016 at 09:23, Michel Dänzer <mic...@daenzer.net> wrote: > From: Michel Dänzer <michel.daen...@amd.com> > > Fixes build failure due to wl_proxy_marshal_constructor_versioned being > unresolved when building against current wayland. > > This API was introduced in wayland 1.9.91 by commit 557032e3 ("Track > protocol object versions inside wl_proxy."). The waffle code doesn't > reference wl_proxy_marshal_constructor_versioned directly but > indirectly via wayland-scanner. > > v2: > * Add paragraph about how wl_proxy_marshal_constructor_versioned was > introduced. (Emil Velikov) > * Only resolve wl_proxy_marshal_constructor_versioned with wayland >= > 1.9.91. > > Signed-off-by: Michel Dänzer <michel.daen...@amd.com> > --- > src/waffle/wayland/wayland_wrapper.c | 5 +++++ > src/waffle/wayland/wayland_wrapper.h | 8 ++++++++ > 2 files changed, 13 insertions(+) > > diff --git a/src/waffle/wayland/wayland_wrapper.c > b/src/waffle/wayland/wayland_wrapper.c > index 6ffd5a9..fb66f9a 100644 > --- a/src/waffle/wayland/wayland_wrapper.c > +++ b/src/waffle/wayland/wayland_wrapper.c > @@ -106,6 +106,11 @@ wayland_wrapper_init(void) > RETRIEVE_WL_CLIENT_SYMBOL(wl_proxy_add_listener); > RETRIEVE_WL_CLIENT_SYMBOL(wl_proxy_marshal); > RETRIEVE_WL_CLIENT_SYMBOL(wl_proxy_marshal_constructor); > +#if WAYLAND_VERSION_MAJOR == 1 && \ > + (WAYLAND_VERSION_MINOR > 9 || \ > + (WAYLAND_VERSION_MINOR == 9 && WAYLAND_VERSION_MICRO >= 91)) > + RETRIEVE_WL_CLIENT_SYMBOL(wl_proxy_marshal_constructor_versioned); > +#endif > #undef RETRIEVE_WL_CLIENT_SYMBOL > I am slightly worried about this approach. It adds a so called 'hidden dependency' and with it a possibility of things going horribly wrong. It is something that we try to avoid with mesa as the deps version at build time != run-time one. Or in other words, one might build against wayland 1.9 and things will go crazy as you run wayland 1.10, or vice versa.
Obviously that's not perfect, although unavoidable. Why ? As distros do not know about the requirement (i.e. it's not mandated at configure time) they won't rebuild and things won't work. At the same time if they do rebuild (again without the explicit requirement), things will break if one needs to revert to older (yet still in version range as per the deps list) wayland. TL;DR: The situation is quite sensitive and fragile. The only robust solutions that I can think of are: a) non-fatal (only for newer symbols) dlsym or b) bumping the req. version at configure time. -Emil _______________________________________________ waffle mailing list email@example.com https://lists.freedesktop.org/mailman/listinfo/waffle