[PATCH weston] configure.ac: make use of wayland-scanner.pc

Bryce Harrington bryce at osg.samsung.com
Mon Feb 23 17:53:51 PST 2015


On Mon, Feb 23, 2015 at 11:11:36PM +0000, Emil Velikov wrote:
> On 23 February 2015 at 22:32, Bill Spitzak <spitzak at gmail.com> wrote:
> > wayland-scanner is built as part of "make" in wayland. However it is also
> > used to convert the xml descriptions to .c and .h files, which are also used
> > by "make".
> >
> > In some early versions of Wayland this would never work for a new user. It
> > would not find wayland-scanner and fail, so "make install" never worked and
> > you could not get things working without doing a manual step of copying the
> > wayland-scanner executable to the path.
> >
> > A big annoyance is that once you get wayland to install, this never happens
> > again, leading the developers to not notice if it breaks.
> >
> > A related annoyance is that editing the source for wayland scanner should
> > cause the .h/.C files to be regenerated using the new version and used to
> > compile the rest of wayland and weston. This can make it easy to not realize
> > a bug was introduced into wayland scanner.
> >
> So to sum it all up (see if I got it correct):
>  - Wayland (as opposed to weston) issue
>  - During a wayland build, there is a dependency of wayland-scanner.
>  - One can manually work around the problem by copying wayland-scanner.
>  - The dependencies are still not honoured and wayland-scanner never
> gets rebuild and/or reused(reinstalled).
> 
> I would assume that removing wayland{,-scanner} and tracking down the
> dependency sounds like a bit of a pain :-)

Shouldn't it be sufficient to just move wayland-scanner out of your path?

I deleted or moved aside all wayland-scanner binaries, so 'which
wayland-scanner' returned nothing.  Then 'make distclean' in my wayland
tree.  This should replicate Bill's wayland newbie's environment.

Now:

$ ./autogen.sh --prefix=$WLD 2>&1 | grep scanner
  config.status: creating src/wayland-scanner-uninstalled.pc
  config.status: creating src/wayland-scanner.pc

$ cat src/wayland-scanner-uninstalled.pc
  pkgdatadir=/home/bryce/build/Wayland/wayland
  wayland_scanner=/home/bryce/build/Wayland/wayland/src/wayland-scanner
 
  Name: Wayland Scanner
  Description: Wayland scanner (not installed)
  Version: 1.7.90

$ cat src/wayland-scanner.pc
  prefix=/home/bryce/build/Wayland/install
  exec_prefix=${prefix}
  datarootdir=${prefix}/share
  pkgdatadir=${datarootdir}/wayland
  wayland_scanner=${exec_prefix}/bin/wayland-scanner

  Name: Wayland Scanner
  Description: Wayland scanner
  Version: 1.7.90

$ which wayland-scanner

$ ls /usr/local/bin/*scanner*

$ make 2>&1 | grep wayland-scanner
  CCLD     wayland-scanner

$ make install 2>&1 | grep scanner
  /bin/bash ./libtool   --mode=install /usr/bin/install -c wayland-scanner '/home/bryce/build/Wayland/install/bin'
libtool: install: /usr/bin/install -c wayland-scanner /home/bryce/build/Wayland/install/bin/wayland-scanner
 /usr/bin/install -c -m 644 wayland-scanner.m4 '/home/bryce/build/Wayland/install/share/aclocal'
 /usr/bin/install -c -m 644 wayland-scanner.mk protocol/wayland.xml protocol/wayland.dtd '/home/bryce/build/Wayland/install/share/wayland'
 /usr/bin/install -c -m 644 src/wayland-client.pc src/wayland-server.pc src/wayland-scanner.pc cursor/wayland-cursor.pc '/home/bryce/build/Wayland/install/lib/pkgconfig'


So...  Everything appears to be hanging together just fine.  I'm
gathering that when wayland-scanner isn't found on the path it's using
the locally built binary instead?

> > My proposed test, with a --prefix to an install directory:
> >
> > 1. clear out the install directory
> > 2. make sure "wayland-scanner" does not exist on the machine
> > 3. go into wayland and type "make install"
> >
> > Another test I would like to do is:
> >
> > 1. Edit wayland-scanner to put an obvious typo into the .h file
> > 2. Run "make" and insure that it fails.
> >
> Sounds like you might want to have a OBS(-like) [1] solution which
> does a clean [2] build of wayland.

As it happens, I set such a thing up a few months back via Launchpad[3],
to create a daily-builds PPA for ubuntu[4].  During this time it's been
building successfully.

> No disrespect but isn't all this somewhat orthogonal to what I'm
> proposing/fixing, or did it just remind you of the problem ?

It's maybe a bit orthogonal but better to ask too many questions than
not enough.  Plus I wondered the same as Bill about it.
 
> Thanks for the comprehensive explanation Bill :-)
> Emil

Bryce
 
> [1] http://openbuildservice.org/
> [2] Create a VM/container with the bare dependencies, with which one
> builds the package.

[3] https://code.launchpad.net/~wayland.admin/+recipe/wayland-daily
[4] https://launchpad.net/~wayland.admin/+archive/ubuntu/daily-builds


More information about the wayland-devel mailing list