Module compilation error on another machine
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
On May 3, 2015 4:35:37 AM EDT, Harsh Jain <harshjain.prof@gmail.com> wrote:
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
------------------------------------------------------------------------
_______________________________________________ I would like to see the code first but my feeling is your using 64 bit variables of 32 bit machine. Nick Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
-- Sent from my Android device with K-9 Mail. Please excuse my brevity.
Yes,it is eudyptula challenge.Actually same module compiled successfully on my old system. Regards Harsh Jain On 3 May 2015 18:22:39 GMT+05:30, Sudip Mukherjee <sudipm.mukherjee@gmail.com> wrote:
______________________________
I would like to see the code first but my feeling is your using 64 bit variables of 32 bit machine.
Is it for the *Eudyptula** Challenge*??
regards sudip
Nick
-- Sent from my Android device with K-9 Mail. Please excuse my brevity.
It is not related to challenge. Unfortunated my PC motherboard has crashed. I moved to ofce system some of system compiles successfully. Some not. Problem is with ubuntu versions in office system. Regards Harsh Jain On 4 May 2015 09:36:53 GMT+05:30, Sudip Mukherjee <sudipm.mukherjee@gmail.com> wrote:
On Mon, May 4, 2015 at 7:53 AM, Harsh Jain <harshjain.prof@gmail.com> wrote:
Yes,it is eudyptula challenge.Actually same module compiled successfully on my old system.
oops... you are not supposed to ask anything about the challenge.
regards sudip
-- Sent from my Android device with K-9 Mail. Please excuse my brevity.
participants (3)
-
Harsh Jain -
Nicholas Krause -
Sudip Mukherjee