Networking Drivers – DKMS Drivers for RTL8812AU & RTL8814AU Fail to Build on Ubuntu 17.10

17.10compilingdriverskernelnetworking

I have github dkms kernel drivers for rtl8812au (v4.3.14) and rtl8814au (v4.3.21) USB wireless network dongles that were working fine in 17.04, but failed to build during the upgrade to 17.10. Both drivers are based on similar code, and fail to build in similar fashion.

I don't know if it's a new gcc compiler, or the new 4.13 kernel, that may be causing the problem. It may just require a minor tweak to the Makefile to work around the errors.

If I use the standard make command, instead of the normal dkms add/build/install sequence, I can see the error quite readily.

Here are the errors for the rtl8812au code version 4.3.14 (which is newer that what's found in the current Ubuntu repos)…

user@Satellite-E55:~/src/rtl8812AU$ make
make ARCH=x86_64 CROSS_COMPILE= -C /lib/modules/4.13.0-16-generic/build M=/home/user/src/rtl8812AU  modules
make[1]: Entering directory '/usr/src/linux-headers-4.13.0-16-generic'
  CC [M]  /home/user/src/rtl8812AU/core/rtw_cmd.o
In file included from /home/user/src/rtl8812AU/include/drv_types.h:32:0,
                 from /home/user/src/rtl8812AU/core/rtw_cmd.c:22:
/home/user/src/rtl8812AU/include/osdep_service.h: In function ‘thread_enter’:
/home/user/src/rtl8812AU/include/osdep_service.h:343:2: error: implicit declaration of function ‘allow_signal’; did you mean ‘do_signal’? [-Werror=implicit-function-declaration]
  allow_signal(SIGTERM);
  ^~~~~~~~~~~~
  do_signal
/home/user/src/rtl8812AU/include/osdep_service.h: In function ‘flush_signals_thread’:
/home/user/src/rtl8812AU/include/osdep_service.h:353:6: error: implicit declaration of function ‘signal_pending’; did you mean ‘timer_pending’? [-Werror=implicit-function-declaration]
  if (signal_pending (current))
      ^~~~~~~~~~~~~~
      timer_pending
/home/user/src/rtl8812AU/include/osdep_service.h:355:3: error: implicit declaration of function ‘flush_signals’; did you mean ‘do_signal’? [-Werror=implicit-function-declaration]
   flush_signals(current);
   ^~~~~~~~~~~~~
   do_signal
cc1: some warnings being treated as errors
scripts/Makefile.build:302: recipe for target '/home/user/src/rtl8812AU/core/rtw_cmd.o' failed
make[2]: *** [/home/user/src/rtl8812AU/core/rtw_cmd.o] Error 1
Makefile:1546: recipe for target '_module_/home/user/src/rtl8812AU' failed
make[1]: *** [_module_/home/user/src/rtl8812AU] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-4.13.0-16-generic'
Makefile:1576: recipe for target 'modules' failed
make: *** [modules] Error 2
user@Satellite-E55:~/src/rtl8812AU$

The code referred to in osdep_service.h looks like this…

#ifdef PLATFORM_LINUX
    #if (LINUX_VERSION_CODE < KERNEL_VERSION(3, 8, 0))
    daemonize("%s", name);
    #endif
    allow_signal(SIGTERM);
#endif
#ifdef PLATFORM_FREEBSD
    printf("%s", "RTKTHREAD_enter");
#endif
}

__inline static void flush_signals_thread(void) 
{
#ifdef PLATFORM_LINUX
    if (signal_pending (current)) 
    {
        flush_signals(current);
    }
#endif

The errors and the code for the rtl8814au look similar, so I won't post them unless requested/required.

Please help. I'd like to get my wireless networks back online.

Best Answer

You might try:

git clone https://github.com/zebulon2/rtl8814au.git
cd rtl8814au
make
sudo make install
sudo modprobe 8814au

It makes perfectly on my 17.10 system. I am not confident that I can recommend a dkms process, so kernel updates require a recompile.

Related Question