Fwd: Re: libxkbcommon compilation instructions

Peter Hutterer peter.hutterer at who-t.net
Tue May 27 22:52:26 PDT 2014


On Tue, May 27, 2014 at 03:36:39PM -0700, Bill Spitzak wrote:
> On 05/25/2014 11:08 PM, Pekka Paalanen wrote:
> >On Sun, 25 May 2014 13:41:08 -0700
> >Bill Spitzak <spitzak at gmail.com> wrote:
> >
> >>On 05/24/2014 12:45 AM, Pekka Paalanen wrote:
> >>>- --with-xkb-config-root should not be needed, xkeyboard-config
> >>>    instead is.
> >
> >xkeyboard-config is a package, that provides keyboard layout/keymapping
> >data files. Xorg and Xwayland needs it, and libxkbcommon needs it. In
> >Wayland everything using libxkbcommon needs it on desktop systems, that
> >means all apps.
> >
> >xkeyboard-config is the package that provides the
> >file /usr/share/X11/xkb/rules/evdev. You can easily see that by listing
> >all the files this package installed on your distribution.
> 
> Yes I have that file already installed.
> 
> It seems like this switch is intended to locate this evdev file in the
> global installation location, rather than in $WLD/share/X11. However it
> looks like that is the default behavior anyway. No matter how I compile
> libxkbcommon, weston requires the global evdev file to exist, and seems
> to ignore any placed in $WLD. Personally this feels wrong to me, though
> it is not causing any problems.
>
> However the XServer instructions require these lines to be run, and I
> checked and they are necessary. These seem to be redundantly producing
> the same effect of putting the evdev file in $WLD:
> 
> mkdir -p $WLD/share/X11/xkb/rules
> ln -s /usr/share/X11/xkb/rules/evdev $WLD/share/X11/xkb/rules/
> ln -s /usr/bin/xkbcomp $WLD/bin/
> 
> So the questions are:
> 
> 1. Is it a bug that libxkbcommon does not look in the --prefix directory
> for the evdev file?

The default behaviour is to ask xkeyboard-config where it installed the data
files. The switch is for if you want to override this yourself and _not_ use
that default behaviour.

If you want libxkbcommon to use the one in your prefix you can easily fix
this by installing xkeyboard-config in the same prefix and adjusting
PKG_CONFIG_PATH.

> 2. Conversely is it a bug that the xserver does do this?

The server behaviour simply predates the pkg-config file from
xkeyboard-config. So it defaults to look in $datadir which usually depends
on the prefix.

Neither behaviour is wrong or right, it really depends much on your
use-case. If I were to fix this, I'd say 1 is better than 2 but then again
there's arguments for both sides.
 
> 3. Even if #1 is a bug and is fixed, the symbolic links shown for the
> xserver are a better solution than the autogen switch, right?

tbh, symbolic links are almost never a good choice for fixing up build
issues. configure options are reproducible and don't rely on local state.

Cheers,
   Peter
 


More information about the wayland-devel mailing list