3rd party kernel modules fail to build due to incomplete /usr/src/linux-headers-4.1x.y install?

Bug #1752857 reported by RJVB
16
This bug affects 2 people
Affects Status Importance Assigned to Milestone
kernel-package (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

I've been building my own mainline/stock kernels on Ubuntu (technically, Kubuntu 14.04) for years, using `make-kpkg` from the kernel-package package. All I had to do after installing the linux-image and linux-headers packages was to correct the /lib/modules/4.x.y/{source,build} symlinks so they pointed to the /usr/src/linux-headers-4.x.y directory instead of to the source tree (which I'd trash because HUGE).

Last kernel I did this with was 4.9.30. Doing the same with 4.15.7 and 4.14.23 works for some 3rd party modules (for instance, ZFS 0.7.6) but not with others, like the driver for the RTL8812au WIFI adapter (or even the host kernel extensions from VirtualBox 5.2.8-121009~Ubuntu~trusty installed from Oracle' own PPA). There, I'm seeing make errors like this:

```
    make ARCH=x86_64 CROSS_COMPILE= -C /lib/modules/4.14.23-ck1-mainline-core2-rjvb/build M=/path/to/rtl8812au_rtl8821au-git modules
    make[1]: Entering directory `/usr/src/linux-headers-4.14.23-ck1-mainline-core2-rjvb'
    test -e include/generated/autoconf.h -a -e include/config/auto.conf || ( \
            echo >&2; \
            echo >&2 " ERROR: Kernel configuration is invalid."; \
            echo >&2 " include/generated/autoconf.h or include/config/auto.conf are missing.";\
            echo >&2 " Run 'make oldconfig && make prepare' on kernel src to fix it."; \
            echo >&2 ; \
            /bin/false)
    mkdir -p /path/to/rtl8812au_rtl8821au-git/.tmp_versions ; rm -f /home/bertin/work/src/Scratch/RTL881x/rtl8812au_rtl8821au-git/.tmp_versions/*
    make -f ./scripts/Makefile.build obj=/path/to/rtl8812au_rtl8821au-git
    make[2]: *** No rule to make target `/path/to/rtl8812au_rtl8821au-git/core/rtw_io.o', needed by `/path/to/rtl8812au_rtl8821au-git/8812au.o'. Stop.
    make[1]: *** [_module_/path/to/rtl8812au_rtl8821au-git] Error 2
    make[1]: Leaving directory `/usr/src/linux-headers-4.14.23-ck1-mainline-core2-rjvb'
    make: *** [modules] Error 2
```

The builds complete without issue with the source and build symlinks point my kernel build directory.

Two explanations (both of which probably have some truth):
1. the tree installed in /usr/src/linux-headers-4.1x.y* is somehow incomplete
2. something has to be changed in the 3rd party extension module

I'd go with 2) were it not for the fact that apparently at least one of the various 8812au driver repos builds just fine against 4.14 and 4.15, and I must assume that this holds too for VirtualBox. (There are some reports of the error I'm seeing but in an older version, supposedly fixed in 5.2.7 .)

The RTL 8812au driver source I'm working with: github.com/RJVB/rtl8812au_rtl8821au .

I've already updated to the latest kernel-package version (13.018+nmu1), that didn't solve the issue.

I'm running Ubuntu 14.04.5 LTS, with all LTS updates I'm aware of.

Revision history for this message
René Vögeli (rvoegeli) wrote :

I am having the exact same issue with kernel 4.15.16 from the mainline kernel ppa sing make-kpkg.

However, 'make bindeb-pkg' will actually produce a fully functional header image.

So I compared the two resulting packages and found 'tools/objtool/objtool' is missing in the make-kpkg package. Actually, there are a lot of files missing, but copying objtool to the correct place fixes DKMS builds for me.

Revision history for this message
Launchpad Janitor (janitor) wrote :

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

Changed in kernel-package (Ubuntu):
status: New → Confirmed
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.