Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Linux 6.1 support: 'BUILD_EXCLUSIVE directive which does not match this kernel/arch' #508

Closed
Firestar99 opened this issue Nov 1, 2022 · 6 comments
Assignees
Labels
needs triage new issues

Comments

@Firestar99
Copy link

Firestar99 commented Nov 1, 2022

Step 2: Describe your environment

  • v4l2loopback version: 0.12.5-1ubuntu5 (from apt show v4l2loopback-dkms)
  • kernel version: 6.1.0-060100rc1-generic
  • Distribution (+version): Ubuntu 22.04 "jammy"

Step 3: Describe the problem:

Steps to reproduce:

  1. install Ubuntu kernel 6.1-rc3 for amd64 from https://kernel.ubuntu.com/~kernel-ppa/mainline/v6.1-rc3/
  2. sudo apt-get install v4l2loopback-dkms

Observed Results:

Running sudo apt-get install v4l2loopback-dkms:

Setting up v4l2loopback-dkms (0.12.5-1ubuntu5) ...
Loading new v4l2loopback-0.12.5 DKMS files...
Building for 6.1.0-060100rc1-generic 6.1.0-060100rc3-generic
Building initial module for 6.1.0-060100rc1-generic
Error! The /var/lib/dkms/v4l2loopback/0.12.5/6.1.0-060100rc1-generic/x86_64/dkms.conf for module v4l2loopback includes a BUILD_EXCLUSIVE directive which does not match this kernel/arch.
This indicates that it should not be built.
Skipped.
Building initial module for 6.1.0-060100rc3-generic
Error! The /var/lib/dkms/v4l2loopback/0.12.5/6.1.0-060100rc3-generic/x86_64/dkms.conf for module v4l2loopback includes a BUILD_EXCLUSIVE directive which does not match this kernel/arch.
This indicates that it should not be built.
Skipped.

Expected Results:

Working Linux 6.1 support :D

Additional Context:

I want to use obs virtual camera and need to use Linux 6.1 as it fixes vendor ACPI suspend bugs on Ryzen 6000 mobile series processors.

Thanks for any support you can offer :D

@umlaeute
Copy link
Owner

umlaeute commented Nov 1, 2022

i currently don't have access to a machine with a Linux-6.1 kernel, but the BUILD_EXCLUSIVE directive should only be triggered if your kernel does not have v4l2 support.
can you confirm that your kernel has been build with CONFIG_VIDEO_DEV support?

@Firestar99
Copy link
Author

Firestar99 commented Nov 2, 2022

I'm not exactly sure how to check these prebuild kernels, but I can do this:

$ modinfo videodev
filename:       /lib/modules/6.1.0-060100rc3-generic/kernel/drivers/media/v4l2-core/videodev.ko
alias:          char-major-81-*
license:        GPL
description:    Video4Linux2 core driver
author:         Alan Cox, Mauro Carvalho Chehab <mchehab@kernel.org>, Bill Dirks, Justin Schoeman, Gerd Knorr
srcversion:     97D12D428AABEE85C79C48B
depends:        mc
retpoline:      Y
intree:         Y
name:           videodev
vermagic:       6.1.0-060100rc3-generic SMP preempt mod_unload modversions 
sig_id:         PKCS#7
signer:         Build time autogenerated kernel key
sig_key:        14:A6:FA:5F:FF:B6:8A:39:A4:7B:7E:71:FB:49:9B:F8:17:C7:BB:15
sig_hashalgo:   sha512
signature:      [...]

So I assume it must be present. Also I can use my webcam in vlc and obs just fine.

@rauldipeas
Copy link

rauldipeas commented Nov 15, 2022

i currently don't have access to a machine with a Linux-6.1 kernel, but the BUILD_EXCLUSIVE directive should only be triggered if your kernel does not have v4l2 support. can you confirm that your kernel has been build with CONFIG_VIDEO_DEV support?

I'm getting the same error when try to install v4l2loopback-dkms on Kubuntu 22.04 with latest mainline kernel, 6.1.0-rc5 at this moment.

I've checked for this CONFIG_VIDEO_DEV on kernel build config and it's set as CONFIG_VIDEO_DEV=m.

The dkms log show an information about gcc mismatch.

@umlaeute
Copy link
Owner

i've just installed the linux-headers-6.1.0-0-amd64 as it is currently available in Debian/experimental (6.1~rc3-1~exp1), and v4l2loopback-dkms builds and installs fine:

# dkms build v4l2loopback/0.12.7
Sign command: /usr/lib/linux-kbuild-6.0/scripts/sign-file
Signing key: /var/lib/dkms/mok.key
Public certificate (MOK): /var/lib/dkms/mok.pub

Building module:
Cleaning build area...
make -j8 KERNELRELEASE=6.0.0-2-amd64 KERNEL_DIR=/lib/modules/6.0.0-2-amd64/build all...
Signing module /var/lib/dkms/v4l2loopback/0.12.7/build/v4l2loopback.ko
Cleaning build area...
#

so I'm inclined to close this as "works-for-me".
however, I'm a bit unsure whether the actual problem you are facing is

  • because of an outdated version of v4l2loopback (e.g. Ubuntu Jammy/22.04 ships with v4l2loopback-0.12.5; at the time of writing, the last release here (and which I test) is v4l2loopback-0.12.7)
  • an issue with the kernel packaging ("6.1.0-060100rc1-generic" resp "mainline kernel 6.1.0-rc5" sounds all very experimental to me; it seems that there are no (official?) Ubuntu packages for these kernels at all).

probably it's both.
you should first try to install v4l2loopback-0.12.7 (the package from kinetic should work just fine; so download and install it manually). the changelog of the 0.12.7 package says "* Fix DKMS build on linux>=5.18" which might be related to your issue.
if this doesn't work try some officially packaged kernel.

@Firestar99
Copy link
Author

Firestar99 commented Nov 15, 2022

In the mean time I updated to Ubuntu 22.10 kinetic and it works just fine!
I can use virtual camera in OBS and can watch it in discord (didn't show up in vlc for some reason). Installed it from the official kinetic repos: v4l2loopback-dkms version 0.12.7-2ubuntu2. Sadly my original use-case no longer exists so I had lost interest in debugging this further.

@rauldipeas
Copy link

This is how I fixed it on Kubuntu 22.04 with Linux 6.1.0-rc5...

pkcon install gcc-12
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-12 12
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-11 11
wget -qc --show-progress http://mirrors.kernel.org/ubuntu/pool/universe/v/v4l2loopback/$(wget -qO- http://mirrors.kernel.org/ubuntu/pool/universe/v/v4l2loopback/|grep v4l2loopback-dkms|grep .deb|tail -n4|head -n1|cut -d '"' -f2)
pkcon install-local ./v4l2loopback-dkms*.deb

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs triage new issues
Projects
None yet
Development

No branches or pull requests

3 participants