Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 759604 - app-emulation/qemu-5.2.0 - xkbcommon: ERROR: Couldn't find file "rules/evdev" in include paths
Summary: app-emulation/qemu-5.2.0 - xkbcommon: ERROR: Couldn't find file "rules/evdev"...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Matthias Maier
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-12-12 13:52 UTC by Ben Kohler
Modified: 2020-12-12 23:53 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
build.log (build.log,115.80 KB, text/x-log)
2020-12-12 13:52 UTC, Ben Kohler
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ben Kohler gentoo-dev 2020-12-12 13:52:39 UTC
Created attachment 678181 [details]
build.log

I don't know if it's just my USE combo or if it's unconditionally required, but on my headless server w/ qemu (and no X or X libraries, generally speaking) I am getting a build failure when xkeyboard-config isn't installed.  Problem goes away after installing x11-misc/xkeyboard-config which provides the missing ruiles/evdev file.  Here are my USE flags:

[ebuild     U  ] app-emulation/qemu-5.2.0::gentoo [5.1.0-r3::gentoo] USE="aio bzip2 caps doc fdt filecaps jpeg ncurses nls oss png seccomp slirp spice vhost-net vnc xattr xkb -accessibility -alsa -capstone -curl -debug -glusterfs -gnutls -gtk -infiniband -io-uring -iscsi -jack -jemalloc -lzo -multipath -nfs -numa -opengl -pin-upstream-blobs -plugins -pulseaudio -python -rbd -sasl -sdl -sdl-image (-selinux) -smartcard -snappy -ssh -static -static-user -systemtap -test -usb -usbredir -vde -vhost-user-fs -virgl -virtfs -vte -xen -xfs -zstd" PYTHON_TARGETS="python3_8 -python3_6 -python3_7 -python3_9" QEMU_SOFTMMU_TARGETS="i386 x86_64 -aarch64 -alpha -arm -avr -cris -hppa -lm32 -m68k -microblaze -microblazeel -mips -mips64 -mips64el -mipsel -moxie -nios2 -or1k -ppc -ppc64 -riscv32 -riscv64 -rx -s390x -sh4 -sh4eb -sparc -sparc64 -tricore -unicore32 -xtensa -xtensaeb" QEMU_USER_TARGETS="-aarch64 -aarch64_be -alpha -arm -armeb -cris -hppa -i386 -m68k -microblaze -microblazeel -mips -mips64 -mips64el -mipsel -mipsn32 -mipsn32el -nios2 -or1k -ppc -ppc64 -ppc64abi32 -ppc64le -riscv32 -riscv64 -s390x -sh4 -sh4eb -sparc -sparc32plus -sparc64 -tilegx -x86_64 -xtensa -xtensaeb" 0 KiB


And here is a build log snippet:

[1515/2384] /usr/bin/qemu-keymap -f pc-bios/keymaps/ar -l ar
FAILED: pc-bios/keymaps/ar
/usr/bin/qemu-keymap -f pc-bios/keymaps/ar -l ar
xkbcommon: ERROR: Couldn't find file "rules/evdev" in include paths
xkbcommon: ERROR: 1 include paths searched:
xkbcommon: ERROR:       /usr/share/X11/xkb
xkbcommon: ERROR: 3 include paths could not be added:
xkbcommon: ERROR:       /var/tmp/portage/app-emulation/qemu-5.2.0/homedir/.config/xkb
xkbcommon: ERROR:       /var/tmp/portage/app-emulation/qemu-5.2.0/homedir/.xkb
xkbcommon: ERROR:       /etc/xkb
xkbcommon: ERROR: Couldn't look up rules 'evdev', model 'pc105', layout 'ar', variant '(null)', options '(null)'
Comment 1 Ionen Wolkens gentoo-dev 2020-12-12 18:16:18 UTC
See also bug 759361 comment #3
Comment 2 Sergei Trofimovich (RETIRED) gentoo-dev 2020-12-12 19:55:47 UTC
(In reply to Ben Kohler from comment #0)
> Created attachment 678181 [details]
> build.log
> 
> I don't know if it's just my USE combo or if it's unconditionally required,
> but on my headless server w/ qemu (and no X or X libraries, generally
> speaking) I am getting a build failure when xkeyboard-config isn't
> installed.  Problem goes away after installing x11-misc/xkeyboard-config
> which provides the missing ruiles/evdev file.  Here are my USE flags:
> 
> [ebuild     U  ] app-emulation/qemu-5.2.0::gentoo [5.1.0-r3::gentoo]
> USE="aio bzip2 caps doc fdt filecaps jpeg ncurses nls oss png seccomp slirp
> spice vhost-net vnc xattr xkb -accessibility -alsa -capstone -curl -debug
> -glusterfs -gnutls -gtk -infiniband -io-uring -iscsi -jack -jemalloc -lzo
> -multipath -nfs -numa -opengl -pin-upstream-blobs -plugins -pulseaudio
> -python -rbd -sasl -sdl -sdl-image (-selinux) -smartcard -snappy -ssh
> -static -static-user -systemtap -test -usb -usbredir -vde -vhost-user-fs
> -virgl -virtfs -vte -xen -xfs -zstd" PYTHON_TARGETS="python3_8 -python3_6
> -python3_7 -python3_9" QEMU_SOFTMMU_TARGETS="i386 x86_64 -aarch64 -alpha
> -arm -avr -cris -hppa -lm32 -m68k -microblaze -microblazeel -mips -mips64
> -mips64el -mipsel -moxie -nios2 -or1k -ppc -ppc64 -riscv32 -riscv64 -rx
> -s390x -sh4 -sh4eb -sparc -sparc64 -tricore -unicore32 -xtensa -xtensaeb"
> QEMU_USER_TARGETS="-aarch64 -aarch64_be -alpha -arm -armeb -cris -hppa -i386
> -m68k -microblaze -microblazeel -mips -mips64 -mips64el -mipsel -mipsn32
> -mipsn32el -nios2 -or1k -ppc -ppc64 -ppc64abi32 -ppc64le -riscv32 -riscv64
> -s390x -sh4 -sh4eb -sparc -sparc32plus -sparc64 -tilegx -x86_64 -xtensa
> -xtensaeb" 0 KiB
> 
> 
> And here is a build log snippet:
> 
> [1515/2384] /usr/bin/qemu-keymap -f pc-bios/keymaps/ar -l ar
> FAILED: pc-bios/keymaps/ar
> /usr/bin/qemu-keymap -f pc-bios/keymaps/ar -l ar
> xkbcommon: ERROR: Couldn't find file "rules/evdev" in include paths
> xkbcommon: ERROR: 1 include paths searched:
> xkbcommon: ERROR:       /usr/share/X11/xkb
> xkbcommon: ERROR: 3 include paths could not be added:
> xkbcommon: ERROR:      
> /var/tmp/portage/app-emulation/qemu-5.2.0/homedir/.config/xkb
> xkbcommon: ERROR:      
> /var/tmp/portage/app-emulation/qemu-5.2.0/homedir/.xkb
> xkbcommon: ERROR:       /etc/xkb
> xkbcommon: ERROR: Couldn't look up rules 'evdev', model 'pc105', layout
> 'ar', variant '(null)', options '(null)'

Calling /usr/bin/qemu-keymap instead of local copy is probably a bug in qemu's build system. I guess /usr/bin/qemu-keymap does not work if it's for older qemu (but i'm not sure yet where rules/evdev path comes from.

As a wild experiment: if you move away /usr/bin/qemu-keymap for a period of emerge will it fail or succeed for you?
Comment 3 Sergei Trofimovich (RETIRED) gentoo-dev 2020-12-12 22:14:36 UTC
Staring at meson.build I think x11-libs/libxkbcommon is only used to re-generate keymaps. Otherwise existing prebuilt keymaps are used.

Missing rules/evdev sounds like a bug in x11-libs/libxkbcommon dependency itself, but it makes things a bit complex across RDEPEND/BDEPEND to express it correctly as a dep. I suggest disabling keymap re-generation entirely.
Comment 4 Larry the Git Cow gentoo-dev 2020-12-12 23:53:15 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1cc25abb2720fce0fdfaa38e1e3f5b39a4dcf895

commit 1cc25abb2720fce0fdfaa38e1e3f5b39a4dcf895
Author:     Sergei Trofimovich <slyfox@gentoo.org>
AuthorDate: 2020-12-12 23:30:03 +0000
Commit:     Sergei Trofimovich <slyfox@gentoo.org>
CommitDate: 2020-12-12 23:53:12 +0000

    app-emulation/qemu: drop USE=xkb, use prebuilt keymaps
    
    USE=xkb re-generates qemu keymaps instead of already prebuilt ones.
    It has a few problems:
    - present /usr/bin/qemu-keymaps is preferred over locally built one
    - /usr/bin/qemu-keymaps can't be ran on a system without
      x11-misc/xkeyboard-config
    
    Let's rely on prebuilt keymaps.
    
    Reported-by: Ben Kohler
    Closes: https://bugs.gentoo.org/759604
    Package-Manager: Portage-3.0.12, Repoman-3.0.2
    Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>

 .../qemu/files/qemu-5.2.0-disable-keymap.patch     | 25 ++++++++++++++++++++++
 app-emulation/qemu/qemu-5.2.0.ebuild               |  7 +++---
 app-emulation/qemu/qemu-9999.ebuild                |  6 +++---
 3 files changed, 32 insertions(+), 6 deletions(-)