rtl8812au-dkms 4.3.8.12175.20140902+dfsg-0ubuntu2: rtl8812au kernel module failed to build [error: implicit declaration of function ‘is_compat_task’]

Bug #1637059 reported by Lin David
122
This bug affects 23 people
Affects Status Importance Assigned to Milestone
rtl8812au (Ubuntu)
Triaged
High
Unassigned

Bug Description

The wifi driver not worked.

ProblemType: Package
DistroRelease: Ubuntu 16.04
Package: rtl8812au-dkms 4.3.8.12175.20140902+dfsg-0ubuntu2
Uname: Linux 4.6.5-040605-generic x86_64
ApportVersion: 2.20.1-0ubuntu2.1
Architecture: amd64
DKMSKernelVersion: 4.4.0-45-generic
Date: Sat Oct 22 15:55:54 2016
DuplicateSignature: dkms:rtl8812au-dkms:4.3.8.12175.20140902+dfsg-0ubuntu2:/var/lib/dkms/rtl8812au/4.3.8.12175.20140902+dfsg/build/os_dep/linux/rtw_android.c:577:6: error: implicit declaration of function ‘is_compat_task’ [-Werror=implicit-function-declaration]
PackageArchitecture: all
PackageVersion: 4.3.8.12175.20140902+dfsg-0ubuntu2
RelatedPackageVersions:
 dpkg 1.18.4ubuntu1.1
 apt 1.2.12~ubuntu16.04.1
SourcePackage: rtl8812au
Title: rtl8812au-dkms 4.3.8.12175.20140902+dfsg-0ubuntu2: rtl8812au kernel module failed to build
UpgradeStatus: Upgraded to xenial on 2016-08-01 (86 days ago)

Revision history for this message
Lin David (cay-903508) wrote :
summary: rtl8812au-dkms 4.3.8.12175.20140902+dfsg-0ubuntu2: rtl8812au kernel
- module failed to build
+ module failed to build [error: implicit declaration of function
+ ‘is_compat_task’]
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in rtl8812au (Ubuntu):
status: New → Confirmed
tags: removed: need-duplicate-check
Changed in rtl8812au (Ubuntu):
importance: Undecided → High
Revision history for this message
Hendrik Schrieber (hennekn) wrote :

Also affects linux kernel version 4.8 which is used as hwe for xenial.

Revision history for this message
Julio Lajara (ju2wheels) wrote :

Can confirm, I have the same issue.

As a temporary fix (I couldnt find where CONFIG_COMPAT was defined in the 4.4 lts xenial kernel in 16.04.1), I added the following to the very top of /usr/src/rtl8812au-4.3.8.12175.20140902+dfsg/os_dep/linux/rtw_android.c :

```
# Note: This not a correct general purpose solution but for building on amd64 16.04.2 it works fine.

#ifdef CONFIG_COMPAT
#undef CONFIG_COMPAT
#endif

```

This allowed me to build the driver on amd64 16.04.2, followed by the following:

```
sudo dkms remove -m rtl8812au/4.3.8.12175.20140902+dfsg --all
sudo dkms install -m rtl8812au -v 4.3.8.12175.20140902+dfsg
sudo modprobe -r 8812au
sudo modprobe 8812au
# unplug/replug the usb device
sudo systemctl restart NetworkManager
```

The driver will now work with the 4.8 HWE kernel on 16.04.2 and so far the networking in general seems far more stable than with the xenial kernel.

Revision history for this message
Brendan (brendan-rankin) wrote :

What is the purpose of CONFIG_COMPAT? Regardless, it's clearly broken here!

Revision history for this message
Kenneth Westervelt (gimmickless) wrote :

It looks like this change to the Linux kernel caused the break. Not knowing the purpose or scope of COMPAT, it's hard to say what it was meant to improve.

https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=5180e3e24fd3e8e7ea46fbe21e10f5ea3fb1edaa

Revision history for this message
Hannu Teulahti (teu) wrote :

This version seems to work. Maybe there is some pointers how to fix this.

https://github.com/abperiasamy/rtl8812AU_8821AU_linux

Revision history for this message
TJ (tj) wrote :

This minor patch fixed the build for me.

Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

The attachment "Patch for kernel 4.4+ using in_compat_syscall() instead of is_compat_task()" seems to be a patch. If it isn't, please remove the "patch" flag from the attachment, remove the "patch" tag, and if you are a member of the ~ubuntu-reviewers, unsubscribe the team.

[This is an automated message performed by a Launchpad user owned by ~brian-murray, for any issues please contact him.]

tags: added: patch
Revision history for this message
TJ (tj) wrote :

I found that this driver does NOT support some USB devices based on the 8821au (since the Debian/Ubuntu source lacks some HAL files) and USB device IDs.

In my case:
$ lsusb

Bus 001 Device 109: ID 0bda:0811 Realtek Semiconductor Corp.

I found a working driver (based on later (4.3.14) upstream source) that can also be built and installed via DKMS at:

https://github.com/abperiasamy/rtl8812AU_8821AU_linux

which builds the module rtl8812au.ko

Revision history for this message
CedS (tumeprendslechou) wrote :

Same problem for me on Ubuntu 16.04.3 with 4.10.0-37 generic kernel,
when following these steps, the wifi device is working, but it break at each kernel upgrade :

https://blog.danielscrivano.com/installing-rtl8812au-on-linux-for-wireless-dual-band-usb-adapters/

Waiting for a fix in the official repository :/

Revision history for this message
Ken Wagner (beaucoder) wrote :

Package will not successfully install: sudo apt install rtl8812au-dkms

Is there a workaround that does not require constantly re-installing after an upgrade?

Thank you.

Revision history for this message
Ken Wagner (beaucoder) wrote :

Followed https://blog.danielscrivano.com/installing-rtl8812au-on-linux-for-wireless-dual-band-usb-adapters/

sudo modprobe 8812au Does not work. Fatal error.

instead copy 8812au.ko to /lib/modules/4.10.0-38-generic
(On my computer).

Then it worked. Will keep an eye on it after updates and upgrades.

HTH.

Cheers,
Ken

Revision history for this message
Nils Toedtmann (m-launchpad-net-mail-nils-toedtmann-net) wrote :

Same here on Ubuntu 16.04:

$ sudo apt-get install rtl8812au-dkms
#...
Building for 4.10.0-40-generic and 4.10.0-42-generic
Building initial module for 4.10.0-40-generic
Error! Bad return status for module build on kernel: 4.10.0-40-generic (x86_64)
Consult /var/lib/dkms/rtl8812au/4.3.8.12175.20140902+dfsg/build/make.log for more information.

$ cat /var/lib/dkms/rtl8812au/4.3.8.12175.20140902+dfsg/build/make.logDKMS make.log for rtl8812au-4.3.8.12175.20140902+dfsg for kernel 4.10.0-40-generic (x86_64)
Tue Dec 12 08:43:46 EST 2017
make ARCH=x86_64 CROSS_COMPILE= -C /lib/modules/4.10.0-40-generic/build M=/var/lib/dkms/rtl8812au/4.3.8.12175.20140902+dfsg/build modules
# ...
/var/lib/dkms/rtl8812au/4.3.8.12175.20140902+dfsg/build/os_dep/linux/rtw_android.c: In function ‘rtw_android_priv_cmd’:
/var/lib/dkms/rtl8812au/4.3.8.12175.20140902+dfsg/build/os_dep/linux/rtw_android.c:577:6: error: implicit declaration of function ‘is_compat_task’ [-Werror=implicit-function-declaration]
  if (is_compat_task()) {
      ^
cc1: some warnings being treated as errors
scripts/Makefile.build:294: recipe for target '/var/lib/dkms/rtl8812au/4.3.8.12175.20140902+dfsg/build/os_dep/linux/rtw_android.o' failed
make[2]: *** [/var/lib/dkms/rtl8812au/4.3.8.12175.20140902+dfsg/build/os_dep/linux/rtw_android.o] Error 1
Makefile:1524: recipe for target '_module_/var/lib/dkms/rtl8812au/4.3.8.12175.20140902+dfsg/build' failed
make[1]: *** [_module_/var/lib/dkms/rtl8812au/4.3.8.12175.20140902+dfsg/build] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-4.10.0-40-generic'
Makefile:1459: recipe for target 'modules' failed
make: *** [modules] Error 2

$ uname -a
Linux dlogicvt 4.10.0-40-generic #44~16.04.1-Ubuntu SMP Thu Nov 9 15:37:44 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux

$ sudo lsusb
#...
Bus 003 Device 003: ID 0bda:a811 Realtek Semiconductor Corp.

Revision history for this message
Julio Lajara (ju2wheels) wrote :

Seems this broke again with the 4.13.0 HWE kernel on 16.04 . Now, in addition to the patch I described above for CONFIG_COMPAT, you also need the following patch to /usr/src/rtl8812au-4.3.8.12175.20140902+dfsg/include/osdep_service_linux.h :

```
#ifndef __OSDEP_LINUX_SERVICE_H_
#define __OSDEP_LINUX_SERVICE_H_

        #include <linux/version.h>
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,11,0))
        #include <linux/sched/signal.h>
#endif
        #include <linux/spinlock.h>
```

This patch includes a conditional for the kernel schedule signal headers for newer kernels. You can then follow the same steps at the end of my previous comment to recompile the driver.

Changed in rtl8812au (Ubuntu):
status: Confirmed → Triaged
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.