[PATCH weston sdk v2 1/8] weston.pc: Add dependencies for pixman-1 and xkbcommon

Quentin Glidic sardemff7+wayland at sardemff7.net
Fri Jul 5 11:14:43 PDT 2013


On 04/07/2013 22:20, Kristian Høgsberg wrote:
> On Thu, Jul 4, 2013 at 12:35 PM,  <sardemff7+wayland at sardemff7.net>
> wrote:
>> And they must link directly! That is the proper way to do that.
>> Providing API using these libraries does not mean forcing anyone to
>> use that. And using a library does require linking to it. Hiding
>> this dependency inside "libweston" is error-prone. I was going to
>> speak conditionally, but now it is the case so check that: A plugin
>> is using libxkbcommon for a feature, but provides several more.
>> Weston is build with libxkbcommon support. All is fine. Now, the
>> same plugin is build against a non-libxkbcommon Weston (this is
>> the now-possible case): it will break badly. Explicit usage is the
>> way. Period.
>
> And that's exactly why I want it to be plain Requires.  pixman isn't
> an implentation detail of weston, the pixman API is part of the
> weston plugin API.  When a module links to weston, it doesn't need
> to additionally use pkg-config to discover pixman libs and cflags,
> that should come from the weston.pc requirements.

And still, a plugin not using pixman will be forced to link to it, and
then break on soname bump. This is just wrong.
Also, if a plugin uses pixman it *must* link to it. But since *the 
plugin* uses it, it should definitely *not* be linked by some automagic 
flag provided by weston.


> As for the libxkbcommon case, direct linking wont help you if weston
> isn't compile with support for libxkbcommon, you need the
> functionality to be available in weston and weston to link
> libxkbcommon for any libxkbcommon use to make sense in a module.

My point is to provide rightly linked stuff. Making sense is not the 
linker’s job. If my plugin uses *only* weston libxkbcommon features, it 
will simply do nothing, but will not break. If it uses both libxkbcommon 
features and non-libxkbcommon ones, it will provide a subset of its 
features, but at least it will not entirely break.

-- 

Quentin “Sardem FF7” Glidic


More information about the wayland-devel mailing list