Re: Kernel Compilation problem

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Mar 13, 2002 at 07:42:58PM -0500, Narasimhamurthy Giridhar wrote:
> The include files for this are
> 
> #include<asm/uaccess.h>
> #include<sys/time.h>

<sys/time.h> is an include file provided by glibc (or your system C
library) -- it is not a kernel include file. Try <linux/time.h> instead.

> #include<linux/kernel.h>
> 
> This gives a lot of parse errors in uaccess.h and many files it includes
> like sched.h etc. .. errors like semicolon missing and } missing.

I think I've seen these errors mostly when a type definition is broken.
(either typedef or struct or union..)

> Before compiling, I made certain links :
> 
> /usr/include/asm a link to /usr/src/linux/include/asm
> 
> and /usr/include/linux a link to /usr/src/linux/include/linux.

Absolutely not. This was the norm for 1.2.x series kernels, and may have
been normal for 2.0.x kernels, but I think 2.2 (and most definately 2.4)
do not put includes in /usr/include/ -- /usr/include/ is used for user-
land programs, and is not to be used when compiling kernels. glibc
provides its own kernel headers in /usr/include/linux -- and
applications must be able to communicate with glibc, which does the
major work for communicating with the kernel.

Take a look at the example modules on kernelnewbies.org, as well as the
FAQ; these are explained pretty well there.

If you have access to a debian machine, install the kernel-package
package, and read /usr/share/doc/kernel-package/*eadme*eader  -- it is a
great description of the new setup.

Cheers!

-- 
UniNet InfoSec Conference   April 15-19   http://infosec.uninet.edu 

Attachment: pgp00045.pgp
Description: PGP signature


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux