aircrack-ng / rtl8812au

RTL8812AU/21AU and RTL8814AU driver with monitor mode and frame injection
GNU General Public License v2.0
3.4k stars 749 forks source link

DKMS error compiling rtl8812au-5.6.4.2 from kernel 5.14.0-340.el9.x86_64 and 4.18.0-500.el8.x86_64 #1098

Open alexzh16 opened 11 months ago

alexzh16 commented 11 months ago

Hi,

I'm trying to compile the driver rtl8812au-5.6.4.2 for kernel 5.14.0-340.el9.x86_64 Centos 9 into the DKMS system and I get the next errors:

DKMS make.log for 8812au-5.6.4.2_35491.20191025 for kernel 5.14.0-340.el9.x86_64 (x86_64) Wed Jul 26 01:29:07 PM CEST 2023 make[1]: Entering directory '/var/lib/dkms/8812au/5.6.4.2_35491.20191025/build' make ARCH=x86_64 CROSS_COMPILE= -C /lib/modules/5.14.0-340.el9.x86_64/build M=/var/lib/dkms/8812au/5.6.4.2_35491.20191025/build modules make[2]: Entering directory '/usr/src/kernels/5.14.0-340.el9.x86_64' CC [M] /var/lib/dkms/8812au/5.6.4.2_35491.20191025/build/core/rtw_cmd.o CC [M] /var/lib/dkms/8812au/5.6.4.2_35491.20191025/build/core/rtw_security.o In file included from /var/lib/dkms/8812au/5.6.4.2_35491.20191025/build/include/drv_types.h:37, from /var/lib/dkms/8812au/5.6.4.2_35491.20191025/build/core/rtw_security.c:17: /var/lib/dkms/8812au/5.6.4.2_35491.20191025/build/include/drv_types_linux.h:20:20: error: redefinition of ‘eth_hw_addr_set’ 20 | static inline void eth_hw_addr_set(struct net_device dev, const u8 addr) | ^~~~~~~ In file included from /var/lib/dkms/8812au/5.6.4.2_35491.20191025/build/include/osdep_service_linux.h:49, from /var/lib/dkms/8812au/5.6.4.2_35491.20191025/build/include/osdep_service.h:58, from /var/lib/dkms/8812au/5.6.4.2_35491.20191025/build/include/drv_types.h:26, from /var/lib/dkms/8812au/5.6.4.2_35491.20191025/build/core/rtw_security.c:17: ./include/linux/etherdevice.h:314:20: note: previous definition of ‘eth_hw_addr_set’ with type ‘void(struct net_device , const u8 )’ {aka ‘void(struct net_device , const unsigned char )’} 314 | static inline void eth_hw_addr_set(struct net_device dev, const u8 addr) | ^~~~~~~

manual make error:

make ARCH=x86_64 CROSS_COMPILE= -C /lib/modules/5.14.0-340.el9.x86_64/build M=/opt/rtl8812au modules make[1]: Entering directory '/usr/src/kernels/5.14.0-340.el9.x86_64' CC [M] /opt/rtl8812au/core/rtw_cmd.o In file included from /opt/rtl8812au/include/drv_types.h:37, from /opt/rtl8812au/core/rtw_cmd.c:17: /opt/rtl8812au/include/drv_types_linux.h:20:20: error: redefinition of ‘eth_hw_addr_set’ 20 | static inline void eth_hw_addr_set(struct net_device dev, const u8 addr) | ^~~~~~~ In file included from /opt/rtl8812au/include/osdep_service_linux.h:49, from /opt/rtl8812au/include/osdep_service.h:58, from /opt/rtl8812au/include/drv_types.h:26, from /opt/rtl8812au/core/rtw_cmd.c:17: ./include/linux/etherdevice.h:314:20: note: previous definition of ‘eth_hw_addr_set’ with type ‘void(struct net_device , const u8 )’ {aka ‘void(struct net_device , const unsigned char )’} 314 | static inline void eth_hw_addr_set(struct net_device dev, const u8 addr) | ^~~~~~~ make[2]: [scripts/Makefile.build:298: /opt/rtl8812au/core/rtw_cmd.o] Error 1 make[1]: [Makefile:1928: /opt/rtl8812au] Error 2 make[1]: Leaving directory '/usr/src/kernels/5.14.0-340.el9.x86_64' make: *** [Makefile:1726: modules] Error 2

--

branch 5.13.6 has error:

/opt/rtl8812au/os_dep/osdep_service.c: In function ‘thread_exit’: /opt/rtl8812au/os_dep/osdep_service.c:1315:9: error: implicit declaration of function ‘complete_and_exit’ [-Werror=implicit-function-declaration] 1315 | complete_and_exit(comp, 0); | ^~~~~ cc1: some warnings being treated as errors make[2]: [scripts/Makefile.build:298: /opt/rtl8812au/os_dep/osdep_service.o] Error 1 make[1]: [Makefile:1928: /opt/rtl8812au] Error 2 make[1]: Leaving directory '/usr/src/kernels/5.14.0-340.el9.x86_64' make: *** [Makefile:2473: modules] Error 2

can you please help? Thanks

vi commented 10 months ago

Workaround: use older commit like ae0b0a5a04527e337bde9076843519f21bf205e0.

virer commented 7 months ago

I've manage to fix it for Rocky9.3 in my fork available here : https://github.com/virer/rtl8812au/tree/v5.6.4.2_rocky93 hope this help