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

Bryce Harrington bryce at osg.samsung.com
Tue Aug 30 18:31:30 UTC 2016


On Tue, Aug 30, 2016 at 09:27:25AM -0500, Derek Foreman 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...
> 
> 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)
> 
> > - 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 suspect that bit fixes an actual bug.  I recall I think on 14.04 that
the system wayland-scanner was incompatible with current, so building
weston git on such a system would not work without first ensuring
wayland-scanner was somehow available to the build system.  For which
there's various ways to solve it, but I gather that this proposed change
would fix it somewhat more transparently to the user.  At the least, it
might provide an additional option, and having options is good.

> I'd rather see them fixed (and added) than have the functionality
> removed completely - obviously my preference is skewed by the
> aforementioned script.
> 
> > - 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.
> 
> Thanks,
> Derek
> > 
> > Thanks
> > Emil
> > 

Bryce


More information about the wayland-devel mailing list