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

Cannot install v4l2loopback-dkms #90

Closed
pickfire opened this issue Mar 10, 2023 · 13 comments
Closed

Cannot install v4l2loopback-dkms #90

pickfire opened this issue Mar 10, 2023 · 13 comments

Comments

@pickfire
Copy link

More details at umlaeute/v4l2loopback#523, maybe I opened the ticket at the wrong place initially?

@ptr1337
Copy link
Member

ptr1337 commented Mar 10, 2023

Well, I don't know whats going on there.
There are currently more issues, which showing this issue. Normally this indicates that the headers are missing, but I think you have them installed.

Can you reproduce this with the linux and linux-headers package? Please take a look on that.

Here is a equal issue for this at nvidia, which has the same issue:
Frogging-Family/nvidia-all#152

Actually I tried to reproduce the above issue and my machine - but I can't. I dont know why these issues are not reproduceable.

Anyways, as a temporär solution, I will put the v4l2loopback patch directly into the kernel, so you wont need this dkms modules anymore.
This will be included with 6.2.3.

We had in our Discord a equal issues with the nvidia drivers, same as the above issue. But we could not find what this is actually causing that :/

@pickfire
Copy link
Author

There is also this warning when installing linux-zen and linux-zen-headers.

(2/2) checking available disk space                [----------------------] 100%
warning: could not get file information for usr/lib/modules/6.2.2-zen1-1.1-zen/build/include/generated/autoconf.h
warning: could not get file information for usr/lib/modules/6.2.2-zen1-1.1-zen/build/include/generated/rustc_cfg
:: Running pre-transaction hooks...

Anyways, as a temporär solution, I will put the v4l2loopback patch directly into the kernel, so you wont need this dkms modules anymore.

Nice thanks, it works now even though the dkms is failing.

@ptr1337
Copy link
Member

ptr1337 commented Mar 11, 2023

There is also this warning when installing linux-zen and linux-zen-headers.

(2/2) checking available disk space                [----------------------] 100%
warning: could not get file information for usr/lib/modules/6.2.2-zen1-1.1-zen/build/include/generated/autoconf.h
warning: could not get file information for usr/lib/modules/6.2.2-zen1-1.1-zen/build/include/generated/rustc_cfg
:: Running pre-transaction hooks...

Anyways, as a temporär solution, I will put the v4l2loopback patch directly into the kernel, so you wont need this dkms modules anymore.

Nice thanks, it works now even though the dkms is failing.

Well, as I said. I think its a upstream or dkms issue. This issue seems to be really much present since 6.2, but somehow it does NOT affect all systems. So this is very weird.

@ptr1337
Copy link
Member

ptr1337 commented Mar 13, 2023

Since I can't reproduce this, you could try to build the dkms modules against 6.2.5/6.2.6.
Maybe there was a fix for this in.

@pickfire
Copy link
Author

Nope, still failed.

==> dkms install --no-depmod hid-nintendo/3.2.r5.g2712136 -k 6.2.6-zen1-1.1-zen
Error! Bad return status for module build on kernel: 6.2.6-zen1-1.1-zen (x86_64)
Consult /var/lib/dkms/hid-nintendo/3.2.r5.g2712136/build/make.log for more information.
> cat /var/lib/dkms/v4l2loopback/0.12.7/build/make.log
DKMS make.log for v4l2loopback-0.12.7 for kernel 6.2.6-zen1-1.1-zen (x86_64)
2023年 03月 15日 星期三 21:15:47 +08
Building v4l2-loopback driver...
make -C /usr/lib/modules/6.2.6-zen1-1.1-zen/build M=/var/lib/dkms/v4l2loopback/0.12.7/build modules
  CC [M]  /var/lib/dkms/v4l2loopback/0.12.7/build/v4l2loopback.o
In file included from <command-line>:
././include/linux/kconfig.h:5:10: fatal error: generated/autoconf.h: No such file or directory
    5 | #include <generated/autoconf.h>
      |          ^~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make[2]: *** [scripts/Makefile.build:252: /var/lib/dkms/v4l2loopback/0.12.7/build/v4l2loopback.o] Error 1
make[1]: *** [Makefile:2019: /var/lib/dkms/v4l2loopback/0.12.7/build] Error 2
make: *** [Makefile:43: v4l2loopback.ko] Error 2

@aedoq
Copy link

aedoq commented Mar 15, 2023

It seems that this issue is caused by a broken cleanup script of the DKMS build process:

$ systemctl start auditd.service
$ auditctl -w /usr/lib/modules/6.2.6-arch1-1/build/include/generated/autoconf.h -p rwa
$ pacman -S linux-headers
warning: linux-headers-6.2.6.arch1-1 is up to date -- reinstalling
resolving dependencies...
looking for conflicting packages...

Packages (1) linux-headers-6.2.6.arch1-1

Total Installed Size:  158.22 MiB
Net Upgrade Size:        0.00 MiB

:: Proceed with installation? [Y/n]
(1/1) checking keys in keyring                                               [############################################] 100%
(1/1) checking package integrity                                             [############################################] 100%
(1/1) loading package files                                                  [############################################] 100%
(1/1) checking for file conflicts                                            [############################################] 100%
(1/1) checking available disk space                                          [############################################] 100%
warning: could not get file information for usr/lib/modules/6.2.6-arch1-1/build/include/generated/autoconf.h
warning: could not get file information for usr/lib/modules/6.2.6-arch1-1/build/include/generated/rustc_cfg
:: Running pre-transaction hooks...
(1/1) Remove upgraded DKMS modules
:: Processing package changes...
(1/1) reinstalling linux-headers                                             [############################################] 100%
:: Running post-transaction hooks...
(1/3) Arming ConditionNeedsUpdate...
(2/3) Updating module dependencies...
(3/3) Install DKMS modules
==> dkms install --no-depmod rtw88/r202.ef584ec -k 6.2.6-arch1-1
Error! Bad return status for module build on kernel: 6.2.6-arch1-1 (x86_64)
Consult /var/lib/dkms/rtw88/r202.ef584ec/build/make.log for more information.
==> WARNING: `dkms install --no-depmod rtw88/r202.ef584ec -k 6.2.6-arch1-1' exited 10
==> dkms install --no-depmod v4l2loopback-dc/1.8.2 -k 6.2.6-arch1-1
Error! Bad return status for module build on kernel: 6.2.6-arch1-1 (x86_64)
Consult /var/lib/dkms/v4l2loopback-dc/1.8.2/build/make.log for more information.
==> WARNING: `dkms install --no-depmod v4l2loopback-dc/1.8.2 -k 6.2.6-arch1-1' exited 10
==> dkms install --no-depmod vboxhost/7.0.6_OSE -k 6.2.6-arch1-1
Error! Bad return status for module build on kernel: 6.2.6-arch1-1 (x86_64)
Consult /var/lib/dkms/vboxhost/7.0.6_OSE/build/make.log for more information.
==> WARNING: `dkms install --no-depmod vboxhost/7.0.6_OSE -k 6.2.6-arch1-1' exited 10
$ ausearch -f generated/autoconf.h
###Snip
----
type=PROCTITLE msg=audit(03/15/2023 18:05:29.355:131) : proctitle=make -f ./scripts/Makefile.clean obj=.
type=PATH msg=audit(03/15/2023 18:05:29.355:131) : item=1 name=include/generated/autoconf.h inode=498329 dev=103:03 mode=file,644 ouid=root ogid=root rdev=00:00 nametype=DELETE cap_fp=none cap_fi=none cap_fe=0 cap_fver=0 cap_frootid=0
type=PATH msg=audit(03/15/2023 18:05:29.355:131) : item=0 name=include/generated/ inode=509166 dev=103:03 mode=dir,755 ouid=root ogid=root rdev=00:00 nametype=PARENT cap_fp=none cap_fi=none cap_fe=0 cap_fver=0 cap_frootid=0
type=CWD msg=audit(03/15/2023 18:05:29.355:131) : cwd=/usr/lib/modules/6.2.6-arch1-1/build
type=SYSCALL msg=audit(03/15/2023 18:05:29.355:131) : arch=x86_64 syscall=unlink success=yes exit=0 a0=0x55c4e0458534 a1=0x0 a2=0x0 a3=0x1 items=2 ppid=17656 pid=17692 auid=--- uid=root gid=root euid=root suid=root fsuid=root egid=root sgid=root fsgid=root tty=pts2 ses=1 comm=make exe=/usr/bin/make subj=unconfined key=(null)
$ pacman -Qo /usr/lib/modules/6.2.6-arch1-1/build/scripts/Makefile.clean
/usr/lib/modules/6.2.6-arch1-1/build/scripts/Makefile.clean is owned by linux-headers 6.2.6.arch1-1

Note the unlink syscall in the audit log

A (very hacky) workaround is the following:

  • Install linux-headers with pacman and abort during the DKMS module build (during post-transaction hooks)
  • Now you should have an intact generated/autoconf.h
  • Make it immutable so it can't be deleted: chattr +i /usr/lib/modules/6.2.6-arch1-1/build/include/generated/autoconf.h
  • pacman -S linux-headers again but let it run. Your DKMS modules should build correctly now:
Shell output
$ pacman -S linux-headers
warning: linux-headers-6.2.6.arch1-1 is up to date -- reinstalling
resolving dependencies...
looking for conflicting packages...

Packages (1) linux-headers-6.2.6.arch1-1

Total Installed Size:  158.22 MiB
Net Upgrade Size:        0.00 MiB

:: Proceed with installation? [Y/n]
(1/1) checking keys in keyring                                               [############################################] 100%
(1/1) checking package integrity                                             [############################################] 100%
(1/1) loading package files                                                  [############################################] 100%
(1/1) checking for file conflicts                                            [############################################] 100%
(1/1) checking available disk space                                          [############################################] 100%
warning: could not get file information for usr/lib/modules/6.2.6-arch1-1/build/include/generated/autoconf.h
warning: could not get file information for usr/lib/modules/6.2.6-arch1-1/build/include/generated/rustc_cfg
:: Running pre-transaction hooks...
(1/1) Remove upgraded DKMS modules
:: Processing package changes...
(1/1) reinstalling linux-headers                                             [############################################] 100%
:: Running post-transaction hooks...
(1/3) Arming ConditionNeedsUpdate...
(2/3) Updating module dependencies...
(3/3) Install DKMS modules
==> dkms install --no-depmod rtw88/r202.ef584ec -k 6.2.6-arch1-1
^C
Interrupt signal received
error: command terminated by signal 2: Interrupt
$ chattr +i /usr/lib/modules/6.2.6-arch1-1/build/include/generated/autoconf.h
$ pacman -S linux-headers
warning: linux-headers-6.2.6.arch1-1 is up to date -- reinstalling
resolving dependencies...
looking for conflicting packages...

Packages (1) linux-headers-6.2.6.arch1-1

Total Installed Size:  158.22 MiB
Net Upgrade Size:        0.00 MiB

:: Proceed with installation? [Y/n]
(1/1) checking keys in keyring                                               [############################################] 100%
(1/1) checking package integrity                                             [############################################] 100%
(1/1) loading package files                                                  [############################################] 100%
(1/1) checking for file conflicts                                            [############################################] 100%
(1/1) checking available disk space                                          [############################################] 100%
:: Running pre-transaction hooks...
(1/1) Remove upgraded DKMS modules
:: Processing package changes...
error: cannot remove file '/usr/lib/modules/6.2.6-arch1-1/build/include/generated/autoconf.h': Operation not permitted
(1/1) reinstalling linux-headers                                             [############################################] 100%
warning: warning given when extracting /usr/lib/modules/6.2.6-arch1-1/build/include/generated/autoconf.h (Could not unlink)
:: Running post-transaction hooks...
(1/3) Arming ConditionNeedsUpdate...
(2/3) Updating module dependencies...
(3/3) Install DKMS modules
==> dkms install --no-depmod rtw88/r202.ef584ec -k 6.2.6-arch1-1
==> dkms install --no-depmod v4l2loopback-dc/1.8.2 -k 6.2.6-arch1-1
==> dkms install --no-depmod vboxhost/7.0.6_OSE -k 6.2.6-arch1-1
==> depmod 6.2.6-arch1-1

I don't really know where I should report this properly though, it seems to be an issue either in the kernel-provided build scripts or in the Arch linux-headers package

@pickfire
Copy link
Author

paccheck reported it too

> sudo paccheck --quiet
linux-cachyos-headers: '/usr/lib/modules/6.2.8-1-cachyos/build/include/generated/autoconf.h' missing file
linux-cachyos-headers: '/usr/lib/modules/6.2.8-1-cachyos/build/include/generated/rustc_cfg' missing file
linux-zen-headers: '/usr/lib/modules/6.2.8-zen1-1.1-zen/build/include/generated/autoconf.h' missing file
linux-zen-headers: '/usr/lib/modules/6.2.8-zen1-1.1-zen/build/include/generated/rustc_cfg' missing file

@ptr1337
Copy link
Member

ptr1337 commented Mar 29, 2023

I will check today, if this is a packaging issue. But I don't think so at all.
Im also not able to reproduce that. DKMS is installing fine and also on fresh installation, which I did in QEMU and installing v4l2-loopback.
Could be there something else, which messed things up? Can you reproduce this on a fresh arch/cachyos installation?

Anyways, maybe it is worth to report this at https://bugs.archlinux.org. Maybe heftig knows whats going on there, since linux-zen seems also affected from.

@aedoq
You said this is a DKMS issue at all? Then creating a issue at https://github.com/dell/dkms/issues would also maybe help.

@pickfire
Copy link
Author

Could be there something else, which messed things up? Can you reproduce this on a fresh arch/cachyos installation?

Is there any way I can do that easily? I don't really want to spend so much time to set up a new machine again to test this out, even on qemu, is there like a one command test it out thing?

@pickfire
Copy link
Author

pickfire commented Jul 12, 2023

This issue is back

> cat /var/lib/dkms/v4l2loopback/0.12.7/build/make.log
DKMS make.log for v4l2loopback-0.12.7 for kernel 6.4.3-1-cachyos (x86_64)
2023年 07月 12日 星期三 09:17:52 +08
Building v4l2-loopback driver...
make -C /usr/lib/modules/6.4.3-1-cachyos/build M=/var/lib/dkms/v4l2loopback/0.12.7/build modules
  CC [M]  /var/lib/dkms/v4l2loopback/0.12.7/build/v4l2loopback.o
In file included from <command-line>:
././include/linux/kconfig.h:5:10: fatal error: generated/autoconf.h: No such file or directory
    5 | #include <generated/autoconf.h>
      |          ^~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make[2]: *** [scripts/Makefile.build:252: /var/lib/dkms/v4l2loopback/0.12.7/build/v4l2loopback.o] Error 1
make[1]: *** [Makefile:2024: /var/lib/dkms/v4l2loopback/0.12.7/build] Error 2
make: *** [Makefile:43: v4l2loopback.ko] Error 2

And when installing linux-zen-headers

> sudo pacman -S linux-zen-headers
warning: linux-zen-headers-6.4.3.zen1-1 is up to date -- reinstalling
resolving dependencies...
looking for conflicting packages...

Packages (1) linux-zen-headers-6.4.3.zen1-1

Total Installed Size:  163.68 MiB
Net Upgrade Size:        0.00 MiB

:: Proceed with installation? [Y/n] 
(1/1) checking keys in keyring                     [----------------------] 100%
(1/1) checking package integrity                   [----------------------] 100%
(1/1) loading package files                        [----------------------] 100%
(1/1) checking for file conflicts                  [----------------------] 100%
(1/1) checking available disk space                [----------------------] 100%
warning: could not get file information for usr/lib/modules/6.4.3-zen1-1-zen/build/include/generated/autoconf.h
warning: could not get file information for usr/lib/modules/6.4.3-zen1-1-zen/build/include/generated/rustc_cfg
:: Running pre-transaction hooks...
(1/1) Remove upgraded DKMS modules
:: Processing package changes...
(1/1) reinstalling linux-zen-headers               [----------------------] 100%
:: Running post-transaction hooks...
(1/3) Arming ConditionNeedsUpdate...
(2/3) Updating module dependencies...
(3/3) Install DKMS modules
==> dkms install --no-depmod hid-nintendo/3.2.r5.g2712136 -k 6.4.3-zen1-1-zen
Error! Bad return status for module build on kernel: 6.4.3-zen1-1-zen (x86_64)
Consult /var/lib/dkms/hid-nintendo/3.2.r5.g2712136/build/make.log for more information.
==> WARNING: `dkms install --no-depmod hid-nintendo/3.2.r5.g2712136 -k 6.4.3-zen1-1-zen' exited 10
==> dkms install --no-depmod v4l2loopback/0.12.7 -k 6.4.3-zen1-1-zen
Error! Bad return status for module build on kernel: 6.4.3-zen1-1-zen (x86_64)
Consult /var/lib/dkms/v4l2loopback/0.12.7/build/make.log for more information.
==> WARNING: `dkms install --no-depmod v4l2loopback/0.12.7 -k 6.4.3-zen1-1-zen' exited 10

@ptr1337
Copy link
Member

ptr1337 commented Jul 12, 2023

That is really weird, since there were again no changes in the packing or anything else.
You could try to place the files manually into your headers package.

Is at your disk everything fine ?

@aedoq
Copy link

aedoq commented Jul 12, 2023

There was an issue where apparently some DKMS config update (?) some time ago broke a few AUR packages, including hid-nintendo-nso-dkms (see here). In my case, this was rtw88-dkms-git, which has now been fixed.
See also discussions in the Arch forums: [1] [2]

TLDR: hid-nintendo-nso-dkms is broken and deletes your header files everytime it builds. Until it gets fixed, use the workaround described in the AUR comments.

@pickfire
Copy link
Author

pickfire commented Jul 20, 2023

Thanks, looks like removing hid-nintendo-dkms solves the issue. I guess we can close this now since it is a hid-nintendo issue.

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

No branches or pull requests

3 participants