I tried to compile a module on Debian 10 (v4l2loopback) like this:
sudo apt-get install linux-headers-$(uname -r)git clone https://github.com/umlaeute/v4l2loopback.gitcd v4l2loopback/make -j4sudo make installsudo modprobe v4l2loopback
This gives me an error
modprobe: ERROR: could not insert 'v4l2loopback': Exec format error
I tried to find out what is wrong. (There are some issues regarding this problem, e.g. https://github.com/umlaeute/v4l2loopback/issues/208 or https://github.com/umlaeute/v4l2loopback/issues/296, but I think the problem is related to my system configuration, not to v4l2loopback
).
1. check dmesg
I do not know what this means:
[ 48.264449] v4l2loopback: loading out-of-tree module taints kernel.[ 48.264505] v4l2loopback: module verification failed: signature and/or required key missing - tainting kernel[ 48.264610] module: x86/modules: Skipping invalid relocation target, existing value is nonzero for type 1, loc 00000000d85e721d, val ffffffffc0ba115b
2. Check if kernel-headers match kernel installation
From the following output, I think both match:
$ sudo modinfo v4l2loopback filename: /lib/modules/4.19.0-2-amd64/extra/v4l2loopback.kolicense: GPLauthor: Vasily Levin, IOhannes m zmoelnig <zmoelnig@iem.at>,Stefan Diewald,Anton Novikovet al.description: V4L2 loopback video devicedepends: videodevretpoline: Yname: v4l2loopbackvermagic: 4.19.0-2-amd64 SMP mod_unload modversions$ uname -aLinux pingu1 4.19.0-2-amd64 #1 SMP Debian 4.19.16-1 (2019-01-17) x86_64 GNU/Linux
So this is not the problem.
3. Is the toolchain used to build the module the same as the toolchain used to build the kernel?
The kernel seems to be build with gcc version 8.2.0
:
$ cat /proc/versionLinux version 4.19.0-2-amd64 (debian-kernel@lists.debian.org) (gcc version 8.2.0 (Debian 8.2.0-14)) #1 SMP Debian 4.19.16-1 (2019-01-17)
I do not know how to find out what was used to build the module. My best guess is:
$ gcc --versiongcc (Debian 8.3.0-6) 8.3.0
So it is 8.2.0
versus 8.3.0
. This is a minor version change, which should not break anything.
4. Run depmod
before modprobe
This did not make a difference. I think I did not make a difference because the module in concern has no dependencies.
Can someone help on what to do next?