waffle-gl / waffle

A C library for selecting an OpenGL API and window system at runtime
https://waffle.freedesktop.org
BSD 2-Clause "Simplified" License
35 stars 16 forks source link

wayland: Add support for wayland-scanner 1.10 #39

Closed fooishbar closed 8 years ago

fooishbar commented 8 years ago

wayland-scanner 1.10 and above use a new symbol, wl_proxy_marshal_constructor_versioned, which also needs to be caught and redirected by the wrapper.

The implementation could be a bit better, by checking the version of wayland-scanner through pkg-config, but couldn't see a way to do that (cmake is completely alien to me, and I gave up on the documentation after some time).

Fixes waffle-gl/waffle#38.

evelikov commented 8 years ago

Almost, imho one should make the new symbol check non-fatal (patch [1]) - just like libSDL does [2]. Then again Jason feels that waffle must import/check-in some version of the generated header, which I don't agree is a good idea. Feel free to check out the discussion [3] and weight it.

[1] https://lists.freedesktop.org/archives/waffle/2016-April/001438.html [2] https://github.com/spurious/SDL-mirror/commit/737415012588a2636794292129a2d39f2a28fe3c [3] https://lists.freedesktop.org/archives/waffle/2016-April/001439.html

fooishbar commented 8 years ago

@evelikov Right, I agree on dlsym. Sounds good. Personally I'm not really convinced on importing the client header either, but I don't really have strong opinions on it. Just getting something merged so Waffle wasn't completely non-functional would be nice :\

evelikov commented 8 years ago

The issue should be fixed with commit cd38ab87009b84e587adc8e7dac4733b76af72cc Being short on access, can you please close this PR. Thanks !

evelikov commented 8 years ago

To conclude this: Chad resolved this with commit cd38ab87009b84e587adc8e7dac4733b76af72cc which makes the symbol non-optional.

Upon second thought this is the correct thing, since wl_registry_bind API is baked into the waffle binary (the API itself does not have a fallback and mandates the new symbol) thus we cannot "opt" for the older codepath/symbol.

Which in itself means that at runtime the version cannot be lower than the one at build-time... something that distros get right, (nearly) all the time.