kernel source/dkms issue

Roman Shein

Active Member
Sep 11, 2017
16
0
41
45
Kyiv, Ukraine
I cannot build kernel module for Acronis Backup.
Here below is dkms make.log.
The same module compiles just fine on Debian 9. Proxmox is installed on top Debian 9, thus it seems that Proxmox kernel is a culprit.
Despite being installed in non-standard way Proxmox itself function just fine.

DKMS make.log for snapapi26-0.7.92 for kernel 4.10.17-2-pve (x86_64)
Mon Sep 11 15:47:52 EEST 2017
make: Entering directory '/usr/src/linux-headers-4.10.17-2-pve'
grep: ./include/asm/system.h: No such file or directory
grep: ./include/asm-generic/system.h: No such file or directory
CC [M] /var/lib/dkms/snapapi26/0.7.92/build/snapapi26.o
/var/lib/dkms/snapapi26/0.7.92/build/snapapi26.c: In function ‘sn_submit_bio’:
/var/lib/dkms/snapapi26/0.7.92/build/snapapi26.c:596:13: warning: passing argument 1 of ‘submit_bio’ makes pointer from integer without a cast [-Wint-conversion]
submit_bio(rw, bio);
^~
In file included from /var/lib/dkms/snapapi26/0.7.92/build/snapapi26.c:39:0:
./include/linux/bio.h:411:17: note: expected ‘struct bio *’ but argument is of type ‘int’
extern blk_qc_t submit_bio(struct bio *);
^~~~~~~~~~
/var/lib/dkms/snapapi26/0.7.92/build/snapapi26.c:596:2: error: too many arguments to function ‘submit_bio’
submit_bio(rw, bio);
^~~~~~~~~~
In file included from /var/lib/dkms/snapapi26/0.7.92/build/snapapi26.c:39:0:
./include/linux/bio.h:411:17: note: declared here
extern blk_qc_t submit_bio(struct bio *);
^~~~~~~~~~
/var/lib/dkms/snapapi26/0.7.92/build/snapapi26.c: In function ‘sn_op_is_write’:
/var/lib/dkms/snapapi26/0.7.92/build/snapapi26.c:603:12: error: ‘struct bio’ has no member named ‘bi_rw’; did you mean ‘bi_opf’?
return bio->bi_rw & REQ_WRITE;
^~
/var/lib/dkms/snapapi26/0.7.92/build/snapapi26.c:117:25: error: ‘BIO_RW’ undeclared (first use in this function)
#define REQ_WRITE (1 << BIO_RW)
^
/var/lib/dkms/snapapi26/0.7.92/build/snapapi26.c:603:22: note: in expansion of macro ‘REQ_WRITE’
return bio->bi_rw & REQ_WRITE;
^~~~~~~~~
/var/lib/dkms/snapapi26/0.7.92/build/snapapi26.c:117:25: note: each undeclared identifier is reported only once for each function it appears in
#define REQ_WRITE (1 << BIO_RW)
^
/var/lib/dkms/snapapi26/0.7.92/build/snapapi26.c:603:22: note: in expansion of macro ‘REQ_WRITE’
return bio->bi_rw & REQ_WRITE;
^~~~~~~~~
/var/lib/dkms/snapapi26/0.7.92/build/snapapi26.c: In function ‘sa_cache_save’:
/var/lib/dkms/snapapi26/0.7.92/build/snapapi26.c:1827:80: warning: pointer/integer type mismatch in conditional expression
(entry = (struct group_entry*)map_search(&s->s_groupmap, bno, &entry_page)) :
^
/var/lib/dkms/snapapi26/0.7.92/build/snapapi26.c: In function ‘session_getmap’:
/var/lib/dkms/snapapi26/0.7.92/build/snapapi26.c:3521:1: warning: label ‘out_copy’ defined but not used [-Wunused-label]
out_copy:
^~~~~~~~
/var/lib/dkms/snapapi26/0.7.92/build/snapapi26.c: In function ‘session_getsparsedmap’:
/var/lib/dkms/snapapi26/0.7.92/build/snapapi26.c:3701:20: warning: passing argument 2 of ‘map_init’ makes integer from pointer without a cast [-Wint-conversion]
ret = map_init(s, groups, gcount);
^~~~~~
/var/lib/dkms/snapapi26/0.7.92/build/snapapi26.c:1589:12: note: expected ‘long unsigned int’ but argument is of type ‘struct group_entry *’
static int map_init(struct session_struct* s, unsigned long uaddr, unsigned n)
^~~~~~~~
/var/lib/dkms/snapapi26/0.7.92/build/snapapi26.c: In function ‘snapapi_vm_fault’:
/var/lib/dkms/snapapi26/0.7.92/build/snapapi26.c:4546:45: error: ‘struct vm_fault’ has no member named ‘virtual_address’
unsigned long address = (unsigned long) vmf->virtual_address;
^~
/var/lib/dkms/snapapi26/0.7.92/build/snapapi26.c: In function ‘snapapi_init’:
/var/lib/dkms/snapapi26/0.7.92/build/snapapi26.c:4929:1: warning: label ‘err_thread’ defined but not used [-Wunused-label]
err_thread:
^~~~~~~~~~
/var/lib/dkms/snapapi26/0.7.92/build/snapapi26.c: In function ‘sn_op_is_write’:
/var/lib/dkms/snapapi26/0.7.92/build/snapapi26.c:607:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^
At top level:
/var/lib/dkms/snapapi26/0.7.92/build/snapapi26.c:4426:12: warning: ‘snapapi4_ioctl’ defined but not used [-Wunused-function]
static int snapapi4_ioctl(struct inode *ino, struct file *file, unsigned int cmd,
^~~~~~~~~~~~~~
scripts/Makefile.build:301: recipe for target '/var/lib/dkms/snapapi26/0.7.92/build/snapapi26.o' failed
make[1]: *** [/var/lib/dkms/snapapi26/0.7.92/build/snapapi26.o] Error 1
Makefile:1524: recipe for target '_module_/var/lib/dkms/snapapi26/0.7.92/build' failed
make: *** [_module_/var/lib/dkms/snapapi26/0.7.92/build] Error 2
make: Leaving directory '/usr/src/linux-headers-4.10.17-2-pve'
 
well the compiler errors you get refer to stuff that changed in kernel 4.8, so either that is not true (Stretch uses 4.9, PVE uses a patched 4.10) or the detection logic in the build files is broken and thinks PVE uses an older kernel.
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!