mfrw / compcache

Automatically exported from code.google.com/p/compcache
0 stars 0 forks source link

Can't compile on proxmox ve kernel (2.6.32) #57

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. install proxmox pve-kernel (http://pve.proxmox.com/wiki/Proxmox_VE_Kernel)
2. try to make compcache

What version of the product are you using? On what operating system?
Linux s1 2.6.32-1-pve #1 SMP Fri Jan 15 11:37:39 CET 2010 x86_64 GNU/Linux

Please provide any additional information below.
s1:~/compcache# make
make -C "/lib/modules/2.6.32-1-pve/build" M=/root/compcache modules
make[1]: Entering directory `/usr/src/linux-headers-2.6.32-1-pve'
  CC [M]  /root/compcache/ramzswap_drv.o
In file included from include/linux/prefetch.h:13,
                 from include/linux/list.h:6,
                 from include/linux/module.h:9,
                 from /root/compcache/ramzswap_drv.c:18:
include/linux/types.h:4:23: error: asm/types.h: No such file or directory
In file included from include/linux/types.h:14,
                 from include/linux/prefetch.h:13,
                 from include/linux/list.h:6,
                 from include/linux/module.h:9,
                 from /root/compcache/ramzswap_drv.c:18:
include/linux/posix_types.h:47:29: error: asm/posix_types.h: No such file or 
directory
In file included from include/linux/prefetch.h:13,
                 from include/linux/list.h:6,
                 from include/linux/module.h:9,
                 from /root/compcache/ramzswap_drv.c:18:
include/linux/types.h:18: error: expected '=', ',', ';', 'asm' or 
'__attribute__' before '__kernel_dev_t'
include/linux/types.h:21: error: expected '=', ',', ';', 'asm' or 
'__attribute__' before 'dev_t'
include/linux/types.h:22: error: expected '=', ',', ';', 'asm' or 
'__attribute__' before 'ino_t'
include/linux/types.h:23: error: expected '=', ',', ';', 'asm' or 
'__attribute__' before 'mode_t'
include/linux/types.h:24: error: expected '=', ',', ';', 'asm' or 
'__attribute__' before 'nlink_t'
include/linux/types.h:25: error: expected '=', ',', ';', 'asm' or 
'__attribute__' before 'off_t'
include/linux/types.h:26: error: expected '=', ',', ';', 'asm' or 
'__attribute__' before 'pid_t'
include/linux/types.h:27: error: expected '=', ',', ';', 'asm' or 
'__attribute__' before 'daddr_t'
include/linux/types.h:29: error: expected '=', ',', ';', 'asm' or 
'__attribute__' before 'suseconds_t'
include/linux/types.h:30: error: expected '=', ',', ';', 'asm' or 
'__attribute__' before 'timer_t'
include/linux/kdev_t.h:70: error: expected ')' before 'dev'
include/linux/kdev_t.h:75: error: expected '=', ',', ';', 'asm' or 
'__attribute__' before 
'sysv_encode_dev'
include/linux/kdev_t.h:80: error: expected ')' before 'dev'
include/linux/kdev_t.h:85: error: expected ')' before 'dev'
In file included from include/linux/device.h:16,
                 from include/linux/genhd.h:62,
                 from include/linux/blkdev.h:8,
                 from /root/compcache/ramzswap_drv.c:21:
include/linux/ioport.h:19: error: expected specifier-qualifier-list before 
'resource_size_t'
include/linux/ioport.h:116: error: expected declaration specifiers or '...' 
before 'resource_size_t'
include/linux/ioport.h:116: error: expected declaration specifiers or '...' 
before 'resource_size_t'
include/linux/ioport.h:121: error: expected declaration specifiers or '...' 
before 'resource_size_t'
include/linux/ioport.h:121: error: expected declaration specifiers or '...' 
before 'resource_size_t'
include/linux/ioport.h:122: error: expected declaration specifiers or '...' 
before 'resource_size_t'
include/linux/ioport.h:122: error: expected declaration specifiers or '...' 
before 'resource_size_t'
include/linux/ioport.h:124: error: expected declaration specifiers or '...' 
before 'resource_size_t'
include/linux/ioport.h:124: error: expected declaration specifiers or '...' 
before 'resource_size_t'
include/linux/ioport.h:126: error: expected declaration specifiers or '...' 
before 'resource_size_t'
include/linux/ioport.h:127: error: expected declaration specifiers or '...' 
before 'resource_size_t'
include/linux/ioport.h:128: error: expected '=', ',', ';', 'asm' or 
'__attribute__' before 
'resource_alignment'
include/linux/ioport.h:129: error: expected '=', ',', ';', 'asm' or 
'__attribute__' before 
'resource_size'
include/linux/ioport.h: In function 'resource_type':
include/linux/ioport.h:135: error: 'struct resource' has no member named 'flags'
include/linux/ioport.h: At top level:
include/linux/ioport.h:147: error: expected declaration specifiers or '...' 
before 'resource_size_t'
include/linux/mm.h: At top level:
include/linux/mm.h:1073: error: expected '=', ',', ';', 'asm' or 
'__attribute__' before 
'mmap_pages_allocated'
include/linux/mm.h: In function 'vma_nonlinear_insert':
include/linux/mm.h:1089: error: 'struct vm_area_struct' has no member named 
'shared'
include/linux/mm.h:1090: error: 'struct vm_area_struct' has no member named 
'shared'
include/linux/mm.h: In function 'do_mmap':
include/linux/mm.h:1153: error: 'EINVAL' undeclared (first use in this function)
include/linux/mm.h:1156: error: 'PAGE_MASK' undeclared (first use in this 
function)
include/linux/mm.h: At top level:
include/linux/mm.h:1162: error: expected declaration specifiers or '...' before 
'size_t'
include/linux/mm.h:1168: error: expected declaration specifiers or '...' before 
'loff_t'
include/linux/mm.h:1170: error: expected declaration specifiers or '...' before 
'loff_t'
include/linux/mm.h:1170: error: expected declaration specifiers or '...' before 
'loff_t'
include/linux/mm.h:1233: error: expected '=', ',', ';', 'asm' or 
'__attribute__' before 
'vm_get_page_prot'
include/linux/mm.h:1236: error: expected declaration specifiers or '...' before 
'pgprot_t'
include/linux/mm.h:1251: error: expected ')' before '*' token
include/linux/mm.h:1254: error: expected declaration specifiers or '...' before 
'pte_fn_t'
include/linux/mm.h:1298: error: expected declaration specifiers or '...' before 
'size_t'
include/linux/mm.h:1298: error: expected declaration specifiers or '...' before 
'loff_t'
include/linux/mm.h:1312: error: expected '=', ',', ';', 'asm' or 
'__attribute__' before '*' token
include/linux/mm.h:1313: error: expected '=', ',', ';', 'asm' or 
'__attribute__' before '*' token
include/linux/mm.h:1314: error: expected '=', ',', ';', 'asm' or 
'__attribute__' before '*' token
include/linux/mm.h:1315: error: expected '=', ',', ';', 'asm' or 
'__attribute__' before '*' token
include/linux/mm.h:1317: error: expected ')' before '*' token
include/linux/mm.h:1324: error: expected declaration specifiers or '...' before 
'size_t'
include/linux/mm.h:1325: error: expected declaration specifiers or '...' before 
'size_t'
include/linux/mm.h:1331: error: expected '=', ',', ';', 'asm' or 
'__attribute__' before 
'mce_bad_pages'
In file included from include/linux/highmem.h:6,
                 from include/linux/pagemap.h:10,
                 from include/linux/blkdev.h:12,
                 from /root/compcache/ramzswap_drv.c:21:
include/linux/uaccess.h:5:25: error: asm/uaccess.h: No such file or directory
In file included from include/linux/highmem.h:6,
                 from include/linux/pagemap.h:10,
                 from include/linux/blkdev.h:12,
                 from /root/compcache/ramzswap_drv.c:21:
include/linux/uaccess.h: In function 'pagefault_disable':
include/linux/uaccess.h:18: error: invalid type argument of '->' (have 'int')
include/linux/uaccess.h: In function 'pagefault_enable':
include/linux/uaccess.h:33: error: invalid type argument of '->' (have 'int')
include/linux/uaccess.h: In function '__copy_from_user_inatomic_nocache':
include/linux/uaccess.h:46: error: implicit declaration of function 
'__copy_from_user_inatomic'
include/linux/uaccess.h: In function '__copy_from_user_nocache':
include/linux/uaccess.h:52: error: implicit declaration of function 
'__copy_from_user'
include/linux/uaccess.h: At top level:
include/linux/uaccess.h:96: error: expected declaration specifiers or '...' 
before 'size_t'
include/linux/uaccess.h:107: error: expected declaration specifiers or '...' 
before 'size_t'
In file included from include/linux/pagemap.h:10,
                 from include/linux/blkdev.h:12,
                 from /root/compcache/ramzswap_drv.c:21:
include/linux/highmem.h:8:28: error: asm/cacheflush.h: No such file or directory
include/linux/highmem.h:22:28: error: asm/kmap_types.h: No such file or 
directory
In file included from include/linux/pagemap.h:10,
                 from include/linux/blkdev.h:12,
                 from /root/compcache/ramzswap_drv.c:21:
include/linux/highmem.h:30: warning: 'enum km_type' declared inside parameter 
list
include/linux/highmem.h:30: error: parameter 1 ('type') has incomplete type
include/linux/highmem.h:62: warning: 'enum km_type' declared inside parameter 
list
include/linux/highmem.h:62: error: parameter 2 ('idx') has incomplete type
include/linux/highmem.h: In function 'clear_user_highpage':
include/linux/highmem.h:82: error: 'KM_USER0' undeclared (first use in this 
function)
include/linux/highmem.h:82: error: type of formal parameter 2 is incomplete
include/linux/highmem.h:83: error: implicit declaration of function 
'clear_user_page'
include/linux/highmem.h: In function 'clear_highpage':
include/linux/highmem.h:135: error: 'KM_USER0' undeclared (first use in this 
function)
include/linux/highmem.h:135: error: type of formal parameter 2 is incomplete
include/linux/highmem.h:136: error: implicit declaration of function 
'clear_page'
include/linux/highmem.h: In function 'zero_user_segments':
include/linux/highmem.h:144: error: 'KM_USER0' undeclared (first use in this 
function)
include/linux/highmem.h:144: error: type of formal parameter 2 is incomplete
include/linux/highmem.h:149: error: too many arguments to function 'memset'
include/linux/highmem.h:152: error: too many arguments to function 'memset'
include/linux/highmem.h:155: error: implicit declaration of function 
'flush_dcache_page'
include/linux/highmem.h: In function 'copy_user_highpage':
include/linux/highmem.h:183: error: 'KM_USER0' undeclared (first use in this 
function)
include/linux/highmem.h:183: error: type of formal parameter 2 is incomplete
include/linux/highmem.h:184: error: 'KM_USER1' undeclared (first use in this 
function)
include/linux/highmem.h:184: error: type of formal parameter 2 is incomplete
include/linux/highmem.h:185: error: implicit declaration of function 
'copy_user_page'
include/linux/highmem.h: In function 'copy_highpage':
include/linux/highmem.h:196: error: 'KM_USER0' undeclared (first use in this 
function)
include/linux/highmem.h:196: error: type of formal parameter 2 is incomplete
include/linux/highmem.h:197: error: 'KM_USER1' undeclared (first use in this 
function)
include/linux/highmem.h:197: error: type of formal parameter 2 is incomplete
include/linux/highmem.h:198: error: implicit declaration of function 'copy_page'
In file included from include/linux/pagemap.h:15,
                 from include/linux/blkdev.h:12,
                 from /root/compcache/ramzswap_drv.c:21:
include/linux/hardirq.h:10:25: error: asm/hardirq.h: No such file or directory
In file included from include/linux/blkdev.h:12,
                 from /root/compcache/ramzswap_drv.c:21:
include/linux/pagemap.h: In function 'mapping_set_error':
include/linux/pagemap.h:31: error: 'ENOSPC' undeclared (first use in this 
function)
include/linux/pagemap.h: In function 'page_cache_add_speculative':
include/linux/pagemap.h:181: error: implicit declaration of function 
'atomic_add_unless'
include/linux/pagemap.h: In function 'page_freeze_refs':
include/linux/pagemap.h:191: error: implicit declaration of function 
'atomic_cmpxchg'
include/linux/pagemap.h: At top level:
include/linux/pagemap.h:277: error: expected '=', ',', ';', 'asm' or 
'__attribute__' before 
'page_offset'
include/linux/pagemap.h: In function 'linear_page_index':
include/linux/pagemap.h:286: error: 'struct vm_area_struct' has no member named 
'vm_pgoff'
include/linux/pagemap.h: In function 'trylock_page':
include/linux/pagemap.h:307: error: implicit declaration of function 
'test_and_set_bit_lock'
include/linux/pagemap.h: In function 'fault_in_pages_writeable':
include/linux/pagemap.h:396: error: implicit declaration of function 
'__put_user'
include/linux/pagemap.h:404: error: 'PAGE_MASK' undeclared (first use in this 
function)
include/linux/pagemap.h: In function 'fault_in_pages_readable':
include/linux/pagemap.h:419: error: implicit declaration of function 
'__get_user'
include/linux/pagemap.h:423: error: 'PAGE_MASK' undeclared (first use in this 
function)
In file included from include/linux/backing-dev.h:17,
                 from include/linux/blkdev.h:13,
                 from /root/compcache/ramzswap_drv.c:21:
include/linux/writeback.h: At top level:
include/linux/writeback.h:46: error: expected specifier-qualifier-list before 
'loff_t'
include/linux/writeback.h: In function 'wait_on_inode':
include/linux/writeback.h:81: error: 'struct inode' has no member named 
'i_state'
include/linux/writeback.h: In function 'inode_sync_wait':
include/linux/writeback.h:87: error: 'struct inode' has no member named 
'i_state'
include/linux/writeback.h: At top level:
include/linux/writeback.h:113: error: expected declaration specifiers or '...' 
before 'size_t'
include/linux/writeback.h:114: error: expected declaration specifiers or '...' 
before 'loff_t'
include/linux/writeback.h:116: error: expected declaration specifiers or '...' 
before 'size_t'
include/linux/writeback.h:117: error: expected declaration specifiers or '...' 
before 'loff_t'
include/linux/writeback.h:119: error: expected declaration specifiers or '...' 
before 'size_t'
include/linux/writeback.h:120: error: expected declaration specifiers or '...' 
before 'loff_t'
include/linux/writeback.h:122: error: expected declaration specifiers or '...' 
before 'size_t'
include/linux/writeback.h:123: error: expected declaration specifiers or '...' 
before 'loff_t'
include/linux/writeback.h:127: error: expected declaration specifiers or '...' 
before 'size_t'
include/linux/writeback.h:127: error: expected declaration specifiers or '...' 
before 'loff_t'
In file included from include/linux/blkdev.h:13,
                 from /root/compcache/ramzswap_drv.c:21:
include/linux/backing-dev.h:102: error: expected declaration specifiers or 
'...' before 'dev_t'
include/linux/backing-dev.h:120: error: expected declaration specifiers or 
'...' before 's64'
include/linux/backing-dev.h: In function '__add_bdi_stat':
include/linux/backing-dev.h:122: error: 'amount' undeclared (first use in this 
function)
include/linux/backing-dev.h:122: error: implicit declaration of function 
'__ilog2_u32'
include/linux/backing-dev.h:122: error: implicit declaration of function 
'__ilog2_u64'
include/linux/backing-dev.h:122: error: too many arguments to function 
'__percpu_counter_add'
include/linux/backing-dev.h: In function '__inc_bdi_stat':
include/linux/backing-dev.h:128: error: too many arguments to function 
'__add_bdi_stat'
include/linux/backing-dev.h: In function '__dec_bdi_stat':
include/linux/backing-dev.h:144: error: too many arguments to function 
'__add_bdi_stat'
include/linux/backing-dev.h: At top level:
include/linux/backing-dev.h:157: error: expected '=', ',', ';', 'asm' or 
'__attribute__' before 
'bdi_stat'
include/linux/backing-dev.h:163: error: expected '=', ',', ';', 'asm' or 
'__attribute__' before 
'__bdi_stat_sum'
include/linux/backing-dev.h:169: error: expected '=', ',', ';', 'asm' or 
'__attribute__' before 
'bdi_stat_sum'
In file included from include/linux/blkdev.h:15,
                 from /root/compcache/ramzswap_drv.c:21:
include/linux/mempool.h:55: error: expected declaration specifiers or '...' 
before 'size_t'
include/linux/mempool.h: In function 'mempool_create_kmalloc_pool':
include/linux/mempool.h:58: error: 'size' undeclared (first use in this 
function)
In file included from include/linux/ioprio.h:5,
                 from include/linux/bio.h:25,
                 from include/linux/blkdev.h:16,
                 from /root/compcache/ramzswap_drv.c:21:
include/linux/iocontext.h: At top level:
include/linux/iocontext.h:29: error: expected specifier-qualifier-list before 
'u64'
include/linux/iocontext.h:50: error: expected specifier-qualifier-list before 
'u64'
include/linux/iocontext.h:67: error: expected specifier-qualifier-list before 
'atomic_long_t'
include/linux/iocontext.h: In function 'ioc_task_link':
include/linux/iocontext.h:94: error: implicit declaration of function 
'atomic_long_inc_not_zero'
include/linux/iocontext.h:94: error: 'struct io_context' has no member named 
'refcount'
include/linux/iocontext.h:95: error: 'struct io_context' has no member named 
'nr_tasks'
In file included from include/linux/bio.h:25,
                 from include/linux/blkdev.h:16,
                 from /root/compcache/ramzswap_drv.c:21:
include/linux/ioprio.h: In function 'task_ioprio':
include/linux/ioprio.h:51: error: 'struct io_context' has no member named 
'ioprio'
include/linux/ioprio.h:52: error: 'struct io_context' has no member named 
'ioprio'
include/linux/ioprio.h: In function 'task_ioprio_class':
include/linux/ioprio.h:59: error: 'struct io_context' has no member named 
'ioprio'
include/linux/ioprio.h:60: error: 'struct io_context' has no member named 
'ioprio'
In file included from include/linux/blkdev.h:16,
                 from /root/compcache/ramzswap_drv.c:21:
include/linux/bio.h:29:20: error: asm/io.h: No such file or directory
In file included from include/linux/blkdev.h:20,
                 from /root/compcache/ramzswap_drv.c:21:
include/linux/bsg.h: At top level:
include/linux/bsg.h:21: error: expected specifier-qualifier-list before '__s32'
In file included from /root/compcache/ramzswap_drv.c:21:
include/linux/blkdev.h:23:29: error: asm/scatterlist.h: No such file or 
directory

/root/compcache/ramzswap_drv.c:287: error: 'struct ramzswap_ioctl_stats' has no 
member 
named 'pages_expand_pct'
/root/compcache/ramzswap_drv.c:289: error: 'struct ramzswap_ioctl_stats' has no 
member 
named 
/root/compcache/ramzswap_drv.c:1551: warning: (near initialization for 
'__param_backing_swap')
/root/compcache/ramzswap_drv.c:1551: warning: excess elements in struct 
initializer
/root/compcache/ramzswap_drv.c:1551: warning: (near initialization for 
'__param_backing_swap')
/root/compcache/ramzswap_drv.c:1551: error: extra brace group at end of 
initializer
/root/compcache/ramzswap_drv.c:1551: error: (near initialization for 
'__param_backing_swap')
/root/compcache/ramzswap_drv.c:1551: warning: excess elements in struct 
initializer
/root/compcache/ramzswap_drv.c:1551: warning: (near initialization for 
'__param_backing_swap')
make[2]: *** [/root/compcache/ramzswap_drv.o] Error 1
make[1]: *** [_module_/root/compcache] Error 2
make[1]: Leaving directory `/usr/src/linux-headers-2.6.32-1-pve'
make: *** [all] Error 2

Original issue reported on code.google.com by ivanov.v...@gmail.com on 29 Jan 2010 at 10:44

GoogleCodeExporter commented 9 years ago
Looks like you are missing kernel packages needed to build any kernel module. 
On 
Fedora, these are 'kernel-devel' and 'kernel-headers'. Please check if you have 
corresponding packages installed (pkg names depend on distro).

Original comment by nitingupta910@gmail.com on 29 Jan 2010 at 11:31

GoogleCodeExporter commented 9 years ago
Package kernel-headers is already installed.
make[1]: Leaving directory `/usr/src/linux-headers-2.6.32-1-pve' - here is it.
Also I have created a follow symlink:
lrwxrwxrwx  1 root src    27 Jan 28 20:42 linux -> linux-headers-2.6.32-1-pve/
drwxr-xr-x 24 root root 4096 Jan 29 12:06 linux-headers-2.6.32-1-pve

kernel-devel package-name is used in redhat-based distros.
E: Couldn't find package kernel-devel
Proxmox VE - is debian-based product.

Original comment by ivanov.v...@gmail.com on 29 Jan 2010 at 11:54

GoogleCodeExporter commented 9 years ago
I tried it on fresh-installed debian 5.0 amd64, the same:
s2:~/compcache-0.6.2# make
make -C "/lib/modules/2.6.26-2-amd64/build" M=/root/compcache-0.6.2 modules
make[1]: Entering directory `/usr/src/linux-headers-2.6.26-2-amd64'
  CC [M]  /root/compcache-0.6.2/ramzswap_drv.o
/root/compcache-0.6.2/ramzswap_drv.c: In function 
‘ramzswap_ioctl_init_device’:
/root/compcache-0.6.2/ramzswap_drv.c:1187: error: implicit declaration of 
function ‘blk_queue_nonrot’
/root/compcache-0.6.2/ramzswap_drv.c:1188: error: ‘QUEUE_FLAG_NONROT’ 
undeclared (first use in this 
function)
/root/compcache-0.6.2/ramzswap_drv.c:1188: error: (Each undeclared identifier 
is reported only once
/root/compcache-0.6.2/ramzswap_drv.c:1188: error: for each function it appears 
in.)
/root/compcache-0.6.2/ramzswap_drv.c: At top level:
/root/compcache-0.6.2/ramzswap_drv.c:1236: error: expected declaration 
specifiers or ‘...’ before ‘fmode_t’
/root/compcache-0.6.2/ramzswap_drv.c:1346: warning: initialization from 
incompatible pointer type
make[2]: *** [/root/compcache-0.6.2/ramzswap_drv.o] Ошибка 1
make[1]: *** [_module_/root/compcache-0.6.2] Ошибка 2
make[1]: Leaving directory `/usr/src/linux-headers-2.6.26-2-amd64'
make: *** [all] Ошибка 2

Original comment by ivanov.v...@gmail.com on 29 Jan 2010 at 12:26

GoogleCodeExporter commented 9 years ago
compcache-0.6.2 compiles correctly with vanilla kernel 2.6.32. I'm not sure 
what is
the problem with your setup but we may note that only headers inside asm/ are 
not
found, throwing out all sorts of errors.

----
> make[1]: Leaving directory `/usr/src/linux-headers-2.6.26-2-amd64'

compcache-0.6.x requires kernel 2.6.28, at least (as mentioned on
CompilingAndUsingNew page). For 2.6.26 you can use compcache-0.5.4.

Original comment by nitingupta910@gmail.com on 29 Jan 2010 at 3:27

GoogleCodeExporter commented 9 years ago
Ok, I understand this only after posting here, sorry :)
compcache 0.5 has compiled, but:
insmod: error inserting 'ramzswap.ko': -1 Invalid module format
Where is this asm/ directory must be located?

Original comment by ivanov.v...@gmail.com on 29 Jan 2010 at 4:34

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
On ubuntu 9.10 system, following kernel packages are installed:

linux-headers-2.6.31-14           Header files related to Linux kernel version
linux-headers-2.6.31-14-generic   Linux kernel headers for version 2.6.31 on x

of these, linux-headers-2.6.31-14 provides required asm/ headers:

$ dpkg --listfiles linux-headers-2.6.31-14 | grep cacheflush.h

/usr/src/linux-headers-2.6.31-14/arch/x86/include/asm/cacheflush.h
<snip>

So, make sure that both of these packages are installed and check that asm/ 
headers
as present as shown above.

Original comment by nitingupta910@gmail.com on 30 Jan 2010 at 4:00

GoogleCodeExporter commented 9 years ago
I hope it works now.

Original comment by nitingupta910@gmail.com on 20 Feb 2010 at 4:37