Closed jschwender closed 4 months ago
@jschwender fix is already in (yet unreleased) code: first with commit ee177b680f68f7862e349c2d97230c785620e94f and refined by commit b261f19bc74862abb3ad1999bd8e8ba69052b105
I can confirm with EndeavourOS: kernel 6.8.1-arch1-1 v4l2loopback-dkms 0.12.7-2 v4l-utils 1.26.1-1
DKMS make.log for v4l2loopback-0.12.7 for kernel 6.8.1-arch1-1 (x86_64)
Sunday, March 17 2024 10:33:34 EET
Building v4l2-loopback driver...
make -C /usr/lib/modules/6.8.1-arch1-1/build M=/var/lib/dkms/v4l2loopback/0.12.7/build modules
make[1]: Entering directory '/usr/lib/modules/6.8.1-arch1-1/build'
CC [M] /var/lib/dkms/v4l2loopback/0.12.7/build/v4l2loopback.o
/var/lib/dkms/v4l2loopback/0.12.7/build/v4l2loopback.c: In function ‘vidioc_querycap’:
/var/lib/dkms/v4l2loopback/0.12.7/build/v4l2loopback.c:717:9: error: implicit declaration of function ‘strlcpy’; did you mean ‘strscpy’? [-Werror=implicit-function-declaration]
717 | strlcpy(cap->driver, "v4l2 loopback", sizeof(cap->driver));
| ^~~~~~~
| strscpy
cc1: some warnings being treated as errors
make[3]: *** [scripts/Makefile.build:243: /var/lib/dkms/v4l2loopback/0.12.7/build/v4l2loopback.o] Error 1
make[2]: *** [/usr/lib/modules/6.8.1-arch1-1/build/Makefile:1921: /var/lib/dkms/v4l2loopback/0.12.7/build] Error 2
make[1]: *** [Makefile:240: __sub-make] Error 2
make[1]: Leaving directory '/usr/lib/modules/6.8.1-arch1-1/build'
make: *** [Makefile:43: v4l2loopback.ko] Error 2
I can confirm with EndeavourOS: kernel 6.8.1-arch1-1 v4l2loopback-dkms 0.12.7-2 v4l-utils 1.26.1-1
DKMS make.log for v4l2loopback-0.12.7 for kernel 6.8.1-arch1-1 (x86_64) Sunday, March 17 2024 10:33:34 EET Building v4l2-loopback driver... make -C /usr/lib/modules/6.8.1-arch1-1/build M=/var/lib/dkms/v4l2loopback/0.12.7/build modules make[1]: Entering directory '/usr/lib/modules/6.8.1-arch1-1/build' CC [M] /var/lib/dkms/v4l2loopback/0.12.7/build/v4l2loopback.o /var/lib/dkms/v4l2loopback/0.12.7/build/v4l2loopback.c: In function ‘vidioc_querycap’: /var/lib/dkms/v4l2loopback/0.12.7/build/v4l2loopback.c:717:9: error: implicit declaration of function ‘strlcpy’; did you mean ‘strscpy’? [-Werror=implicit-function-declaration] 717 | strlcpy(cap->driver, "v4l2 loopback", sizeof(cap->driver)); | ^~~~~~~ | strscpy cc1: some warnings being treated as errors make[3]: *** [scripts/Makefile.build:243: /var/lib/dkms/v4l2loopback/0.12.7/build/v4l2loopback.o] Error 1 make[2]: *** [/usr/lib/modules/6.8.1-arch1-1/build/Makefile:1921: /var/lib/dkms/v4l2loopback/0.12.7/build] Error 2 make[1]: *** [Makefile:240: __sub-make] Error 2 make[1]: Leaving directory '/usr/lib/modules/6.8.1-arch1-1/build' make: *** [Makefile:43: v4l2loopback.ko] Error 2
v4l2loopback/0.13.1.r8.gc94a1e8
fix the problem, you can update this package:)
I now run into this issue with Debian 12 during apt upgrade
since the release of the latest linux-image in bookworm-backports, linux-image-6.9.7+bpo-rt-amd64
.
The previous linux-image-6.7.12+bpo-amd64
did not have this issue (so Linux 6.7.12
is okay, Linux 6.9.7
makes problem — fitting this issue report's "dkms build fails on kernel").
Sure.
You need v4l2loopback>=0.13
, which is not available on Debian 12 (or backports).
The Debian12 package of v4l2loopback
works nicely with the linux-kernel-headers package of Debian12.
But if you install a package from backports, then this is no longer guaranteed (and obviously fails in your case).
Sure. You need
v4l2loopback>=0.13
, which is not available on Debian 12 (or backports). The Debian12 package ofv4l2loopback
works nicely with the linux-kernel-headers package of Debian12. But if you install a package from backports, then this is no longer guaranteed (and obviously fails in your case).
Thank you for your response.
As I don't know what to do in such situations, I just removed/uninstalled v4l2loopback (i.e., sudo apt remove v4l2loopback-dkms
).
Then after running sudo apt upgrade
, Debian 12 was able to set up and install [linux-image-6.9.7+bpo-rt-amd64](https://packages.debian.org/bookworm-backports/linux-image-6.9.7+bpo-rt-amd64)
, albeit without the v4l2loopback-dkms
, and also rebuilding all other installed linux-image / kernels without v4l2loopback dynamic kernel module support.
build fails with error on strlcpy() function.
gcc (Ubuntu 13.2.0-4ubuntu3) 13.2.0
v4l2loopback
version: 0.12.7Steps to reproduce:
build vanilla kernel 6.8.0 run dkms build on installation the kernel
Observed Results:
build fails
Suggested fix: --- v4l2loopback.c.sav 2023-07-05 14:05:05.000000000 +0200 +++ v4l2loopback.c 2024-03-12 08:36:48.736536585 +0100 @@ -739,7 +739,11 @@ ->devicenr; __u32 capabilities = V4L2_CAP_STREAMING | V4L2_CAP_READWRITE;
+#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 8, 0) strlcpy(cap->driver, "v4l2 loopback", sizeof(cap->driver)); +#else
+#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 8, 0) strlcpy(q->name, cnf->name, sizeof(q->name)); +#else
strscpy(q->name, cnf->name, sizeof(q->name)); +#endif q->default_value = cnf->def; q->type = cnf->type; q->minimum = cnf->min; @@ -1352,7 +1360,11 @@ memset(outp, 0, sizeof(*outp));
outp->index = index; +#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 8, 0) strlcpy(outp->name, "loopback in", sizeof(outp->name)); +#else
strscpy(outp->name, "loopback in", sizeof(outp->name)); +#endif outp->type = V4L2_OUTPUT_TYPE_ANALOG; outp->audioset = 0; outp->modulator = 0; @@ -1411,7 +1423,11 @@ memset(inp, 0, sizeof(*inp));
inp->index = index; +#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 8, 0) strlcpy(inp->name, "loopback", sizeof(inp->name)); +#else
replacing the function for kernels > 6.8 works for me, but i don't feel involved enough with the code, so i want you to look over it and decide if that is a good idea or not. Hope it helps.