Module compilation error on another machine

Harsh Jain harshjain.prof at gmail.com
Sun May 3 04:35:37 EDT 2015


Hi All,

I am trying to compile simple kernel module. It gives following error. Same
module compiles succesfully on another 64 bit ubuntu OS.Any idea what
different in environment can cause this. Both machine are ubuntu 12.04. On
32 ubuntu bit compilation fails.

In file included from /home/aricent/try5/eudy_misc_driver.c:7:0:
include/asm-generic/uaccess.h:41:0: warning: "access_ok" redefined [enabled
by default]
 #define access_ok(type, addr, size) __access_ok((unsigned
long)(addr),(size))
 ^
In file included from
/usr/src/linux-headers-3.13.0-43-generic/arch/x86/include/asm/sections.h:5:0,
                 from
/usr/src/linux-headers-3.13.0-43-generic/arch/x86/include/asm/hw_irq.h:26,
                 from include/linux/irq.h:368,
                 from
/usr/src/linux-headers-3.13.0-43-generic/arch/x86/include/asm/hardirq.h:5,
                 from include/linux/preempt_mask.h:5,
                 from include/linux/sched.h:25,
                 from include/asm-generic/uaccess.h:9,
                 from /home/aricent/try5/eudy_misc_driver.c:7:
/usr/src/linux-headers-3.13.0-43-generic/arch/x86/include/asm/uaccess.h:80:0:
note: this is the location of the previous definition
 #define access_ok(type, addr, size) \

In file included from /home/aricent/try5/eudy_misc_driver.c:7:0:
include/asm-generic/uaccess.h:337:1: error: static declaration of
‘clear_user’ follows non-static declaration
 clear_user(void __user *to, unsigned long n)
 ^
In file included from
/usr/src/linux-headers-3.13.0-43-generic/arch/x86/include/asm/sections.h:5:0,
                 from
/usr/src/linux-headers-3.13.0-43-generic/arch/x86/include/asm/hw_irq.h:26,
                 from include/linux/irq.h:368,
                 from
/usr/src/linux-headers-3.13.0-43-generic/arch/x86/include/asm/hardirq.h:5,
                 from include/linux/preempt_mask.h:5,
                 from include/linux/sched.h:25,
                 from include/asm-generic/uaccess.h:9,
                 from /home/aricent/try5/eudy_misc_driver.c:7:
/usr/src/linux-headers-3.13.0-43-generic/arch/x86/include/asm/uaccess.h:525:28:
note: previous declaration of ‘clear_user’ was here
 unsigned long __must_check clear_user(void __user *mem, unsigned long len);



Regards
Harsh Jain
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20150503/f1391e42/attachment.html 


More information about the Kernelnewbies mailing list