[PATCH wayland-protocols] buildsystem: add missing uninstalled pkg-config infra

Emil Velikov emil.l.velikov at gmail.com
Tue Aug 30 15:57:27 UTC 2016


On 30 August 2016 at 15:27, Derek Foreman <derekf at osg.samsung.com> wrote:
> On 30/08/16 06:09 AM, Emil Velikov wrote:
>> Hi all,
>>
>> On 29 August 2016 at 20:23, Derek Foreman <derekf at osg.samsung.com> wrote:
>>> Hi Bryce,
>>>
>>> On 26/08/16 08:11 PM, Bryce Harrington wrote:
>>>> On Fri, Aug 26, 2016 at 06:06:43PM -0700, Bryce Harrington wrote:
>>>>> It is confusing terminology to call this 'uninstalled'; sounds like this
>>>>> might remove something from your system.  'non-installed' would be more
>>>>> accurate but isn't that great of a name either.
>>>>
>>>> Oh I see, this is pre-existing terminology in wayland.  Still not the
>>>> best terminology but given there's precident I suppose this should be
>>>> named consistently.
>>>
>>> It's actually a standard pkg-config convention.  if lala-uninstalled.pc
>>> and lala.pc are both visible to pkg-config it will pick the -uninstalled
>>> one first.
>>>
>>> It's for building/linking with uninstalled copies of libraries out of
>>> their build trees.
>>>
>> Having gone through the pkg-config documentation, I have some
>> questions on the topic:
>>
>> - How should one link/use 'uninstalled' version of package ?
>> cd wayland
>> cd build/wayland
>> ../../wayland/autogen.sh && make
>> export PKG_CONFIG_PATH=...
>> cd ../$projectA
>> ../../$projectA/autogen.sh && make
>
> Yup.  (You'll still need to set up LD_LIBRARY_PATH and PATH if you want
> to run the stuff from those dirs)
>
>> - Why would someone opt for such an approach ? I haven't seen such
>> workflow so far.
>
> gstreamer has scripts to automate that approach...
>
That's the core (only) place where I saw there .pc files, coincidence ? :-P

> Reynaldo's working on a patch for wayland-build-tools to add a script
> similar to one provided with gstreamer (gst-uninstalled).  We should be
> submitting that for review later today.
>
> You clone all the relevant repositories (wayland, wayland-protocols,
> libinput, weston) under lalaroot/whatever/
>
> setup the script (tell it the lalaroot location, and make a symlink to
> it called wl-whatever).  Now when you run wl-whatever it starts a new
> shell with LD_LIBRARY_PATH, PATH, and PKG_CONFIG_PATH set up so that you
> can compile against and run the projects uninstalled from that set of
> git working directories.
>
> The symlinks allow you to set up multiple directories under lalaroot
> (git, release, tags, etc...) and run the appropriate link to the script
> to test a different set of working directories.
>
> (obviously weston-launch will never be setuid when not running make install)
>
Guess I don't see the difference between installing things into custom
prefix vs the -uninstalled.pc. If anything the -uninstalled.pc setup
is further apart from a real world one.
Then again saving a few MiB and some seconds in development is also great.

>> - Considering the bug in the scanner -uninstalled file, plus the fact
>> that (almost?) all of X related packages don't have such files - is it
>> really that useful and/or used ?
>
> I'm honestly not sure if anyone uses this stuff right now.  I think the
> scanner error leads to wayland-scanner being used on $PATH instead of an
> outright build failure, so it may not be a clear indication that nobody
> is using this.  But it probably is :)
>
> I'd rather see them fixed (and added) than have the functionality
> removed completely - obviously my preference is skewed by the
> aforementioned script.
>
If the script does manage --prefix and has `make install' then neither
one of these should files be necessary. Then again I'll stop "bashing"
on the topic ;-)

>> - If wayland-client depends on say wayland-server, should one use
>> wayland-server or wayland-server-uninstalled in Required.private of
>> wayland-client ?
>
> As I understand it, you never directly reference an -uninstalled
> package.  pkg-config will just use it preferentially if it finds both
> foo.pc and foo-uninstalled.pc in its search path.  So you can have a set
> of distro packages for wayland installed on your system, but still link
> with and compile against the uninstalled versions in your git working
> directories.
>
Ack.

Thanks a bunch for answering my noobish questions on the topic :-)
Emil


More information about the wayland-devel mailing list