From f1e6448c6062925420263aec43026640af13d030 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Tue, 21 Jul 2026 00:31:49 +0000 Subject: [PATCH] vboxguestdrivers: depend on virtual/libc for userspace mount utility do_compile failed building the userspace mount helper: mount.vboxsf.c:38:10: fatal error: errno.h: No such file or directory vbsfmount.c:36:10: fatal error: assert.h: No such file or directory The kernel modules build fine; only the userspace utility fails. This recipe inherits module, and module.bbclass sets INHIBIT_DEFAULT_DEPS=1 (kernel modules build -nostdinc and do not need libc). That suppresses BASE_DEFAULT_DEPS (virtual/cross-cc virtual/compilerlibs virtual/libc) and only re-adds virtual/cross-cc + virtual/cross-binutils, so the target libc headers and crt objects are never staged into recipe-sysroot. But this recipe also compiles an ordinary hosted userspace program (utils/mount.vboxsf), which needs libc. Add back virtual/compilerlibs and virtual/libc. Using the same virtual/* provider names OE lists in BASE_DEFAULT_DEPS keeps this correct across libc (glibc/musl) and toolchain (gcc/clang) choices. Verified errno.h is staged and mount.vboxsf compiles, links and is packaged into ${base_sbindir}. Signed-off-by: Khem Raj --- .../vboxguestdrivers/vboxguestdrivers_7.2.8.bb | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/meta-oe/recipes-support/vboxguestdrivers/vboxguestdrivers_7.2.8.bb b/meta-oe/recipes-support/vboxguestdrivers/vboxguestdrivers_7.2.8.bb index 6b6a2f23ff..de47bb0e5a 100644 --- a/meta-oe/recipes-support/vboxguestdrivers/vboxguestdrivers_7.2.8.bb +++ b/meta-oe/recipes-support/vboxguestdrivers/vboxguestdrivers_7.2.8.bb @@ -5,6 +5,14 @@ LICENSE = "GPL-3.0-only" LIC_FILES_CHKSUM = "file://${UNPACKDIR}/${VBOX_NAME}/COPYING;md5=217590d3a513571b94632edf5fa1169a" DEPENDS = "virtual/kernel" +# Besides the kernel modules, this recipe also builds a userspace utility +# (utils/mount.vboxsf). module.bbclass sets INHIBIT_DEFAULT_DEPS=1, which drops +# BASE_DEFAULT_DEPS ("virtual/cross-cc virtual/compilerlibs virtual/libc") and +# only re-adds virtual/cross-cc + virtual/cross-binutils. As a result the target +# libc headers/crt objects are never staged into recipe-sysroot, so the userspace +# compile fails with "errno.h: No such file or directory". Restore the libc and +# compiler-runtime deps needed to compile and link the userspace utility. +DEPENDS += "virtual/compilerlibs virtual/libc" inherit module kernel-module-split