Skip to content

Error when compiling Driver with DKMS #1

Description

@v01ded

Getting the following errors when compiling the driver. My setup:

uname -r
5.4.0-0.bpo.4-amd64

Tried the temporary workaround suggested here:

Just a temporary workaround, but you can still compile and install the driver if you add the following line to the top of the Makefile:
USER_EXTRA_CFLAGS=-Wno-error=incompatible-pointer-types

Make[2]:` *** [/usr/src/linux-headers-5.4.0-0.bpo.4-common/Makefile:1665: /var/lib/dkms/rtl8821CU/5.8.1/build] Error 2
make[1]: *** [/usr/src/linux-headers-5.4.0-0.bpo.4-common/Makefile:179: sub-make] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-5.4.0-0.bpo.4-amd64'
make: *** [Makefile:2336: modules] Error 2
/var/lib/dkms/rtl8821CU/5.8.1/build/os_dep/linux/os_intfs.c:1707:22: error: initialization of ‘u16 (*)(struct net_device *, struct sk_buff *, struct net_device *)’ {aka ‘short unsigned int (*)(struct net_device *, struct sk_buff *, struct net_device *)’} from incompatible pointer type ‘u16 (*)(struct net_device *, struct sk_buff *, struct net_device *, u16 (*)(struct net_device *, struct sk_buff *, struct net_device *))’ {aka ‘short unsigned int (*)(struct net_device *, struct sk_buff *, struct net_device *, short unsigned int (*)(struct net_device *, struct sk_buff *, struct net_device *))’} [-Werror=incompatible-pointer-types]
  .ndo_select_queue = rtw_select_queue,
                      ^~~~~~~~~~~~~~~~
/var/lib/dkms/rtl8821CU/5.8.1/build/os_dep/linux/os_intfs.c:1707:22: note: (near initialization for ‘rtw_netdev_ops.ndo_select_queue’)
/var/lib/dkms/rtl8821CU/5.8.1/build/os_dep/linux/os_intfs.c:3058:22: error: initialization of ‘u16 (*)(struct net_device *, struct sk_buff *, struct net_device *)’ {aka ‘short unsigned int (*)(struct net_device *, struct sk_buff *, struct net_device *)’} from incompatible pointer type ‘u16 (*)(struct net_device *, struct sk_buff *, struct net_device *, u16 (*)(struct net_device *, struct sk_buff *, struct net_device *))’ {aka ‘short unsigned int (*)(struct net_device *, struct sk_buff *, struct net_device *, short unsigned int (*)(struct net_device *, struct sk_buff *, struct net_device *))’} [-Werror=incompatible-pointer-types]
  .ndo_select_queue = rtw_select_queue,
                      ^~~~~~~~~~~~~~~~
/var/lib/dkms/rtl8821CU/5.8.1/build/os_dep/linux/os_intfs.c:3058:22: note: (near initialization for ‘rtw_netdev_vir_if_ops.ndo_select_queue’)
  CC [M]  /var/lib/dkms/rtl8821CU/5.8.1/build/os_dep/linux/usb_ops_linux.o
cc1: some warnings being treated as errors
make[3]: *** [/usr/src/linux-headers-5.4.0-0.bpo.4-common/scripts/Makefile.build:271: /var/lib/dkms/rtl8821CU/5.8.1/build/os_dep/linux/os_intfs.o] Error 1
make[3]: *** Waiting for unfinished jobs....
make[2]: *** [/usr/src/linux-headers-5.4.0-0.bpo.4-common/Makefile:1665: /var/lib/dkms/rtl8821CU/5.8.1/build] Error 2
make[1]: *** [/usr/src/linux-headers-5.4.0-0.bpo.4-common/Makefile:179: sub-make] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-5.4.0-0.bpo.4-amd64'
make: *** [Makefile:2336: modules] Error 2

Any idea to relve this issue will be very much appreciated! :)

Stay safe and healthy.
Stanley

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions