[waffle] [PATCH 0/4] Remove link-time dependency of libwayland*

Emil Velikov emil.l.velikov at gmail.com
Tue Mar 3 08:30:20 PST 2015


On 26 February 2015 at 21:26, Chad Versace <chad.versace at intel.com> wrote:
> On 02/23/2015 12:32 PM, Emil Velikov wrote:
>> Hello list,
>>
>> Second to last part of removing all the window specific bits from
>> link-time to run-time (hail libdl).
>>
>> Note that the last patch looks a bit messy, mostly due to the wayland
>> design approach to have a handful of functions defined as static inlines
>> in the public header.
>>
>> This has been compiled tested only, as I don't have a wayland setup atm.
>> Will see if anyone volunteers over at #wayland (touch wood).
>
> I run Waffle's Wayland tests inside an X session. You can run Weston
> inside an X window.
>
> $ sudo yum install weston
> $ nohup weston &
> $ wflinfo -p wayland -a gles2
>
>>
>> As usual the series can be found at my github repo in branch
>> wip/no-libwayland.
>>
>> Comments, suggestions even moderate bike-shed is welcome.
>
> wl_display_connect() crashes with SIGSEGV. I suspect the problem
> is a symbol collision: a wl_display_connect symbol exists in
> libwaffle and in the dlopened libwayland-client. But I'm not
> confident in that guess.
>
> This patch series is crazy stuff :) Before it's complete
> and working, we'll probably learn a few things about linker magic.
>
> Maybe I should be building libwaffle with -Bsymbolic? Hmm....
>
I fear that -Bsymbolic does not cut it :'(

I've went ahead with another solution inspired by SDL. Admittedly it's
not pretty, but it does not violate the spec (like v1), plus it even
works - double-checked via your instructions above.

The whole things in a nutshell can be seen below:

$ cat wrapper.h

foo *
(*wrapper_wl_foo)(...);

#define wl_foo (*wrapper_wl_foo)

#include <wayland-foo.h>

We're nearly there :-)
-Emil


More information about the waffle mailing list