3rd party kernel modules fail to build due to incomplete /usr/src/linux-headers-4.1x.y install?
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/
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~
```
make ARCH=x86_64 CROSS_COMPILE= -C /lib/modules/
make[1]: Entering directory `/usr/src/
test -e include/
echo >&2; \
echo >&2 " ERROR: Kernel configuration is invalid."; \
echo >&2 " include/
echo >&2 " Run 'make oldconfig && make prepare' on kernel src to fix it."; \
echo >&2 ; \
mkdir -p /path/to/
make -f ./scripts/
make[2]: *** No rule to make target `/path/
make[1]: *** [_module_
make[1]: Leaving directory `/usr/src/
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/
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.
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.
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.