Re: help needed- compilation issue

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

 



Thanks every body ,
Now the make problem has been solved but a new problem has been emerged


gcc -c -O2 -DMODULE -D__KERNEL__  -W -Wall -Wstrict-prototypes
-Wmissing-prototypes -isystem /lib/modules/'uname -r'/build/include   -c
-o hello-1.o hello-1.c
In file included from /usr/include/linux/module.h:10,
                 from hello-1.c:1:
/usr/include/linux/config.h:5:2: error: #error Incorrectly using glibc
headers for a kernel module
hello-1.c: In function ‘module_init’:
hello-1.c:6: warning: implicit declaration of function ‘printk’
hello-1.c: At top level:
hello-1.c:15: warning: no previous prototype for ‘cleanup_module’
hello-1.c: In function ‘cleanup_module’:
hello-1.c:16: error: ‘KERN_ALERT’ undeclared (first use in this
function)
hello-1.c:16: error: (Each undeclared identifier is reported only once
hello-1.c:16: error: for each function it appears in.)
hello-1.c:16: error: syntax error before string constant
make: *** [hello-1.o] Error 1

i tried to search in google but could get the exact solution

Iam using FC4 , kernel 2.6.11-1.1369_FC4.

Any help will be highly appreciated.

Thanks
Gowri



On Mon, 2006-02-20 at 13:25 +0100, Arjan van de Ven wrote:
> > 
> > TARGET  := hello−1
> > WARN    := −W −Wall −Wstrict−prototypes −Wmissing−prototypes
> > INCLUDE := −isystem /lib/modules/`uname −r`/build/include
> > CFLAGS  := −O2 −DMODULE −D__KERNEL__ ${WARN} ${INCLUDE}
> > CC      := gcc−3.0
> > ${TARGET}.o: ${TARGET}.c
> > .PHONY: clean
> > clean:
> >     rm −rf ${TARGET}.o
> > 
> 
> your makefile is highly broken!
> 
> http://marc.theaimsgroup.com/?l=linux-ia64&m=105676403229397&w=2
> 
> has a description of what you need to do, it's a lot simpler for sure
> than what you have, and a lot less fragile too.
> 


--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/



[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