RTL88x2BU-Linux-Driver icon indicating copy to clipboard operation
RTL88x2BU-Linux-Driver copied to clipboard

Can't compile

Open sitaro opened this issue 4 years ago • 8 comments

Hello, on compile I got this Error:

/root/RTL88x2BU-Linux-Driver/os_dep/linux/os_intfs.c:1715:22: error: initialization of ‘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 ))’} from incompatible pointer type ‘u16 ()(struct net_device *, struct sk_buff *, void , u16 ()(struct net_device *, struct sk_buff *, struct net_device ))’ {aka ‘short unsigned int ()(struct net_device *, struct sk_buff *, void , short unsigned int ()(struct net_device *, struct sk_buff *, struct net_device *))’} [-Werror=incompatible-pointer-types] .ndo_select_queue = rtw_select_queue,

System is CentOS 8.3.2011 Compiler is gcc-8.3.1

Thanks

sitaro avatar Dec 30 '20 10:12 sitaro

Hi, what is the kernel version?

RinCat avatar Dec 30 '20 21:12 RinCat

Have the same problem on CentOS 8 with kernel 4.18.0-240.el8.x86_64.

Looks like problem is with backport in the kernel. see discussion here. I made the changes in the patch. There is another place in rtw_android.c with a similar problem. After that, the driver compiles fine but crashed after the usb wireless dongle is plugged in. Haven't tried the driver here yet.

iplasma avatar Dec 31 '20 08:12 iplasma

Seems this https://github.com/RinCat/RTL88x2BU-Linux-Driver/commit/9f94efd6b0ea7bce67781ba4a424d4d7befd2cd1, you need change 4.19 to 4.18 since this is backport.

And I cannot put this in the driver because this is distribution backport, you need find out what they did and change the preprocess kernel version.

RinCat avatar Dec 31 '20 08:12 RinCat

Thanks, try your suggestion and the driver here compiles but still crashes. Switch to 5.10.4-1.el8.elrepo.x86_64 kernel from elrepo and now it works.

iplasma avatar Dec 31 '20 18:12 iplasma

hi @iplasma, what configuration you used to compile with elrepo kernel? I tried, but it always fails with unavailability of kernel headers (which is not possible to install with elrepo, only using original distribution).

bagustris avatar Apr 07 '21 07:04 bagustris

@RinCat Can you please check this? https://github.com/Mange/rtl8192eu-linux-driver/pull/232

It use RHEL_RELEASE_CODE to not break compilation on mainline kernels

CGarces avatar Apr 07 '21 08:04 CGarces

@CGarces I know that exists, but I prefer not add any distribution specific patches, as I can't check if each kernel in each distribution backports a certain patch. The easiest way is to manually modify the kernel version macro if you run into this, KERNEL_VERSION(4, 19, 0) to KERNEL_VERSION(4, 18, 0).

RinCat avatar Apr 07 '21 17:04 RinCat

Success on Centos 8 (stream), as it fails to compile on default kernel what I done, first enabled elrepo repository, next installed kernel 5.4.135-1, make, make install, reboot....it works very nice. Thank you!

mrlee14 avatar Jul 28 '21 10:07 mrlee14