I just deleted libvirt from the dependencies and guestfs-tools built just fine and I was able to run virt-sparsify without any issue. Looks like guestfs-tools should have a libvirt USE flag just like libguestfs already does. Reproducible: Always
Forgot to mention, I don't have libvirt installed: $ emerge -s app-emulation/libvirt guestfs-tools [ Results for search key : app-emulation/libvirt ] Searching... * app-emulation/libvirt Latest version available: 9.6.0 Latest version installed: [ Not Installed ] Size of files: 9,066 KiB Homepage: https://www.libvirt.org/ https://gitlab.com/libvirt/libvirt/ Description: C toolkit to manipulate virtual machines License: LGPL-2.1 * app-emulation/libvirt-glib Latest version available: 4.0.0 Latest version installed: [ Not Installed ] Size of files: 159 KiB Homepage: https://libvirt.org/ https://gitlab.com/libvirt/libvirt-glib/ Description: GLib and GObject mappings for libvirt License: LGPL-2.1+ * app-emulation/libvirt-snmp [ Masked ] Latest version available: 0.0.4 Latest version installed: [ Not Installed ] Size of files: 155 KiB Homepage: https://wiki.libvirt.org/Libvirt-snmp.html Description: Provides SNMP functionality for libvirt License: GPL-2 [ Applications found : 3 ] [ Results for search key : guestfs-tools ] Searching... * app-emulation/guestfs-tools Latest version available: 1.48.2 Latest version installed: 1.48.2 Size of files: 12,394 KiB Homepage: https://libguestfs.org/ Description: Tools for accessing, inspecting, and modifying virtual machine (VM) disk images License: GPL-2 LGPL-2 [ Applications found : 1 ]