[DRBD-user] Problems compiling kernel module

Adam Goryachev adam at websitemanagers.com.au
Thu Jun 2 15:02:34 CEST 2016

Note: "permalinks" may not be as permanent as we would like,
direct links of old sources may well be a few messages off.


I'm trying to use debian testing and install drbd9.

Using the packages from 
http://ppa.launchpad.net/linbit/linbit-drbd9-stack/ubuntu/pool/main/d/, 
specifically the xenial packages:
Here is what happens:
Setting up drbd-dkms (9.0.2-1ppa1~xenial1) ...
Loading new drbd-9.0.2-1ppa1~xenial1 DKMS files...
First Installation: checking all kernels...
Building only for 4.5.0-2-amd64
Building initial module for 4.5.0-2-amd64
Error! Bad return status for module build on kernel: 4.5.0-2-amd64 (x86_64)
Consult /var/lib/dkms/drbd/9.0.2-1ppa1~xenial1/build/make.log for more 
information.
Processing triggers for libc-bin (2.22-9) ...
Processing triggers for menu (2.1.47) ...
End...

Looking at why the kernel module compile failed I see this:

# cat /var/lib/dkms/drbd/9.0.2-1ppa1~xenial1/build/make.log
DKMS make.log for drbd-9.0.2-1ppa1~xenial1 for kernel 4.5.0-2-amd64 (x86_64)
Thursday 2 June  18:27:34 AEST 2016
make: Entering directory 
'/var/lib/dkms/drbd/9.0.2-1ppa1~xenial1/build/src/drbd'

     Calling toplevel makefile of kernel source tree, which I believe is in
     KDIR=/lib/modules/4.5.0-2-amd64/build

make -C /lib/modules/4.5.0-2-amd64/build 
SUBDIRS=/var/lib/dkms/drbd/9.0.2-1ppa1~xenial1/build/src/drbd modules
   COMPAT  have_atomic_dec_if_positive
   COMPAT  have_bdev_discard_alignment
   COMPAT  have_kref_get_unless_zero
   COMPAT  have_idr_for_each
   COMPAT  have_simple_positive
   COMPAT  have_three_paramater_hlist_for_each_entry
   COMPAT  have_bioset_create_front_pad
   COMPAT  have_sock_shutdown
   COMPAT  need_genlmsg_multicast_wrapper
   COMPAT  have_find_next_zero_bit_le
   COMPAT  blkdev_issue_zeroout_discard
   COMPAT  use_blk_queue_max_sectors_anyways
   COMPAT  have_genl_lock
   COMPAT  have_kvfree
   COMPAT  have_prandom_u32
   COMPAT  drbd_release_returns_void
   COMPAT  kmap_atomic_page_only
   COMPAT  have_bio_free
   COMPAT  have_rb_augment_functions
   COMPAT  have_dst_groups
   COMPAT  rdma_create_id_has_net_ns
   COMPAT  have_f_path_dentry
   COMPAT  blkdev_issue_zeroout_blkdev_ifl_wait
   COMPAT  have_ctrl_attr_mcast_groups
   COMPAT  have_vzalloc
   COMPAT  have_blk_check_plugged
   COMPAT  have_blkdev_get_by_path
   COMPAT  have_void_make_request
   COMPAT  have_atomic_in_flight
   COMPAT  have_proc_pde_data
   COMPAT  have_fmode_t
   COMPAT  have_linux_byteorder_swabb_h
   COMPAT  have_blk_queue_merge_bvec
   COMPAT  have_open_bdev_exclusive
   COMPAT  have_struct_bvec_iter
   COMPAT  have_blk_queue_max_hw_sectors
   COMPAT  have_signed_nla_put
   COMPAT  have_bd_unlink_disk_holder
   COMPAT  sock_create_kern_has_five_parameters
   COMPAT  have_blk_queue_max_segments
   COMPAT  have_rcu_dereference_protected
   COMPAT  have_blk_qc_t_make_request
   COMPAT  have_genlmsg_new
   COMPAT  have_bool_type
   COMPAT  bio_split_has_bio_split_pool_parameter
   COMPAT  have_generic_start_io_acct
   COMPAT  have_IS_ERR_OR_NULL
   COMPAT  queue_limits_has_discard_zeroes_data
   COMPAT  have_WB_congested_enum
   COMPAT  bioset_create_has_three_parameters
   COMPAT  have_is_vmalloc_addr
   COMPAT  have_umh_wait_proc
   COMPAT  have_genlmsg_reply
   COMPAT  have_genlmsg_put_reply
   COMPAT  have_bio_bi_error
   COMPAT  have_blk_set_stacking_limits
   COMPAT  hlist_for_each_entry_has_three_parameters
   COMPAT  have_genlmsg_msg_size
   COMPAT  have_security_netlink_recv
   COMPAT  have_blk_queue_split
   COMPAT  have_proc_create_data
   COMPAT  have_nlmsg_hdr
   COMPAT  have_clear_bit_unlock
   COMPAT  have_netlink_cb_portid
   COMPAT  have_ib_cq_init_attr
   COMPAT  have_bd_claim_by_disk
   COMPAT  have_kref_sub
   COMPAT  have_cn_netlink_skb_parms
   COMPAT  have_idr_alloc
   CHK /var/lib/dkms/drbd/9.0.2-1ppa1~xenial1/build/src/drbd/compat.h
   UPD /var/lib/dkms/drbd/9.0.2-1ppa1~xenial1/build/src/drbd/compat.h
   CC [M] 
/var/lib/dkms/drbd/9.0.2-1ppa1~xenial1/build/src/drbd/drbd_debugfs.o
   CC [M] 
/var/lib/dkms/drbd/9.0.2-1ppa1~xenial1/build/src/drbd/drbd_bitmap.o
   CC [M] /var/lib/dkms/drbd/9.0.2-1ppa1~xenial1/build/src/drbd/drbd_proc.o
   CC [M] 
/var/lib/dkms/drbd/9.0.2-1ppa1~xenial1/build/src/drbd/drbd_sender.o
   CC [M] 
/var/lib/dkms/drbd/9.0.2-1ppa1~xenial1/build/src/drbd/drbd_receiver.o
   CC [M] /var/lib/dkms/drbd/9.0.2-1ppa1~xenial1/build/src/drbd/drbd_req.o
In file included from 
/var/lib/dkms/drbd/9.0.2-1ppa1~xenial1/build/src/drbd/drbd_int.h:50:0,
                  from 
/var/lib/dkms/drbd/9.0.2-1ppa1~xenial1/build/src/drbd/drbd_bitmap.c:35:
/var/lib/dkms/drbd/9.0.2-1ppa1~xenial1/build/src/drbd/drbd-kernel-compat/drbd_wrappers.h:1535:8: 
error: redefinition of ‘struct ib_cq_init_attr’
  struct ib_cq_init_attr {
         ^
In file included from 
/var/lib/dkms/drbd/9.0.2-1ppa1~xenial1/build/src/drbd/drbd-kernel-compat/drbd_wrappers.h:1533:0,
                  from 
/var/lib/dkms/drbd/9.0.2-1ppa1~xenial1/build/src/drbd/drbd_int.h:50,
                  from 
/var/lib/dkms/drbd/9.0.2-1ppa1~xenial1/build/src/drbd/drbd_bitmap.c:35:
/usr/src/linux-headers-4.5.0-2-common/include/rdma/ib_verbs.h:260:8: 
note: originally defined here
  struct ib_cq_init_attr {
         ^
In file included from 
/var/lib/dkms/drbd/9.0.2-1ppa1~xenial1/build/src/drbd/drbd_int.h:50:0,
                  from 
/var/lib/dkms/drbd/9.0.2-1ppa1~xenial1/build/src/drbd/drbd_bitmap.c:35:
/var/lib/dkms/drbd/9.0.2-1ppa1~xenial1/build/src/drbd/drbd-kernel-compat/drbd_wrappers.h: 
In function ‘drbd_ib_create_cq’:
/var/lib/dkms/drbd/9.0.2-1ppa1~xenial1/build/src/drbd/drbd-kernel-compat/drbd_wrappers.h:1549:8: 
warning: passing argument 5 of ‘ib_create_cq’ makes pointer from integer 
without a cast [-Wint-conversion]
         cq_attr->cqe, cq_attr->comp_vector);
         ^
In file included from 
/var/lib/dkms/drbd/9.0.2-1ppa1~xenial1/build/src/drbd/drbd-kernel-compat/drbd_wrappers.h:1533:0,
                  from 
/var/lib/dkms/drbd/9.0.2-1ppa1~xenial1/build/src/drbd/drbd_int.h:50,
                  from 
/var/lib/dkms/drbd/9.0.2-1ppa1~xenial1/build/src/drbd/drbd_bitmap.c:35:
/usr/src/linux-headers-4.5.0-2-common/include/rdma/ib_verbs.h:2557:15: 
note: expected ‘const struct ib_cq_init_attr *’ but argument is of type 
‘unsigned int’
  struct ib_cq *ib_create_cq(struct ib_device *device,
                ^
In file included from 
/var/lib/dkms/drbd/9.0.2-1ppa1~xenial1/build/src/drbd/drbd_int.h:50:0,
                  from 
/var/lib/dkms/drbd/9.0.2-1ppa1~xenial1/build/src/drbd/drbd_bitmap.c:35:
/var/lib/dkms/drbd/9.0.2-1ppa1~xenial1/build/src/drbd/drbd-kernel-compat/drbd_wrappers.h:1548:9: 
error: too many arguments to function ‘ib_create_cq’
   return ib_create_cq(device, comp_handler, event_handler, cq_context,
          ^
In file included from 
/var/lib/dkms/drbd/9.0.2-1ppa1~xenial1/build/src/drbd/drbd-kernel-compat/drbd_wrappers.h:1533:0,
                  from 
/var/lib/dkms/drbd/9.0.2-1ppa1~xenial1/build/src/drbd/drbd_int.h:50,
                  from 
/var/lib/dkms/drbd/9.0.2-1ppa1~xenial1/build/src/drbd/drbd_bitmap.c:35:
/usr/src/linux-headers-4.5.0-2-common/include/rdma/ib_verbs.h:2557:15: 
note: declared here
  struct ib_cq *ib_create_cq(struct ib_device *device,
                ^
In file included from 
/var/lib/dkms/drbd/9.0.2-1ppa1~xenial1/build/src/drbd/drbd_int.h:50:0,
                  from 
/var/lib/dkms/drbd/9.0.2-1ppa1~xenial1/build/src/drbd/drbd_debugfs.c:10:
/var/lib/dkms/drbd/9.0.2-1ppa1~xenial1/build/src/drbd/drbd-kernel-compat/drbd_wrappers.h:1535:8: 
error: redefinition of ‘struct ib_cq_init_attr’
  struct ib_cq_init_attr {
         ^
In file included from 
/var/lib/dkms/drbd/9.0.2-1ppa1~xenial1/build/src/drbd/drbd-kernel-compat/drbd_wrappers.h:1533:0,
                  from 
/var/lib/dkms/drbd/9.0.2-1ppa1~xenial1/build/src/drbd/drbd_int.h:50,
                  from 
/var/lib/dkms/drbd/9.0.2-1ppa1~xenial1/build/src/drbd/drbd_debugfs.c:10:
/usr/src/linux-headers-4.5.0-2-common/include/rdma/ib_verbs.h:260:8: 
note: originally defined here
  struct ib_cq_init_attr {
         ^
In file included from 
/var/lib/dkms/drbd/9.0.2-1ppa1~xenial1/build/src/drbd/drbd_int.h:50:0,
                  from 
/var/lib/dkms/drbd/9.0.2-1ppa1~xenial1/build/src/drbd/drbd_debugfs.c:10:
/var/lib/dkms/drbd/9.0.2-1ppa1~xenial1/build/src/drbd/drbd-kernel-compat/drbd_wrappers.h: 
In function ‘drbd_ib_create_cq’:
/var/lib/dkms/drbd/9.0.2-1ppa1~xenial1/build/src/drbd/drbd-kernel-compat/drbd_wrappers.h:1549:8: 
warning: passing argument 5 of ‘ib_create_cq’ makes pointer from integer 
without a cast [-Wint-conversion]
         cq_attr->cqe, cq_attr->comp_vector);
         ^
In file included from 
/var/lib/dkms/drbd/9.0.2-1ppa1~xenial1/build/src/drbd/drbd-kernel-compat/drbd_wrappers.h:1533:0,
                  from 
/var/lib/dkms/drbd/9.0.2-1ppa1~xenial1/build/src/drbd/drbd_int.h:50,
                  from 
/var/lib/dkms/drbd/9.0.2-1ppa1~xenial1/build/src/drbd/drbd_debugfs.c:10:
/usr/src/linux-headers-4.5.0-2-common/include/rdma/ib_verbs.h:2557:15: 
note: expected ‘const struct ib_cq_init_attr *’ but argument is of type 
‘unsigned int’
  struct ib_cq *ib_create_cq(struct ib_device *device,
                ^
In file included from 
/var/lib/dkms/drbd/9.0.2-1ppa1~xenial1/build/src/drbd/drbd_int.h:50:0,
                  from 
/var/lib/dkms/drbd/9.0.2-1ppa1~xenial1/build/src/drbd/drbd_debugfs.c:10:
/var/lib/dkms/drbd/9.0.2-1ppa1~xenial1/build/src/drbd/drbd-kernel-compat/drbd_wrappers.h:1548:9: 
error: too many arguments to function ‘ib_create_cq’
   return ib_create_cq(device, comp_handler, event_handler, cq_context,
          ^
In file included from 
/var/lib/dkms/drbd/9.0.2-1ppa1~xenial1/build/src/drbd/drbd-kernel-compat/drbd_wrappers.h:1533:0,
                  from 
/var/lib/dkms/drbd/9.0.2-1ppa1~xenial1/build/src/drbd/drbd_int.h:50,
                  from 
/var/lib/dkms/drbd/9.0.2-1ppa1~xenial1/build/src/drbd/drbd_debugfs.c:10:
/usr/src/linux-headers-4.5.0-2-common/include/rdma/ib_verbs.h:2557:15: 
note: declared here
  struct ib_cq *ib_create_cq(struct ib_device *device,
                ^
In file included from 
/var/lib/dkms/drbd/9.0.2-1ppa1~xenial1/build/src/drbd/drbd_int.h:50:0,
                  from 
/var/lib/dkms/drbd/9.0.2-1ppa1~xenial1/build/src/drbd/drbd_receiver.c:45:
/var/lib/dkms/drbd/9.0.2-1ppa1~xenial1/build/src/drbd/drbd-kernel-compat/drbd_wrappers.h:1535:8: 
error: redefinition of ‘struct ib_cq_init_attr’
  struct ib_cq_init_attr {
         ^
In file included from 
/var/lib/dkms/drbd/9.0.2-1ppa1~xenial1/build/src/drbd/drbd-kernel-compat/drbd_wrappers.h:1533:0,
                  from 
/var/lib/dkms/drbd/9.0.2-1ppa1~xenial1/build/src/drbd/drbd_int.h:50,
                  from 
/var/lib/dkms/drbd/9.0.2-1ppa1~xenial1/build/src/drbd/drbd_receiver.c:45:
/usr/src/linux-headers-4.5.0-2-common/include/rdma/ib_verbs.h:260:8: 
note: originally defined here
  struct ib_cq_init_attr {
         ^
In file included from 
/var/lib/dkms/drbd/9.0.2-1ppa1~xenial1/build/src/drbd/drbd_int.h:50:0,
                  from 
/var/lib/dkms/drbd/9.0.2-1ppa1~xenial1/build/src/drbd/drbd_receiver.c:45:
/var/lib/dkms/drbd/9.0.2-1ppa1~xenial1/build/src/drbd/drbd-kernel-compat/drbd_wrappers.h: 
In function ‘drbd_ib_create_cq’:
/var/lib/dkms/drbd/9.0.2-1ppa1~xenial1/build/src/drbd/drbd-kernel-compat/drbd_wrappers.h:1549:8: 
warning: passing argument 5 of ‘ib_create_cq’ makes pointer from integer 
without a cast [-Wint-conversion]
         cq_attr->cqe, cq_attr->comp_vector);
         ^
In file included from 
/var/lib/dkms/drbd/9.0.2-1ppa1~xenial1/build/src/drbd/drbd_int.h:50:0,
                  from 
/var/lib/dkms/drbd/9.0.2-1ppa1~xenial1/build/src/drbd/drbd_req.c:30:
/var/lib/dkms/drbd/9.0.2-1ppa1~xenial1/build/src/drbd/drbd-kernel-compat/drbd_wrappers.h:1535:8: 
error: redefinition of ‘struct ib_cq_init_attr’
  struct ib_cq_init_attr {
         ^
In file included from 
/var/lib/dkms/drbd/9.0.2-1ppa1~xenial1/build/src/drbd/drbd-kernel-compat/drbd_wrappers.h:1533:0,
                  from 
/var/lib/dkms/drbd/9.0.2-1ppa1~xenial1/build/src/drbd/drbd_int.h:50,
                  from 
/var/lib/dkms/drbd/9.0.2-1ppa1~xenial1/build/src/drbd/drbd_receiver.c:45:
/usr/src/linux-headers-4.5.0-2-common/include/rdma/ib_verbs.h:2557:15: 
note: expected ‘const struct ib_cq_init_attr *’ but argument is of type 
‘unsigned int’
  struct ib_cq *ib_create_cq(struct ib_device *device,
                ^
In file included from 
/var/lib/dkms/drbd/9.0.2-1ppa1~xenial1/build/src/drbd/drbd_int.h:50:0,
                  from 
/var/lib/dkms/drbd/9.0.2-1ppa1~xenial1/build/src/drbd/drbd_receiver.c:45:
/var/lib/dkms/drbd/9.0.2-1ppa1~xenial1/build/src/drbd/drbd-kernel-compat/drbd_wrappers.h:1548:9: 
error: too many arguments to function ‘ib_create_cq’
   return ib_create_cq(device, comp_handler, event_handler, cq_context,
          ^
In file included from 
/var/lib/dkms/drbd/9.0.2-1ppa1~xenial1/build/src/drbd/drbd-kernel-compat/drbd_wrappers.h:1533:0,
                  from 
/var/lib/dkms/drbd/9.0.2-1ppa1~xenial1/build/src/drbd/drbd_int.h:50,
                  from 
/var/lib/dkms/drbd/9.0.2-1ppa1~xenial1/build/src/drbd/drbd_receiver.c:45:
/usr/src/linux-headers-4.5.0-2-common/include/rdma/ib_verbs.h:2557:15: 
note: declared here
  struct ib_cq *ib_create_cq(struct ib_device *device,
                ^
In file included from 
/var/lib/dkms/drbd/9.0.2-1ppa1~xenial1/build/src/drbd/drbd-kernel-compat/drbd_wrappers.h:1533:0,
                  from 
/var/lib/dkms/drbd/9.0.2-1ppa1~xenial1/build/src/drbd/drbd_int.h:50,
                  from 
/var/lib/dkms/drbd/9.0.2-1ppa1~xenial1/build/src/drbd/drbd_req.c:30:
/usr/src/linux-headers-4.5.0-2-common/include/rdma/ib_verbs.h:260:8: 
note: originally defined here
  struct ib_cq_init_attr {
         ^
In file included from 
/var/lib/dkms/drbd/9.0.2-1ppa1~xenial1/build/src/drbd/drbd_int.h:50:0,
                  from 
/var/lib/dkms/drbd/9.0.2-1ppa1~xenial1/build/src/drbd/drbd_req.c:30:
/var/lib/dkms/drbd/9.0.2-1ppa1~xenial1/build/src/drbd/drbd-kernel-compat/drbd_wrappers.h: 
In function ‘drbd_ib_create_cq’:
/var/lib/dkms/drbd/9.0.2-1ppa1~xenial1/build/src/drbd/drbd-kernel-compat/drbd_wrappers.h:1549:8: 
warning: passing argument 5 of ‘ib_create_cq’ makes pointer from integer 
without a cast [-Wint-conversion]
         cq_attr->cqe, cq_attr->comp_vector);
         ^
In file included from 
/var/lib/dkms/drbd/9.0.2-1ppa1~xenial1/build/src/drbd/drbd-kernel-compat/drbd_wrappers.h:1533:0,
                  from 
/var/lib/dkms/drbd/9.0.2-1ppa1~xenial1/build/src/drbd/drbd_int.h:50,
                  from 
/var/lib/dkms/drbd/9.0.2-1ppa1~xenial1/build/src/drbd/drbd_req.c:30:
/usr/src/linux-headers-4.5.0-2-common/include/rdma/ib_verbs.h:2557:15: 
note: expected ‘const struct ib_cq_init_attr *’ but argument is of type 
‘unsigned int’
  struct ib_cq *ib_create_cq(struct ib_device *device,
                ^
In file included from 
/var/lib/dkms/drbd/9.0.2-1ppa1~xenial1/build/src/drbd/drbd_int.h:50:0,
                  from 
/var/lib/dkms/drbd/9.0.2-1ppa1~xenial1/build/src/drbd/drbd_req.c:30:
/var/lib/dkms/drbd/9.0.2-1ppa1~xenial1/build/src/drbd/drbd-kernel-compat/drbd_wrappers.h:1548:9: 
error: too many arguments to function ‘ib_create_cq’
   return ib_create_cq(device, comp_handler, event_handler, cq_context,
          ^
In file included from 
/var/lib/dkms/drbd/9.0.2-1ppa1~xenial1/build/src/drbd/drbd-kernel-compat/drbd_wrappers.h:1533:0,
                  from 
/var/lib/dkms/drbd/9.0.2-1ppa1~xenial1/build/src/drbd/drbd_int.h:50,
                  from 
/var/lib/dkms/drbd/9.0.2-1ppa1~xenial1/build/src/drbd/drbd_req.c:30:
/usr/src/linux-headers-4.5.0-2-common/include/rdma/ib_verbs.h:2557:15: 
note: declared here
  struct ib_cq *ib_create_cq(struct ib_device *device,
                ^
In file included from 
/var/lib/dkms/drbd/9.0.2-1ppa1~xenial1/build/src/drbd/drbd_int.h:50:0,
                  from 
/var/lib/dkms/drbd/9.0.2-1ppa1~xenial1/build/src/drbd/drbd_proc.c:34:
/var/lib/dkms/drbd/9.0.2-1ppa1~xenial1/build/src/drbd/drbd-kernel-compat/drbd_wrappers.h:1535:8: 
error: redefinition of ‘struct ib_cq_init_attr’
  struct ib_cq_init_attr {
         ^
In file included from 
/var/lib/dkms/drbd/9.0.2-1ppa1~xenial1/build/src/drbd/drbd-kernel-compat/drbd_wrappers.h:1533:0,
                  from 
/var/lib/dkms/drbd/9.0.2-1ppa1~xenial1/build/src/drbd/drbd_int.h:50,
                  from 
/var/lib/dkms/drbd/9.0.2-1ppa1~xenial1/build/src/drbd/drbd_proc.c:34:
/usr/src/linux-headers-4.5.0-2-common/include/rdma/ib_verbs.h:260:8: 
note: originally defined here
  struct ib_cq_init_attr {
         ^
In file included from 
/var/lib/dkms/drbd/9.0.2-1ppa1~xenial1/build/src/drbd/drbd_int.h:50:0,
                  from 
/var/lib/dkms/drbd/9.0.2-1ppa1~xenial1/build/src/drbd/drbd_proc.c:34:
/var/lib/dkms/drbd/9.0.2-1ppa1~xenial1/build/src/drbd/drbd-kernel-compat/drbd_wrappers.h: 
In function ‘drbd_ib_create_cq’:
/var/lib/dkms/drbd/9.0.2-1ppa1~xenial1/build/src/drbd/drbd-kernel-compat/drbd_wrappers.h:1549:8: 
warning: passing argument 5 of ‘ib_create_cq’ makes pointer from integer 
without a cast [-Wint-conversion]
         cq_attr->cqe, cq_attr->comp_vector);
         ^
In file included from 
/var/lib/dkms/drbd/9.0.2-1ppa1~xenial1/build/src/drbd/drbd-kernel-compat/drbd_wrappers.h:1533:0,
                  from 
/var/lib/dkms/drbd/9.0.2-1ppa1~xenial1/build/src/drbd/drbd_int.h:50,
                  from 
/var/lib/dkms/drbd/9.0.2-1ppa1~xenial1/build/src/drbd/drbd_proc.c:34:
/usr/src/linux-headers-4.5.0-2-common/include/rdma/ib_verbs.h:2557:15: 
note: expected ‘const struct ib_cq_init_attr *’ but argument is of type 
‘unsigned int’
  struct ib_cq *ib_create_cq(struct ib_device *device,
                ^
In file included from 
/var/lib/dkms/drbd/9.0.2-1ppa1~xenial1/build/src/drbd/drbd_int.h:50:0,
                  from 
/var/lib/dkms/drbd/9.0.2-1ppa1~xenial1/build/src/drbd/drbd_proc.c:34:
/var/lib/dkms/drbd/9.0.2-1ppa1~xenial1/build/src/drbd/drbd-kernel-compat/drbd_wrappers.h:1548:9: 
error: too many arguments to function ‘ib_create_cq’
   return ib_create_cq(device, comp_handler, event_handler, cq_context,
          ^
In file included from 
/var/lib/dkms/drbd/9.0.2-1ppa1~xenial1/build/src/drbd/drbd-kernel-compat/drbd_wrappers.h:1533:0,
                  from 
/var/lib/dkms/drbd/9.0.2-1ppa1~xenial1/build/src/drbd/drbd_int.h:50,
                  from 
/var/lib/dkms/drbd/9.0.2-1ppa1~xenial1/build/src/drbd/drbd_proc.c:34:
/usr/src/linux-headers-4.5.0-2-common/include/rdma/ib_verbs.h:2557:15: 
note: declared here
  struct ib_cq *ib_create_cq(struct ib_device *device,
                ^
In file included from 
/var/lib/dkms/drbd/9.0.2-1ppa1~xenial1/build/src/drbd/drbd_int.h:50:0,
                  from 
/var/lib/dkms/drbd/9.0.2-1ppa1~xenial1/build/src/drbd/drbd_sender.c:37:
/var/lib/dkms/drbd/9.0.2-1ppa1~xenial1/build/src/drbd/drbd-kernel-compat/drbd_wrappers.h:1535:8: 
error: redefinition of ‘struct ib_cq_init_attr’
  struct ib_cq_init_attr {
         ^
In file included from 
/var/lib/dkms/drbd/9.0.2-1ppa1~xenial1/build/src/drbd/drbd-kernel-compat/drbd_wrappers.h:1533:0,
                  from 
/var/lib/dkms/drbd/9.0.2-1ppa1~xenial1/build/src/drbd/drbd_int.h:50,
                  from 
/var/lib/dkms/drbd/9.0.2-1ppa1~xenial1/build/src/drbd/drbd_sender.c:37:
/usr/src/linux-headers-4.5.0-2-common/include/rdma/ib_verbs.h:260:8: 
note: originally defined here
  struct ib_cq_init_attr {
         ^
In file included from 
/var/lib/dkms/drbd/9.0.2-1ppa1~xenial1/build/src/drbd/drbd_int.h:50:0,
                  from 
/var/lib/dkms/drbd/9.0.2-1ppa1~xenial1/build/src/drbd/drbd_sender.c:37:
/var/lib/dkms/drbd/9.0.2-1ppa1~xenial1/build/src/drbd/drbd-kernel-compat/drbd_wrappers.h: 
In function ‘drbd_ib_create_cq’:
/var/lib/dkms/drbd/9.0.2-1ppa1~xenial1/build/src/drbd/drbd-kernel-compat/drbd_wrappers.h:1549:8: 
warning: passing argument 5 of ‘ib_create_cq’ makes pointer from integer 
without a cast [-Wint-conversion]
         cq_attr->cqe, cq_attr->comp_vector);
         ^
In file included from 
/var/lib/dkms/drbd/9.0.2-1ppa1~xenial1/build/src/drbd/drbd-kernel-compat/drbd_wrappers.h:1533:0,
                  from 
/var/lib/dkms/drbd/9.0.2-1ppa1~xenial1/build/src/drbd/drbd_int.h:50,
                  from 
/var/lib/dkms/drbd/9.0.2-1ppa1~xenial1/build/src/drbd/drbd_sender.c:37:
/usr/src/linux-headers-4.5.0-2-common/include/rdma/ib_verbs.h:2557:15: 
note: expected ‘const struct ib_cq_init_attr *’ but argument is of type 
‘unsigned int’
  struct ib_cq *ib_create_cq(struct ib_device *device,
                ^
In file included from 
/var/lib/dkms/drbd/9.0.2-1ppa1~xenial1/build/src/drbd/drbd_int.h:50:0,
                  from 
/var/lib/dkms/drbd/9.0.2-1ppa1~xenial1/build/src/drbd/drbd_sender.c:37:
/var/lib/dkms/drbd/9.0.2-1ppa1~xenial1/build/src/drbd/drbd-kernel-compat/drbd_wrappers.h:1548:9: 
error: too many arguments to function ‘ib_create_cq’
   return ib_create_cq(device, comp_handler, event_handler, cq_context,
          ^
In file included from 
/var/lib/dkms/drbd/9.0.2-1ppa1~xenial1/build/src/drbd/drbd-kernel-compat/drbd_wrappers.h:1533:0,
                  from 
/var/lib/dkms/drbd/9.0.2-1ppa1~xenial1/build/src/drbd/drbd_int.h:50,
                  from 
/var/lib/dkms/drbd/9.0.2-1ppa1~xenial1/build/src/drbd/drbd_sender.c:37:
/usr/src/linux-headers-4.5.0-2-common/include/rdma/ib_verbs.h:2557:15: 
note: declared here
  struct ib_cq *ib_create_cq(struct ib_device *device,
                ^
/usr/src/linux-headers-4.5.0-2-common/scripts/Makefile.build:263: recipe 
for target 
'/var/lib/dkms/drbd/9.0.2-1ppa1~xenial1/build/src/drbd/drbd_proc.o' failed
make[4]: *** 
[/var/lib/dkms/drbd/9.0.2-1ppa1~xenial1/build/src/drbd/drbd_proc.o] Error 1
make[4]: *** Waiting for unfinished jobs....
/usr/src/linux-headers-4.5.0-2-common/scripts/Makefile.build:263: recipe 
for target 
'/var/lib/dkms/drbd/9.0.2-1ppa1~xenial1/build/src/drbd/drbd_debugfs.o' 
failed
make[4]: *** 
[/var/lib/dkms/drbd/9.0.2-1ppa1~xenial1/build/src/drbd/drbd_debugfs.o] 
Error 1
/usr/src/linux-headers-4.5.0-2-common/scripts/Makefile.build:263: recipe 
for target 
'/var/lib/dkms/drbd/9.0.2-1ppa1~xenial1/build/src/drbd/drbd_bitmap.o' failed
make[4]: *** 
[/var/lib/dkms/drbd/9.0.2-1ppa1~xenial1/build/src/drbd/drbd_bitmap.o] 
Error 1
/usr/src/linux-headers-4.5.0-2-common/scripts/Makefile.build:263: recipe 
for target 
'/var/lib/dkms/drbd/9.0.2-1ppa1~xenial1/build/src/drbd/drbd_req.o' failed
make[4]: *** 
[/var/lib/dkms/drbd/9.0.2-1ppa1~xenial1/build/src/drbd/drbd_req.o] Error 1
/usr/src/linux-headers-4.5.0-2-common/scripts/Makefile.build:263: recipe 
for target 
'/var/lib/dkms/drbd/9.0.2-1ppa1~xenial1/build/src/drbd/drbd_sender.o' failed
make[4]: *** 
[/var/lib/dkms/drbd/9.0.2-1ppa1~xenial1/build/src/drbd/drbd_sender.o] 
Error 1
/usr/src/linux-headers-4.5.0-2-common/scripts/Makefile.build:263: recipe 
for target 
'/var/lib/dkms/drbd/9.0.2-1ppa1~xenial1/build/src/drbd/drbd_receiver.o' 
failed
make[4]: *** 
[/var/lib/dkms/drbd/9.0.2-1ppa1~xenial1/build/src/drbd/drbd_receiver.o] 
Error 1
/usr/src/linux-headers-4.5.0-2-common/Makefile:1408: recipe for target 
'_module_/var/lib/dkms/drbd/9.0.2-1ppa1~xenial1/build/src/drbd' failed
make[3]: *** 
[_module_/var/lib/dkms/drbd/9.0.2-1ppa1~xenial1/build/src/drbd] Error 2
Makefile:146: recipe for target 'sub-make' failed
make[2]: *** [sub-make] Error 2
Makefile:8: recipe for target 'all' failed
make[1]: *** [all] Error 2
Makefile:103: recipe for target 'kbuild' failed
make: *** [kbuild] Error 2
make: Leaving directory 
'/var/lib/dkms/drbd/9.0.2-1ppa1~xenial1/build/src/drbd'


Equally, I seem to get a very similar error when using the latest git 
checkout and compile. Can anyone suggest what I might have done wrong, 
or is a code update needed for this to work?

# uname -an
Linux xen6 4.5.0-2-amd64 #1 SMP Debian 4.5.4-1 (2016-05-16) x86_64 GNU/Linux

Thanks,
Adam



More information about the drbd-user mailing list