Date: Sat, 16 May 2026 22:31:18 +0300 From: Konstantin Belousov <kostikbel@gmail.com> To: Dag-Erling =?utf-8?B?U23DuHJncmF2?= <des@freebsd.org> Cc: Thierry Thomas <thierry@freebsd.org>, freebsd-current@freebsd.org Subject: Re: vnode_if.h not found / make buildkernel on FreeBSD/HEAD-16 Message-ID: <agjGBp_ePLPaG7FT@kib.kiev.ua> In-Reply-To: <86y0hjb2ii.fsf@ltc.des.dev> References: <agioK8Xavc91VxwG@alien> <86y0hjb2ii.fsf@ltc.des.dev>
index | next in thread | previous in thread | raw e-mail
On Sat, May 16, 2026 at 09:03:33PM +0200, Dag-Erling Smørgrav wrote:
> Thierry Thomas <thierry@freebsd.org> writes:
> > When building a kernel for -CURRENT, with fresh source from today at
> > 2574974648c68c738aec3ff96644d888d7913a37, it fails with this error:
> > [...]
> > In file included from /usr/src/sys/amd64/amd64/genassym.c:49:
> > In file included from /usr/src/sys/sys/mount.h:965:
> > /usr/src/sys/sys/vnode.h:612:10: fatal error: 'vnode_if.h' file not found
> > 612 | #include "vnode_if.h"
> > | ^~~~~~~~~~~~
> > 1 error generated.
> > *** Error code 1
>
> kib's 1d5e4020e36e added #include <sys/vnode.h>, which in turn includes
> "vnode_if.h" to sys/mount.h. This shouldn't be a problem as the kernel
> build system knows how to generate vnode_if.h, but apparently it doesn't
> realize that this is needed (genassym is a build tool, so it is compiled
> very early). Presumably this was a clean build?
I do not see why sys/mount.h is needed by genassym.c.
commit fe0f116bd3a5115813c4c3ba4a1546d09b5e73b1
Author: Konstantin Belousov <kib@FreeBSD.org>
Date: Sat May 16 22:27:40 2026 +0300
x86: remove sys/mount.h from genassym.c
The header is not needed, and causes some issues with build because it
requires vnode_if.h generated due to transient dependency from vnode.h.
While there, remove unneeded explicit sys/cdefs.h and sys/param.h usage.
Fixes: 1d5e4020e36e1cc9e906200c9c3c784ef43d977e
diff --git a/sys/amd64/amd64/genassym.c b/sys/amd64/amd64/genassym.c
index 2716784ee871..875c536166d1 100644
--- a/sys/amd64/amd64/genassym.c
+++ b/sys/amd64/amd64/genassym.c
@@ -32,11 +32,9 @@
* SUCH DAMAGE.
*/
-#include <sys/cdefs.h>
#include "opt_hwpmc_hooks.h"
#include "opt_kstack_pages.h"
-#include <sys/param.h>
#include <sys/systm.h>
#include <sys/assym.h>
#include <sys/bio.h>
@@ -46,7 +44,6 @@
#include <sys/pmckern.h>
#endif
#include <sys/errno.h>
-#include <sys/mount.h>
#include <sys/mutex.h>
#include <sys/socket.h>
#include <sys/resourcevar.h>
diff --git a/sys/i386/i386/genassym.c b/sys/i386/i386/genassym.c
index d4d80fbb38ac..1a31f6b3428c 100644
--- a/sys/i386/i386/genassym.c
+++ b/sys/i386/i386/genassym.c
@@ -32,12 +32,10 @@
* SUCH DAMAGE.
*/
-#include <sys/cdefs.h>
#include "opt_apic.h"
#include "opt_hwpmc_hooks.h"
#include "opt_kstack_pages.h"
-#include <sys/param.h>
#include <sys/systm.h>
#include <sys/assym.h>
#include <sys/bio.h>
@@ -47,7 +45,6 @@
#endif
#include <sys/proc.h>
#include <sys/errno.h>
-#include <sys/mount.h>
#include <sys/mutex.h>
#include <sys/socket.h>
#include <sys/resourcevar.h>
home |
help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?agjGBp_ePLPaG7FT>
