Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 759361 - app-emulation/qemu-5.2.0: automagic libudev dependency
Summary: app-emulation/qemu-5.2.0: automagic libudev dependency
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-10 15:41 UTC by David Michael
Modified: 2020-12-12 16:46 UTC (History)
3 users (show)

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


Attachments
udev.patch (0001-app-emulation-qemu-fix-automagic-libudev-dependency.patch,2.94 KB, patch)
2020-12-12 16:22 UTC, David Michael
Details | Diff
xkb.patch (0002-app-emulation-qemu-fix-building-with-USE-xkb.patch,1.57 KB, patch)
2020-12-12 16:23 UTC, David Michael
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description David Michael 2020-12-10 15:41:48 UTC
There is a configure/meson feature option to toggle libudev support.  I was trying to build a static QEMU binary, which detected libudev on the system then failed to link because it didn't have a static version.

Reproducible: Always

Steps to Reproduce:
1. emerge -v =app-emulation/qemu-5.2.0

Actual Results:  
/usr/lib/gcc/x86_64-pc-linux-gnu/9.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: cannot find -ludev
collect2: error: ld returned 1 exit status

Expected Results:  
It should build successfully like the previous version.

Maybe add a flag so I can disable it:

--- app-emulation/qemu/qemu-5.2.0.ebuild
+++ app-emulation/qemu/qemu-5.2.0.ebuild
@@ -41,7 +41,7 @@
 	ncurses nfs nls numa opengl +oss +pin-upstream-blobs
 	plugins +png pulseaudio python rbd sasl +seccomp sdl sdl-image selinux
 	+slirp
-	smartcard snappy spice ssh static static-user systemtap test usb
+	smartcard snappy spice ssh static static-user systemtap test udev usb
 	usbredir vde +vhost-net vhost-user-fs virgl virtfs +vnc vte xattr xen
 	xfs +xkb zstd"
 
@@ -159,6 +159,7 @@
 		>=app-emulation/spice-0.12.0[static-libs(+)]
 	)
 	ssh? ( >=net-libs/libssh-0.8.6[static-libs(+)] )
+	udev? ( virtual/libudev[static-libs(+)] )
 	usb? ( >=virtual/libusb-1-r2[static-libs(+)] )
 	usbredir? ( >=sys-apps/usbredir-0.6[static-libs(+)] )
 	vde? ( net-misc/vde[static-libs(+)] )
@@ -495,6 +496,7 @@
 		$(conf_notuser snappy)
 		$(conf_notuser spice)
 		$(conf_notuser ssh libssh)
+		$(conf_notuser udev libudev)
 		$(conf_notuser usb libusb)
 		$(conf_notuser usbredir usb-redir)
 		$(conf_notuser vde)
Comment 1 David Michael 2020-12-10 16:49:50 UTC
And just FYI, these might be sources of other automagic dependencies:

# find /var/tmp/portage/app-emulation/qemu-5.2.0 -name meson-log.txt -exec grep -hoe '-D[^ ]*=auto' {} + | sort -u 
-Dcocoa=auto
-Dhax=auto
-Dhvf=auto
-Diconv=auto
-Dmalloc_trim=auto
-Dsparse=auto
-Du2f=auto
-Dvhost_user_blk_server=auto
-Dvirtiofsd=auto
-Dwhpx=auto
Comment 2 David Michael 2020-12-12 16:22:32 UTC
Created attachment 678190 [details, diff]
udev.patch
Comment 3 David Michael 2020-12-12 16:23:00 UTC
Created attachment 678193 [details, diff]
xkb.patch

Have another fix.

[201/2194] /usr/bin/qemu-keymap -f pc-bios/keymaps/bepo -l fr -v dvorak
FAILED: pc-bios/keymaps/bepo 
/usr/bin/qemu-keymap -f pc-bios/keymaps/bepo -l fr -v dvorak
xkbcommon: ERROR: failed to add default include path /usr/share/X11/xkb
[202/2194] /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: failed to add default include path /usr/share/X11/xkb
[203/2194] /usr/bin/qemu-keymap -f pc-bios/keymaps/cz -l cz
FAILED: pc-bios/keymaps/cz 
/usr/bin/qemu-keymap -f pc-bios/keymaps/cz -l cz
xkbcommon: ERROR: failed to add default include path /usr/share/X11/xkb
[204/2194] /usr/bin/qemu-keymap -f pc-bios/keymaps/da -l dk
FAILED: pc-bios/keymaps/da 
/usr/bin/qemu-keymap -f pc-bios/keymaps/da -l dk
xkbcommon: ERROR: failed to add default include path /usr/share/X11/xkb
Comment 4 Larry the Git Cow gentoo-dev 2020-12-12 16:46:33 UTC
The bug has been closed via the following commit(s):

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

commit da4f59ea277972c2829a7f1a480e000c324814b5
Author:     David Michael <fedora.dm0@gmail.com>
AuthorDate: 2020-12-12 16:19:59 +0000
Commit:     Sergei Trofimovich <slyfox@gentoo.org>
CommitDate: 2020-12-12 16:46:30 +0000

    app-emulation/qemu: fix automagic libudev dependency
    
    Closes: https://bugs.gentoo.org/759361
    Package-Manager: Portage-3.0.9, Repoman-3.0.2
    Signed-off-by: David Michael <fedora.dm0@gmail.com>
    Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>

 app-emulation/qemu/qemu-5.2.0.ebuild | 4 +++-
 app-emulation/qemu/qemu-9999.ebuild  | 4 +++-
 2 files changed, 6 insertions(+), 2 deletions(-)