Module compilation error on another machine

Nicholas Krause xerofoify at gmail.com
Sun May 3 08:23:16 EDT 2015



On May 3, 2015 4:35:37 AM EDT, Harsh Jain <harshjain.prof at 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 at kernelnewbies.org
>http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

-- 
Sent from my Android device with K-9 Mail. Please excuse my brevity.



More information about the Kernelnewbies mailing list