rtl88x2BU_WiFi_linux_v5.2.4.4_26334.20180126_COEX20171012-5044
rtl88x2BU_WiFi_linux_v5.2.4.4_26334.20180126_COEX20171012-5044 copied to clipboard
Unable to build driver
When trying to build the driver it aborts with the following error in the log:
/var/lib/dkms/rtl88x2bu/5.2.4.4/build/hal/hal:hci/hal_usb.c:28:8: error: cast between incompatible function types from 'void (*)(void *)' to 'void (*) (long unsigned int)' [-Werror=cast function type]
(void(*)(unsigned long))usb_revc_tasklet,
I'm running Fedora 28 with Linux 4.17.12
Can you provide the entire build log, please?
Sure thing, there you go and thanks for taking the time: https://pastebin.com/yetrUFHi
Thanks -- I'll do some digging. I found someone else with the same issue on 4.17.5-1-zen (x86_64)
.
http://pastebin.calculate-linux.org/ru/show/63918
It's interesting because it builds clean for me on Debian's 4.17.8-1
. I'll ping back here if I come up with anything useful.
Thanks. Could it be because of the newer Kernel? 4.17.12-200.fc28
vs 4.17.8-1
Normally, I'd say yes, but the fact that someone with 4.17.5-1-zen
is running into the exact same error as you makes it tricky. The issue looks to be some complication around a void pointer. I'm looking around to see if anything has changed around that stuff recently and if maybe some vendors have patched early or held off.
What version of gcc
are you using?
I'm using gcc version 8.1.1 20180712 (Red Hat 8.1.1-5) (GCC)
Any news on that front?
I'm asking because I could still refund this WiFi stick and if it stays unusable I probably will.
This is not an error but an warning. It fails to compile only due to the -Werror flag. The compile should work if you comment out the line containing -Werror in the Makefile.
I could imagine that the problem arises due to different kernel patches applied by different distributions. On my system, the tasklet_init function seems to be defined in
/usr/src/linux-headers-4.17.0-3-common/include/linux/interrupt.h
and the signature is
extern void tasklet_init(struct tasklet_struct *t, void (*func)(unsigned long), unsigned long data)
which is the appropriate typing for the usage in hal_usb.c. Maybe you could check your interrupt.h. Then, at least, we would know the source of the error.
Thanks for your response, but as mentioned above I've already sent the stick back and picked a new one with an Artheros chipset.
/usr/src/rtl88x2bu-5.2.4.4/hal/hal_hci/hal_usb.c: In function ‘usb_init_recv_priv’: /usr/src/rtl88x2bu-5.2.4.4/hal/hal_hci/hal_usb.c:28:8: warning: cast between incompatible function types from ‘void ()(void )’ to ‘void ()(long unsigned int)’ [-Wcast-function-type] (void()(unsigned long))usb_recv_tasklet, ^
/usr/src/rtl88x2bu-5.2.4.4/hal/rtl8822b/usb/rtl8822bu_xmit.c: In function ‘rtl8822bu_init_xmit_priv’: /usr/src/rtl88x2bu-5.2.4.4/hal/rtl8822b/usb/rtl8822bu_xmit.c:843:8: warning: cast between incompatible function types from ‘void ()(void )’ to ‘void ()(long unsigned int)’ [-Wcast-function-type] (void()(unsigned long))rtl8822bu_xmit_tasklet, ^
tasklet_init from "/usr/src/linux-headers-4.18.0-10/include/linux/interrupt.h":
extern void tasklet_init(struct tasklet_struct *t, void (*func)(unsigned long), unsigned long data);
Ubuntu 18.10 gcc version 8.2.0 (Ubuntu 8.2.0-7ubuntu1)
I think #3 and #5 are about the same problem.
I have Ubuntu 18.10 and kernel 4.18.0-11 and using @MaxG87's suggestion of commenting out the line containing -Werror in the Makefile I was able to build and install the module successfully. After a reboot and logging in I plugged it in and now it is working again! Thank you sir.