rtl8723de icon indicating copy to clipboard operation
rtl8723de copied to clipboard

Build failure in Linux 4.15.2-2

Open c4explosive opened this issue 7 years ago • 17 comments

The driver throws a error when compiling with Linux 4.15 in Archlinux. The error is about "data member" of struct timer_list. The cause is probably the change of timer interface in Linux kernel (https://lkml.org/lkml/2017/11/25/90)

Compile's output error is detailed here:

make ARCH=x86_64 CROSS_COMPILE= -C /lib/modules/4.15.2-2-ARCH/build M=/ArchBootstraping271217/rtl8723de-4.11-up modules make[1]: Entering directory '/usr/lib/modules/4.15.2-2-ARCH/build' CC [M] /ArchBootstraping271217/rtl8723de-4.11-up/core/rtw_cmd.o In file included from /ArchBootstraping271217/rtl8723de-4.11-up/include/osdep_service.h:42:0, from /ArchBootstraping271217/rtl8723de-4.11-up/include/drv_types.h:32, from /ArchBootstraping271217/rtl8723de-4.11-up/core/rtw_cmd.c:22: /ArchBootstraping271217/rtl8723de-4.11-up/include/osdep_service_linux.h: In function ‘_init_timer’: /ArchBootstraping271217/rtl8723de-4.11-up/include/osdep_service_linux.h:287:8: error: ‘_timer {aka struct timer_list}’ has no member named ‘data’ ptimer->data = (unsigned long)cntx; ^~ /ArchBootstraping271217/rtl8723de-4.11-up/include/osdep_service_linux.h:288:2: error: implicit declaration of function ‘init_timer’; did you mean ‘_init_timer’? [-Werror=implicit-function-declaration] init_timer(ptimer); ^~~~~~~~~~ _init_timer cc1: some warnings being treated as errors make[2]: *** [scripts/Makefile.build:317: /ArchBootstraping271217/rtl8723de-4.11-up/core/rtw_cmd.o] Error 1 make[1]: *** [Makefile:1508: module/ArchBootstraping271217/rtl8723de-4.11-up] Error 2 make[1]: Leaving directory '/usr/lib/modules/4.15.2-2-ARCH/build' make: *** [Makefile:1884: modules] Error 2

c4explosive avatar Feb 13 '18 06:02 c4explosive

Fedora 27 kernel 4.15.3-300 64 bits same issue:

DKMS make.log for rtl8723de-5.1.1.8_21285.20171026_COEX20170111-1414 for kernel 4.15.3-300.fc27.x86_64 (x86_64) sáb feb 17 15:53:11 -03 2018 make ARCH=x86_64 CROSS_COMPILE= -C /lib/modules/4.15.3-300.fc27.x86_64/build M=/var/lib/dkms/rtl8723de/5.1.1.8_21285.20171026_COEX20170111-1414/build modules make[1]: se entra en el directorio '/usr/src/kernels/4.15.3-300.fc27.x86_64' CC [M] /var/lib/dkms/rtl8723de/5.1.1.8_21285.20171026_COEX20170111-1414/build/core/rtw_cmd.o In file included from /var/lib/dkms/rtl8723de/5.1.1.8_21285.20171026_COEX20170111-1414/build/include/osdep_service.h:42:0, from /var/lib/dkms/rtl8723de/5.1.1.8_21285.20171026_COEX20170111-1414/build/include/drv_types.h:32, from /var/lib/dkms/rtl8723de/5.1.1.8_21285.20171026_COEX20170111-1414/build/core/rtw_cmd.c:22: /var/lib/dkms/rtl8723de/5.1.1.8_21285.20171026_COEX20170111-1414/build/include/osdep_service_linux.h: En la función ‘_init_timer’: /var/lib/dkms/rtl8723de/5.1.1.8_21285.20171026_COEX20170111-1414/build/include/osdep_service_linux.h:287:8: error: ‘_timer {también conocido como struct timer_list}’ no tiene un miembro llamado ‘data’ ptimer->data = (unsigned long)cntx; ^~
/var/lib/dkms/rtl8723de/5.1.1.8_21285.20171026_COEX20170111-1414/build/include/osdep_service_linux.h:288:2: error: implicit declaration of function ‘init_timer’; did you mean ‘_init_timer’? [-Werror=implicit-function-declaration] init_timer(ptimer); ^~~~~~~~~~ _init_timer cc1: algunos avisos se tratan como errores make[2]: *** [scripts/Makefile.build:317: /var/lib/dkms/rtl8723de/5.1.1.8_21285.20171026_COEX20170111-1414/build/core/rtw_cmd.o] Error 1 make[1]: *** [Makefile:1512: module/var/lib/dkms/rtl8723de/5.1.1.8_21285.20171026_COEX20170111-1414/build] Error 2 make[1]: se sale del directorio '/usr/src/kernels/4.15.3-300.fc27.x86_64' make: *** [Makefile:1884: modules] Error 2

Fedoro avatar Feb 17 '18 19:02 Fedoro

I can confirm the same issue (kernel 4.15.3-300.fc27.x86_64, Fedora 27).

ayanbanrj avatar Feb 23 '18 12:02 ayanbanrj

Linux 4.15 deprecated init_timer

ghost avatar Feb 25 '18 18:02 ghost

So I guess that module is not working (yet?) for all 4.15+ kernels, also tested on gentoo with 4.15.7-r1 kernel, make failed: make ARCH=x86_64 CROSS_COMPILE= -C /lib/modules/4.15.7-gentoo-r1/build M=/root/downloads/rtl8723de modules make[1]: Entering directory '/usr/src/linux-4.15.7-gentoo-r1' CC [M] /root/downloads/rtl8723de/core/rtw_cmd.o In file included from /root/downloads/rtl8723de/include/osdep_service.h:42:0, from /root/downloads/rtl8723de/include/drv_types.h:32, from /root/downloads/rtl8723de/core/rtw_cmd.c:22: /root/downloads/rtl8723de/include/osdep_service_linux.h: In function ‘_init_timer’: /root/downloads/rtl8723de/include/osdep_service_linux.h:287:8: error: ‘_timer {aka struct timer_list}’ has no member named ‘data’ ptimer->data = (unsigned long)cntx; ^~ /root/downloads/rtl8723de/include/osdep_service_linux.h:288:2: error: implicit declaration of function ‘init_timer’ [-Werror=implicit-function-declaration] init_timer(ptimer); ^~~~~~~~~~ cc1: some warnings being treated as errors make[2]: *** [scripts/Makefile.build:317: /root/downloads/rtl8723de/core/rtw_cmd.o] Error 1 make[1]: *** [Makefile:1509: module/root/downloads/rtl8723de] Error 2 make[1]: Leaving directory '/usr/src/linux-4.15.7-gentoo-r1' make: *** [Makefile:1884: modules] Error 2

forestfoxx avatar Mar 05 '18 22:03 forestfoxx

The problem caused by changed timer interface in 4.15

alukin avatar Mar 09 '18 18:03 alukin

Got it already; is it possible to patch the driver to work with this interface in newer kernels? (I personally am not competent in C)

forestfoxx avatar Mar 09 '18 20:03 forestfoxx

Same problem. 4.15.7-300.fc27.x86_64

kenbenobi666 avatar Mar 12 '18 18:03 kenbenobi666

Same problem on 4.15.9-300.fc27.x86_64. @smlinux Can you please take a look at that "nice" interface change? It would make me very happy :-) THX in advance ;-)

Additional info for fedora: Installing the dkms currently pulls a debugging kernel. As far as I know you have to pull the "normal" devel-kernel: sudo dnf install kernel-devel

anthraxn8b avatar Mar 17 '18 16:03 anthraxn8b

same problem for ubuntu 18.04 development version which uses 4.15 as kernal

mujeebcpy avatar Mar 31 '18 20:03 mujeebcpy

@anthraxn8b @agent00S @mujeebcpy Use https://github.com/lwfinger/rtlwifi_new/tree/extended and when you cd in the folder make sure you checkout in the extended branch. It works like a charm

alphacentauri82 avatar Apr 27 '18 18:04 alphacentauri82

@alphacentauri82 It's compiles and installs, but is not working good (it's disconects for no reason). Problems with driver rtl8723de and Kernel Linux 4.16. I had to downgrade to the linux 4.14.15 again.

c4explosive avatar May 06 '18 19:05 c4explosive

My bad! but downgrading to 4.14.15 sorted out the problem?

alphacentauri82 avatar May 07 '18 12:05 alphacentauri82

Yes, downgrading to 4.14.15 solved the problem.

c4explosive avatar May 08 '18 21:05 c4explosive

The branch 4.15-up is added to the repository. Try it.

smlinux avatar Jun 12 '18 08:06 smlinux

thanks.. it works for 4.15, got no found kernal error in 4.16

On Tue, 12 Jun 2018 at 13:43, smlinux [email protected] wrote:

The branch 4.15-up is added to the repository. Try it.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/smlinux/rtl8723de/issues/13#issuecomment-396504981, or mute the thread https://github.com/notifications/unsubscribe-auth/AXlR9P3agJRkC8JfJVMEfSxp-FnN4mb4ks5t73gLgaJpZM4SDR0X .

mujeebcpy avatar Jun 12 '18 10:06 mujeebcpy

Yes, the branch 4.15-up is working. Thanks. (Using Linux 4.18.16)

c4explosive avatar Nov 08 '18 21:11 c4explosive