v4l2loopback: build error in focal with new kernel linux-hwe.5.8

Bug #1900997 reported by Andrea Righi
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
v4l2loopback (Ubuntu)
Invalid
Undecided
Unassigned
Focal
Fix Released
Undecided
Unassigned

Bug Description

[Impact]

Building this module in focal against the new linux-hwe-5.8 returns the following errors:

/var/lib/dkms/v4l2loopback/0.12.3/build/v4l2loopback.c:137:47: warning: ‘struct timeval’ declared inside parameter list will not be visible outside of this definition or declaration
  137 | static inline void v4l2l_get_timestamp(struct timeval *tv) {
      | ^~~~~~~
/var/lib/dkms/v4l2loopback/0.12.3/build/v4l2loopback.c: In function ‘v4l2l_get_timestamp’:
/var/lib/dkms/v4l2loopback/0.12.3/build/v4l2loopback.c:147:4: error: dereferencing pointer to incomplete type ‘struct timeval’
  147 | tv->tv_sec = (time_t)ts.tv_sec;
      | ^~
...
/var/lib/dkms/v4l2loopback/0.12.3/build/v4l2loopback.c:2441:44: error: ‘VFL_TYPE_GRABBER’ undeclared (first use in this function); did you mean ‘VFL_TYPE_SUBDEV’?
 2441 | if (video_register_device(devs[i]->vdev, VFL_TYPE_GRABBER, video_nr[i]) < 0) {
      | ^~~~~~~~~~~~~~~~
      | VFL_TYPE_SUBDEV
cc1: some warnings being treated as errors

[Test case]

$ sudo apt install v4l2loopback-dkms

Build errors are reported in make.log.

[Fix]

Fix by adding some #ifdef's to properly support the struct timeval (that is not available anymore in 5.8) and handle the rename of VFL_TYPE_GRABBER to VFL_TYPE_VIDEO (in 5.8).

[Regression potential]

The source code for the 5.4 kernel remains the same, so there is no regression potential. The new changes are all conditionals and they are all applied to the 5.8 kernel.

Revision history for this message
Andrea Righi (arighi) wrote :

debdiff reported in attach seems to fix all the build errors with linux-5.8.

tags: added: patch
Andrea Righi (arighi)
description: updated
Timo Aaltonen (tjaalton)
Changed in v4l2loopback (Ubuntu):
status: New → Invalid
Andrea Righi (arighi)
description: updated
Timo Aaltonen (tjaalton)
Changed in v4l2loopback (Ubuntu Focal):
status: New → In Progress
Revision history for this message
Brian Murray (brian-murray) wrote : Please test proposed package

Hello Andrea, or anyone else affected,

Accepted v4l2loopback into focal-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/v4l2loopback/0.12.3-1ubuntu0.3 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, what testing has been performed on the package and change the tag from verification-needed-focal to verification-done-focal. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-focal. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Changed in v4l2loopback (Ubuntu Focal):
status: In Progress → Fix Committed
tags: added: verification-needed verification-needed-focal
Revision history for this message
Kleber Sacilotto de Souza (kleber-souza) wrote :
tags: added: verification-done-focal
removed: verification-needed-focal
Revision history for this message
Łukasz Zemczak (sil2100) wrote : Update Released

The verification of the Stable Release Update for v4l2loopback has completed successfully and the package is now being released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

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

This bug was fixed in the package v4l2loopback - 0.12.3-1ubuntu0.3

---------------
v4l2loopback (0.12.3-1ubuntu0.3) focal; urgency=medium

  * Linux 5.7 compatibility (LP: #1900997)
    - debian/patches/0001-linux-5.7-compatibility.patch

 -- Andrea Righi <email address hidden> Thu, 22 Oct 2020 10:34:52 +0000

Changed in v4l2loopback (Ubuntu Focal):
status: Fix Committed → Fix Released
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.