From root@hunahpu.sics.se  Sun Mar 26 19:20:20 2000
Return-Path: <root@hunahpu.sics.se>
Received: from hunahpu.sics.se (hunahpu.sics.se [193.10.66.220])
	by hub.freebsd.org (Postfix) with ESMTP id 46D4337BD5A
	for <FreeBSD-gnats-submit@freebsd.org>; Sun, 26 Mar 2000 19:20:16 -0800 (PST)
	(envelope-from root@hunahpu.sics.se)
Received: (from root@localhost)
	by hunahpu.sics.se (8.9.3/8.9.3) id FAA15213;
	Mon, 27 Mar 2000 05:20:00 +0200 (CEST)
	(envelope-from root)
Message-Id: <200003270320.FAA15213@hunahpu.sics.se>
Date: Mon, 27 Mar 2000 05:20:00 +0200 (CEST)
From: assar@stacken.kth.se
Sender: root@hunahpu.sics.se
To: FreeBSD-gnats-submit@freebsd.org
Cc: assar@stacken.kth.se
Subject: impossible to build FS KLD without kernel source
X-Send-Pr-Version: 3.2

>Number:         17613
>Category:       kern
>Synopsis:       impossible to build FS KLD without kernel source
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sun Mar 26 19:30:01 PST 2000
>Closed-Date:    Wed Jun 6 13:39:10 PDT 2001
>Last-Modified:  Wed Jun 06 13:39:25 PDT 2001
>Originator:     Assar
>Release:        FreeBSD 5.0-CURRENT i386
>Organization:
none
>Environment:

any

>Description:

It's not possible to build file system kernel modules without having
kernel source code.  This is because vnode_if.pl and vnode_if.src from
the source tree are required.

>How-To-Repeat:

Write a KLD implementing a file system.  Try to compile without kernel
source code.

>Fix:

apply the following patch to kern/Makefile and then make sure to check
in vnode_if.h

--- Makefile.orig	Mon Mar 27 05:13:58 2000
+++ Makefile	Mon Mar 27 05:17:07 2000
@@ -6,7 +6,7 @@
 ARCH=	i386 # luna68k news3400 pmax sparc tahoe vax
 
 all:
-	@echo "make tags, make links or init_sysent.c only"
+	@echo "make tags, make links, init_sysent.c, or vnode_if.h only"
 
 init_sysent.c syscalls.c ../sys/syscall.h ../sys/syscall-hide.h \
 ../sys/syscall.mk ../sys/sysproto.h: makesyscalls.sh syscalls.master
@@ -17,6 +17,10 @@
 	-mv -f ../sys/syscall.mk ../sys/syscall.mk.bak
 	-mv -f ../sys/sysproto.h ../sys/sysproto.h.bak
 	sh makesyscalls.sh syscalls.master
+
+../sys/vnode_if.h: vnode_if.pl vnode_if.src
+	perl vnode_if.pl -h vnode_if.src
+	mv vnode_if.h ../sys
 
 # Kernel tags:
 # Tags files are built in the top-level directory for each architecture,

>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: phk 
State-Changed-When: Wed Jun 6 13:39:10 PDT 2001 
State-Changed-Why:  
It is belived that this is not the direction we want to take. 

http://www.FreeBSD.org/cgi/query-pr.cgi?pr=17613 
>Unformatted:
