From owner-freebsd-questions@FreeBSD.ORG Sun Feb 1 07:21:52 2004 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B4F4116A4CE for ; Sun, 1 Feb 2004 07:21:52 -0800 (PST) Received: from einhorn.in-berlin.de (einhorn.in-berlin.de [192.109.42.8]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0AEDE43D2D for ; Sun, 1 Feb 2004 07:21:49 -0800 (PST) (envelope-from stefan@binarchy.net) X-Envelope-From: stefan@binarchy.net X-Envelope-To: Received: from dice.wg.net (pD9E83FD7.dip.t-dialin.net [217.232.63.215]) i11FLlXD000429 for ; Sun, 1 Feb 2004 16:21:47 +0100 Received: by dice.wg.net (sSMTP sendmail emulation); Sun, 1 Feb 2004 16:29:28 +0100 Date: Sun, 1 Feb 2004 16:29:28 +0100 From: stefan@binarchy.net To: freebsd-questions@freebsd.org Message-ID: <20040201152928.GA4242@dice.wg.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.4i X-Scanned-By: MIMEDefang 2.38 Subject: trying to compile my kernel module... X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Feb 2004 15:21:52 -0000 Today I started to write a sound driver kernel module. All have yet is a skeleton, and I cannot get it to compile. I am building the module in my home directory. I set up my Makefile as described in the developer handbook: SRCS=mykmod.c KMOD=mykmod .include When I run make however, I get this error (the output is from make depend): rm -f .depend mkdep -f .depend -a -nostdinc -D_KERNEL -DKLD_MODULE -I- -I. -I@ -I@/dev -I/usr/include mymod.c In file included from @/dev/sound/pcm/sound.h:54, from mymod.c:29: @/sys/bus.h:381:23: device_if.h: No such file or directory @/sys/bus.h:382:20: bus_if.h: No such file or directory In file included from @/dev/sound/pcm/sound.h:98, from mymod.c:29: @/dev/sound/pcm/channel.h:69:24: channel_if.h: No such file or directory In file included from mymod.c:30: @/dev/sound/pcm/ac97.h:90:21: ac97_if.h: No such file or directory In file included from mymod.c:33: @/dev/pci/pcivar.h:156:20: pci_if.h: No such file or directory mkdep: compile failed *** Error code 1 Stop in /usr/home/stsp/mymod. The headers are not present in the @ tree, but there are a couple of *.m files with the same basenames. The handbook says that such files were interface templates and should be processed by a perl script called something like makeobjops.pl. I am using the 5.1 release, and I cannot find makeobjops.pl on my system. Could it be that the developer handbook is only referring to FreeBSD 4.x? Compiling a custom kernel works fine though, the headers are properly generated. Am I missing something obvious? regards stefan