Jump to content

apt install v4l2loopback-dkms fails


Go to solution Solved by laibsch,

Recommended Posts

Posted (edited)

v4l2loopback-dkms 0.12.7-2 fails to build

make.log:

DKMS make.log for v4l2loopback-0.12.7 for kernel 6.12.32-current-rockchip64 (aarch64)
Sat Jul  5 09:16:17 PM CDT 2025
Building v4l2-loopback driver...
make -C /lib/modules/6.12.32-current-rockchip64/build M=/var/lib/dkms/v4l2loopback/0.12.7/build modules
make[1]: Entering directory '/usr/src/linux-headers-6.12.32-current-rockchip64'
  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 ‘strncpy’? [-Werror=implicit-function-declaration]
  717 |         strlcpy(cap->driver, "v4l2 loopback", sizeof(cap->driver));
      |         ^~~~~~~
      |         strncpy
cc1: some warnings being treated as errors
make[3]: *** [scripts/Makefile.build:229: /var/lib/dkms/v4l2loopback/0.12.7/build/v4l2loopback.o] Error 1
make[2]: *** [/usr/src/linux-headers-6.12.32-current-rockchip64/Makefile:1945: /var/lib/dkms/v4l2loopback/0.12.7/build] Error 2
make[1]: *** [Makefile:224: __sub-make] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-6.12.32-current-rockchip64'
make: *** [Makefile:43: v4l2loopback.ko] Error 2

 

Edit: 

I had the wrong make.log contents. The old one was after I tried to fix it and failing. The actual build error is missing strlcpy().

Edited by bp0
Posted

please give the output of "apt policy v4l2loopback-dkms"

 

FWIW, installation worked just fine right now on my BPi M2+

 

$ sudo apt reinstall v4l2loopback-dkms
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
0 upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 5 not upgraded.
Need to get 30.6 kB of archives.
After this operation, 0 B of additional disk space will be used.
Get:1 http://ports.ubuntu.com noble/universe armhf v4l2loopback-dkms all 0.12.7-2ubuntu5 [30.6 kB]
Fetched 30.6 kB in 1s (20.8 kB/s)         
(Reading database ... 143046 files and directories currently installed.)
Preparing to unpack .../v4l2loopback-dkms_0.12.7-2ubuntu5_all.deb ...
Deleting module v4l2loopback-0.12.7 completely from the DKMS tree.
Unpacking v4l2loopback-dkms (0.12.7-2ubuntu5) over (0.12.7-2ubuntu5) ...
Setting up v4l2loopback-dkms (0.12.7-2ubuntu5) ...
Loading new v4l2loopback-0.12.7 DKMS files...
Building for 6.12.30-current-sunxi
Building initial module for 6.12.30-current-sunxi
Done.

v4l2loopback.ko:
Running module version sanity check.
 - Original module
   - No original module exists within this kernel
 - Installation
   - Installing to /lib/modules/6.12.30-current-sunxi/updates/dkms/
depmod....

 

Posted
16 minutes ago, laibsch said:

please give the output of "apt policy v4l2loopback-dkms"

 

 

I believe you likely have an outdated version of the package.  Here is the latest changelog entry for Ubuntu Noble.

 

Quote

v4l2loopback (0.12.7-2ubuntu5) noble; urgency=medium

  * Support Linux 6.8 (LP: #2052801):
    - debian/patches/0008-handle-strlcpy.patch

 -- Andrea Righi <andrea.righi@canonical.com>  Fri, 09 Feb 2024 14:25:38 +0000

 

If you are using an older version, consider upgrading.  If you are on bookworm you might want to consider the backports pocket.  Or you can think about simply applying above patch locally.  Next time, please provide relevant information and logs in your first post.  Don't make us guess.

Posted

Sorry I did not provide enough info. I am using Debian bookworm, completely updated as far as I know, and it looks like you might be using Ubuntu. Maybe I needed to use bookworm-backports as you suggested; it looks like a newer version there. I've actually found another way to do what I was trying to do with v4l2loopback and don't need it anymore, but thanks for looking at it.

Here is some output that you asked for:

 

    _             _    _           
   /_\  _ _ _ __ | |__(_)__ _ _ _  
  / _ \| '_| '  \| '_ \ / _` | ' \ 
 /_/ \_\_| |_|_|_|_.__/_\__,_|_||_|
                                   
 v25.5.1 for Renegade running Armbian Linux 6.12.32-current-rockchip64

 Packages:     Debian stable (bookworm)
 IPv4:         (LAN) 10.0.44.17, 192.168.4.254 (WAN) 107.77.207.5 

 Performance:  

 Load:         50%               Up time:       0 min    
 Memory usage: 13% of 968M       
 CPU temp:     36°C                Usage of /:   13% of 30G        

 Commands: 

 Configuration : armbian-config
 Monitoring    : htop

Last login: Sat Jul  5 20:21:20 2025 from 10.0.44.1
pburt@gato:~$ cat /etc/debian_version 
12.11
pburt@gato:~$ apt-cache policy v4l2loopback-dkms 
v4l2loopback-dkms:
  Installed: (none)
  Candidate: 0.12.7-2
  Version table:
     0.13.2-1~bpo12+1 100
        100 http://deb.debian.org/debian bookworm-backports/main arm64 Packages
        100 http://deb.debian.org/debian bookworm-backports/main armhf Packages
     0.12.7-2 500
        500 http://deb.debian.org/debian bookworm/main arm64 Packages
        500 http://deb.debian.org/debian bookworm/main armhf Packages
pburt@gato:~$ sudo apt install v4l2loopback-dkms 
[sudo] password for pburt: 
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following additional packages will be installed:
  dkms
Suggested packages:
  menu
Recommended packages:
  fakeroot
The following NEW packages will be installed:
  dkms v4l2loopback-dkms
0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
Need to get 86.0 kB of archives.
After this operation, 308 kB of additional disk space will be used.
Do you want to continue? [Y/n] 
Get:1 http://deb.debian.org/debian bookworm/main arm64 dkms all 3.0.10-8+deb12u1 [48.7 kB]
Get:2 http://deb.debian.org/debian bookworm/main arm64 v4l2loopback-dkms all 0.12.7-2 [37.2 kB]
Fetched 86.0 kB in 1s (119 kB/s)          
Selecting previously unselected package dkms.
(Reading database ... 71668 files and directories currently installed.)
Preparing to unpack .../dkms_3.0.10-8+deb12u1_all.deb ...
Unpacking dkms (3.0.10-8+deb12u1) ...
Selecting previously unselected package v4l2loopback-dkms.
Preparing to unpack .../v4l2loopback-dkms_0.12.7-2_all.deb ...
Unpacking v4l2loopback-dkms (0.12.7-2) ...
Setting up dkms (3.0.10-8+deb12u1) ...
Setting up v4l2loopback-dkms (0.12.7-2) ...
Loading new v4l2loopback-0.12.7 DKMS files...
Building for 6.12.32-current-rockchip64
Building initial module for 6.12.32-current-rockchip64
Error! Bad return status for module build on kernel: 6.12.32-current-rockchip64 (aarch64)
Consult /var/lib/dkms/v4l2loopback/0.12.7/build/make.log for more information.
dpkg: error processing package v4l2loopback-dkms (--configure):
 installed v4l2loopback-dkms package post-installation script subprocess returned error exit status 10
Errors were encountered while processing:
 v4l2loopback-dkms
E: Sub-process /usr/bin/dpkg returned an error code (1)
pburt@gato:~$ cat /var/lib/dkms/v4l2loopback/0.12.7/build/make.log
DKMS make.log for v4l2loopback-0.12.7 for kernel 6.12.32-current-rockchip64 (aarch64)
Sun Jul  6 06:20:57 PM CDT 2025
Building v4l2-loopback driver...
make -C /lib/modules/6.12.32-current-rockchip64/build M=/var/lib/dkms/v4l2loopback/0.12.7/build modules
make[1]: Entering directory '/usr/src/linux-headers-6.12.32-current-rockchip64'
  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 ‘strncpy’? [-Werror=implicit-function-declaration]
  717 |         strlcpy(cap->driver, "v4l2 loopback", sizeof(cap->driver));
      |         ^~~~~~~
      |         strncpy
cc1: some warnings being treated as errors
make[3]: *** [scripts/Makefile.build:229: /var/lib/dkms/v4l2loopback/0.12.7/build/v4l2loopback.o] Error 1
make[2]: *** [/usr/src/linux-headers-6.12.32-current-rockchip64/Makefile:1945: /var/lib/dkms/v4l2loopback/0.12.7/build] Error 2
make[1]: *** [Makefile:224: __sub-make] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-6.12.32-current-rockchip64'
make: *** [Makefile:43: v4l2loopback.ko] Error 2
pburt@gato:~$ 

 

  • Solution
Posted

Thank you for reporting back.  I am happy to hear you were able to find another way to solve the underlying issue without needing the v4l2loopback-dkms package anymore.

 

I see you already have backports enabled but probably with low priority (as you should) by default.   You can check "man apt" for information how to install that specific version (or use aptitude like I do).  That being said, "sudo apt install v4l2loopback-dkms/bookworm-backports" should probably get you the version you need and hopefully it would install fine.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines