[PATCH wayland v2 3/4] wayland-util: build/ship as separate shared library

Pekka Paalanen ppaalanen at gmail.com
Fri Mar 17 13:32:58 UTC 2017

On Fri, 17 Mar 2017 12:07:45 +0000
Emil Velikov <emil.l.velikov at gmail.com> wrote:

> On 17 March 2017 at 11:10, Pekka Paalanen <ppaalanen at gmail.com> wrote:
> > On Thu, 16 Mar 2017 15:32:46 +0000
> > Emil Velikov <emil.l.velikov at gmail.com> wrote:
> >  
> >> On 16 March 2017 at 12:40, Pekka Paalanen <ppaalanen at gmail.com> wrote:  

> >> > Hi,
> >> >
> >> > since I have so much trouble making my mind on this patch, how about a
> >> > silly counter-proposal?
> >> >
> >> > Let's squash libwayland-server.so and libwayland-client.so into a
> >> > single libwayland.so.
> >> >
> >> > That would take care of the duplicate exported symbols issue not just
> >> > for the util functions, but also for the exported variables produced by
> >> > wayland-scanner. Since we have many programs (libEGL!) that necessarily
> >> > already link to both, there cannot be problems from linking to
> >> > everything always.
> >> >
> >> > We would still need to install dummy libwayland-server.so and
> >> > libwayland-client.so just for pulling in libwayland.so, but that's no
> >> > worse than Emil's proposition.
> >> >
> >> > Whether we have the existing .pc files telling to link to server/client
> >> > or just libwayland.so would be up for debate. I'm not suggesting to
> >> > merge the .pc files.
> >> >
> >> > libwayland-server.so and libwayland-client.so have exactly the same set
> >> > of dependencies.
> >> >
> >> > Any downsides to this approach vs. doing nothing vs. Emil's
> >> > libwayland-{client,server,util}.so?

> How exactly do you see libwayland.so relative to the client/server one
>  - which provides what symbols, etc.
>  - are the client/server DSOs - symlinks/other ?

This is how I imagined it:

- libwayland.so contains all the code, and exports both server and
  client symbols.

- libwayland-server.so and libwayland-client.so are normal DSOs that
  export essentially no symbols, they only depend on libwayland.so and
  cause it to be loaded.

In other words, you proposed to move util functions into a third
library. I proposed to move everything into a third library.

One thing now coming to my mind is this. With your
https://github.com/evelikov/wl_link_test experiments, did you try the
1. build and install old wayland
2. build link test
3. build and install your patched wayland
4. run link test (do not rebuild)

The point here is that the application executable nor library does not
have libwayland-util.so as NEEDED themselves. Still, they need to
continue working fine.

Then there is the case of dlopen()'ing these libraries. I think there
might be something unexpected to expect because we have this:
introduced in commit 97f2952b.

Does that mean that if someone writes a plugin for his app, and that
plugin uses wl_list, your patch would require them to at least rebuild
the plugin?

ISTR libSDL dlopen()'s libwayland-client.so which is a slightly
different case again.

The case where one does rebuild the application is what you at least
tested, as I understand.

> > Indeed, that's what I need: Reviewed-by's and Acked-by's from people
> > with proper reputation.
> >
> > Just like for any patch really, the strength of reviews needs to
> > reflect the impact of the patch.
> >  
> How about we do something like Daniel ?
>  - he pointed out some possible flaws
>  - I dismissed those and provided a simple test case to justify my claim
> If every 'issue' is refuted, shout for X weeks slap an Ack and let us
> carry on with out lives ?

I do not see Daniel's Reviewed-by's or Acked-by's on this revision of
this patch, nor the earlier one.

I will not give my R-b or A-b for this patch, because I don't feel
qualified. The same goes for my counter-proposal, too. The
counter-proposal would need your R-b and someone else's A-b as well.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <https://lists.freedesktop.org/archives/wayland-devel/attachments/20170317/3e799b7f/attachment-0001.sig>

More information about the wayland-devel mailing list