Build fails on openSUSE Leap 15.5
tbetker opened this issue · comments
I am running openSUSE Leap 15.5 with a 5.14.21 kernel, and I was testing a TP-Link Archer T2U(EU) Ver 3.0. There is an openSUSE package rtl8812au, but it is based on https://github.com/morrownr/8812au-20210629 and does not support my WLAN stick (USB 2357:011f, AC600).
"sudo make dkms_install" (at commit 04f600e, 23-Jul-2023) failed with "error: redefinition of ‘eth_hw_addr_set’.
The reason for this is that one of the many, many openSUSE patches for the 5.14 kernel (patches.suse/net-create-netdev-dev_addr-assignment-helpers.patch) adds eth_hw_addr_set() to include/linux/etherdevice.h. Apparently, this started in the openSUSE kernel 5.14.19.
So I applied the following fix to include/drv_types_linux.h:
-#if (LINUX_VERSION_CODE < KERNEL_VERSION(5, 15, 0))
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(5, 15, 0)) && \
+(!defined(CONFIG_SUSE_KERNEL) || (LINUX_VERSION_CODE < KERNEL_VERSION(5, 14, 19)))
With this fix, rtl8812au compiled successfully ("dkms install" complained of an unrecognized option '--no-initramfs', but the module was installed anyway). My WLAN stick seemed to work fine with it.
I am not sure if my fix really belongs into your driver, and I can understand if you drop the issue right away -- I am not even using the Archer T2U anymore. However, I am documenting this here just in case that somebody else running openSUSE may stumble over it.
Same error occurs on Debian 11 (5.10.0-26-686-pae)
Commenting out redefinition of eth_hw_addr_set
in include/drv_types_linux.h
resolves the error