compilation error !! Please help !!

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

 



gcc -Wall -DMODULE -D__KERNEL__ -DLINUX -c example2.c -o example2
In file included from /usr/include/asm/processor.h:8,
                 from /usr/include/linux/prefetch.h:14,
                 from /usr/include/linux/list.h:8,
                 from /usr/include/linux/lockdep.h:12,
                 from /usr/include/linux/spinlock_types.h:12,
                 from /usr/include/linux/spinlock.h:85,
                 from /usr/include/linux/capability.h:45,
                 from /usr/include/linux/sched.h:44,
                 from /usr/include/linux/module.h:9,
                 from example2.c:2:
/usr/include/asm-x86_64/processor.h:77: error: 'CONFIG_X86_L1_CACHE_SHIFT' undeclared here (not in a function)
/usr/include/asm-x86_64/processor.h:77: error: requested alignment is not a constant
/usr/include/asm-x86_64/processor.h:233: error: requested alignment is not a constant
In file included from /usr/include/asm-x86_64/div64.h:1,
                 from /usr/include/asm/div64.h:8,
                 from /usr/include/linux/calc64.h:5,
                 from /usr/include/linux/jiffies.h:4,
                 from /usr/include/linux/sched.h:49,
                 from /usr/include/linux/module.h:9,
                 from example2.c:2:
/usr/include/asm-generic/div64.h:1:2: error: #error Do not include div64.h.
In file included from /usr/include/linux/sched.h:49,
                 from /usr/include/linux/module.h:9,
                 from example2.c:2:
/usr/include/linux/jiffies.h:33:3: error: #error You lose.
/usr/include/linux/jiffies.h:210:31: error: division by zero in #if
/usr/include/linux/jiffies.h:210:31: error: division by zero in #if
/usr/include/linux/jiffies.h:210:31: error: division by zero in #if
/usr/include/linux/jiffies.h:210:31: error: division by zero in #if
/usr/include/linux/jiffies.h:210:31: error: division by zero in #if
/usr/include/linux/jiffies.h:210:31: error: division by zero in #if
/usr/include/linux/jiffies.h:210:31: error: division by zero in #if
/usr/include/linux/jiffies.h:210:31: error: division by zero in #if
/usr/include/linux/jiffies.h:210:31: error: division by zero in #if
/usr/include/linux/jiffies.h:210:31: error: division by zero in #if
/usr/include/linux/jiffies.h:210:31: error: division by zero in #if
/usr/include/linux/jiffies.h:210:31: error: division by zero in #if
/usr/include/linux/jiffies.h:210:31: error: division by zero in #if
/usr/include/linux/jiffies.h:210:31: error: division by zero in #if
/usr/include/linux/jiffies.h:210:31: error: division by zero in #if
/usr/include/linux/jiffies.h:210:31: error: division by zero in #if
/usr/include/linux/jiffies.h:254:46: error: division by zero in #if
In file included from /usr/include/linux/sched.h:49,
                 from /usr/include/linux/module.h:9,
                 from example2.c:2:
/usr/include/linux/jiffies.h: In function 'jiffies_to_msecs':
/usr/include/linux/jiffies.h:259: error: 'CONFIG_HZ' undeclared (first use in this function)
/usr/include/linux/jiffies.h:259: error: (Each undeclared identifier is reported only once
/usr/include/linux/jiffies.h:259: error: for each function it appears in.)
/usr/include/linux/jiffies.h:265:46: error: division by zero in #if
/usr/include/linux/jiffies.h: In function 'jiffies_to_usecs':
/usr/include/linux/jiffies.h:270: error: 'CONFIG_HZ' undeclared (first use in this function)
/usr/include/linux/jiffies.h:278:46: error: division by zero in #if
/usr/include/linux/jiffies.h: In function 'msecs_to_jiffies':
/usr/include/linux/jiffies.h:283: error: 'CONFIG_HZ' undeclared (first use in this function)
/usr/include/linux/jiffies.h:291:46: error: division by zero in #if
/usr/include/linux/jiffies.h: In function 'usecs_to_jiffies':
/usr/include/linux/jiffies.h:296: error: 'CONFIG_HZ' undeclared (first use in this function)
/usr/include/linux/jiffies.h: In function 'timespec_to_jiffies':
/usr/include/linux/jiffies.h:315: error: 'CONFIG_HZ' undeclared (first use in this function)
/usr/include/linux/jiffies.h:317: error: 'SHIFT_HZ' undeclared (first use in this function)
/usr/include/linux/jiffies.h: In function 'jiffies_to_timespec':
/usr/include/linux/jiffies.h:334: error: 'CONFIG_HZ' undeclared (first use in this function)
/usr/include/linux/jiffies.h: In function 'timeval_to_jiffies':
/usr/include/linux/jiffies.h:356: error: 'SHIFT_HZ' undeclared (first use in this function)
/usr/include/linux/jiffies.h:356: error: 'CONFIG_HZ' undeclared (first use in this function)
/usr/include/linux/jiffies.h: In function 'jiffies_to_timeval':
/usr/include/linux/jiffies.h:372: error: 'CONFIG_HZ' undeclared (first use in this function)
/usr/include/linux/jiffies.h:385:6: error: division by zero in #if
/usr/include/linux/jiffies.h:385:6: error: division by zero in #if
/usr/include/linux/jiffies.h:385:6: error: division by zero in #if
/usr/include/linux/jiffies.h:385:6: error: division by zero in #if
/usr/include/linux/jiffies.h:385:6: error: division by zero in #if
/usr/include/linux/jiffies.h:385:6: error: division by zero in #if
/usr/include/linux/jiffies.h:385:6: error: division by zero in #if
/usr/include/linux/jiffies.h:385:6: error: division by zero in #if
/usr/include/linux/jiffies.h:385:6: error: division by zero in #if
/usr/include/linux/jiffies.h:385:6: error: division by zero in #if
/usr/include/linux/jiffies.h:385:6: error: division by zero in #if
/usr/include/linux/jiffies.h:385:6: error: division by zero in #if
/usr/include/linux/jiffies.h:385:6: error: division by zero in #if
/usr/include/linux/jiffies.h:385:6: error: division by zero in #if
/usr/include/linux/jiffies.h:385:6: error: division by zero in #if
/usr/include/linux/jiffies.h:385:6: error: division by zero in #if
/usr/include/linux/jiffies.h: In function 'jiffies_to_clock_t':
/usr/include/linux/jiffies.h:386: error: 'CONFIG_HZ' undeclared (first use in this function)
/usr/include/linux/jiffies.h: In function 'clock_t_to_jiffies':
/usr/include/linux/jiffies.h:397: error: 'CONFIG_HZ' undeclared (first use in this function)
/usr/include/linux/jiffies.h:416:6: error: division by zero in #if
/usr/include/linux/jiffies.h:416:6: error: division by zero in #if
/usr/include/linux/jiffies.h:416:6: error: division by zero in #if
/usr/include/linux/jiffies.h:416:6: error: division by zero in #if
/usr/include/linux/jiffies.h:416:6: error: division by zero in #if
/usr/include/linux/jiffies.h:416:6: error: division by zero in #if
/usr/include/linux/jiffies.h:416:6: error: division by zero in #if
/usr/include/linux/jiffies.h:416:6: error: division by zero in #if
/usr/include/linux/jiffies.h:416:6: error: division by zero in #if
/usr/include/linux/jiffies.h:416:6: error: division by zero in #if
/usr/include/linux/jiffies.h:416:6: error: division by zero in #if
/usr/include/linux/jiffies.h:416:6: error: division by zero in #if
/usr/include/linux/jiffies.h:416:6: error: division by zero in #if
/usr/include/linux/jiffies.h:416:6: error: division by zero in #if
/usr/include/linux/jiffies.h:416:6: error: division by zero in #if
/usr/include/linux/jiffies.h:416:6: error: division by zero in #if
/usr/include/linux/jiffies.h: In function 'jiffies_64_to_clock_t':
/usr/include/linux/jiffies.h:417: error: 'CONFIG_HZ' undeclared (first use in this function)
In file included from /usr/include/linux/rwsem.h:24,
                 from /usr/include/asm-x86_64/semaphore.h:43,
                 from /usr/include/asm/semaphore.h:8,
                 from /usr/include/linux/sched.h:57,
                 from /usr/include/linux/module.h:9,
                 from example2.c:2:
/usr/include/asm/rwsem.h:8:3: error: #error This header is not available for x86_64
In file included from /usr/include/asm/semaphore.h:8,
                 from /usr/include/linux/sched.h:57,
                 from /usr/include/linux/module.h:9,
                 from example2.c:2:
/usr/include/asm-x86_64/semaphore.h: In function 'down':
/usr/include/asm-x86_64/semaphore.h:112: error: expected ':' or ')' before 'KBUILD_BASENAME'
/usr/include/asm-x86_64/semaphore.h: In function 'down_interruptible':
/usr/include/asm-x86_64/semaphore.h:137: error: expected ':' or ')' before 'KBUILD_BASENAME'
/usr/include/asm-x86_64/semaphore.h: In function 'down_trylock':
/usr/include/asm-x86_64/semaphore.h:161: error: expected ':' or ')' before 'KBUILD_BASENAME'
/usr/include/asm-x86_64/semaphore.h: In function 'up':
/usr/include/asm-x86_64/semaphore.h:184: error: expected ':' or ')' before 'KBUILD_BASENAME'
In file included from /usr/include/linux/memory_hotplug.h:7,
                 from /usr/include/linux/mmzone.h:342,
                 from /usr/include/linux/gfp.h:4,
                 from /usr/include/linux/slab.h:14,
                 from /usr/include/linux/percpu.h:4,
                 from /usr/include/linux/rcupdate.h:41,
                 from /usr/include/linux/pid.h:4,
                 from /usr/include/linux/sched.h:70,
                 from /usr/include/linux/module.h:9,
                 from example2.c:2:
/usr/include/linux/notifier.h: At top level:
/usr/include/linux/notifier.h:47: error: field 'rwsem' has incomplete type
In file included from /usr/include/linux/module.h:9,
                 from example2.c:2:
/usr/include/linux/sched.h:314: error: field 'mmap_sem' has incomplete type
In file included from /usr/include/linux/sysdev.h:24,
                 from /usr/include/linux/sched.h:1526,
                 from /usr/include/linux/module.h:9,
                 from example2.c:2:
/usr/include/linux/kobject.h:171: error: field 'rwsem' has incomplete type
example2.c: In function 'init_module':
example2.c:32: warning: control reaches end of non-void function
make: *** [example2] Error 1



Thanks & regards,
Onkar

[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