Probably because you did install the kernel, but not the kernel headers.
Maybe we should concentrate on solving the original issue and not adding more?
Now, to try fixing the issue for the currently running kernel execute dkms install nct6687d-dkms-git/r30.4f00ace
Probably because you did install the kernel, but not the kernel headers.
No, but I probably had the headers still installed.
$ sudo dkms install nct6687d-dkms-git/r30.4f00ace
Building module:
cleaning build area...
make -j12 KERNELRELEASE=5.16.9-zen1-1-zen TARGET=5.16.9-zen1-1-zen KERNEL_BUILD=/usr/lib/modules/5.16.9-zen1-1-zen/build...
Error! Build of nct6687.ko failed for: 5.16.9-zen1-1-zen (x86_64)
Make sure the name of the generated module is correct and at the root of the
build directory, or consult make.log in the build directory
/var/lib/dkms/nct6687d-dkms-git/r30.4f00ace/build for more information.
$ sudo dkms install nct6687/r30.4f00ace
Error! Could not find module source directory.
Directory: /usr/src/nct6687-r30.4f00ace does not exist.
What does exist, ist /usr/src/nct6687d-dkms-git-r30.4f00ace
And:
sudo dkms install nct6687d/dkms-git-r30.4f00ace
Creating symlink /var/lib/dkms/nct6687d/dkms-git-r30.4f00ace/source -> /usr/src/nct6687d-dkms-git-r30.4f00ace
Building module:
cleaning build area...
make -j12 KERNELRELEASE=5.16.9-zen1-1-zen TARGET=5.16.9-zen1-1-zen KERNEL_BUILD=/usr/lib/modules/5.16.9-zen1-1-zen/build...
Error! Build of nct6687.ko failed for: 5.16.9-zen1-1-zen (x86_64)
Make sure the name of the generated module is correct and at the root of the
build directory, or consult make.log in the build directory
/var/lib/dkms/nct6687d/dkms-git-r30.4f00ace/build for more information.
OK, I can replicate here (linux-zen, linux-lqx, linux-mainline), so itβs not something specific to your system:
==> dkms install --no-depmod nct6687d-dkms-git/r30.4f00ace -k 5.16.10-zen1-1-zen
Error! Build of nct6687.ko failed for: 5.16.10-zen1-1-zen (x86_64)
Make sure the name of the generated module is correct and at the root of the
build directory, or consult make.log in the build directory
/var/lib/dkms/nct6687d-dkms-git/r30.4f00ace/build for more information.
==> WARNING: `dkms install --no-depmod nct6687d-dkms-git/r30.4f00ace -k 5.16.10-zen1-1-zen' exited 7
==> dkms install --no-depmod nct6687d-dkms-git/r30.4f00ace -k 5.16.9-lqx1-1-lqx
Error! Build of nct6687.ko failed for: 5.16.9-lqx1-1-lqx (x86_64)
Make sure the name of the generated module is correct and at the root of the
build directory, or consult make.log in the build directory
/var/lib/dkms/nct6687d-dkms-git/r30.4f00ace/build for more information.
==> WARNING: `dkms install --no-depmod nct6687d-dkms-git/r30.4f00ace -k 5.16.9-lqx1-1-lqx' exited 7
==> dkms install --no-depmod nct6687d-dkms-git/r30.4f00ace -k 5.17.0-rc4-1.0-mainline
Error! Build of nct6687.ko failed for: 5.17.0-rc4-1.0-mainline (x86_64)
Make sure the name of the generated module is correct and at the root of the
build directory, or consult make.log in the build directory
/var/lib/dkms/nct6687d-dkms-git/r30.4f00ace/build for more information.
==> WARNING: `dkms install --no-depmod nct6687d-dkms-git/r30.4f00ace -k 5.17.0-rc4-1.0-mainline' exited 7
DKMS make.log for nct6687d-dkms-git-r30.4f00ace for kernel 5.17.0-rc4-1.0-mainline (x86_64)
Fri 18 Feb 16:55:01 GMT 2022
rm -rf /var/lib/dkms/nct6687d-dkms-git/r30.4f00ace/build/5.17.0-rc4-1.0-mainline
mkdir -p /var/lib/dkms/nct6687d-dkms-git/r30.4f00ace/build/5.17.0-rc4-1.0-mainline
cp /var/lib/dkms/nct6687d-dkms-git/r30.4f00ace/build/Makefile /var/lib/dkms/nct6687d-dkms-git/r30.4f00ace/build/nct6687.c /var/lib/dkms/nct6687d-dkms-git/r30.4f00ace/build/5.17.0->
cd /var/lib/dkms/nct6687d-dkms-git/r30.4f00ace/build/5.17.0-rc4-1.0-mainline
make -C /lib/modules/5.17.0-rc4-1.0-mainline/build M=/var/lib/dkms/nct6687d-dkms-git/r30.4f00ace/build/5.17.0-rc4-1.0-mainline modules
make[1]: warning: jobserver unavailable: using -j1. Add '+' to parent make rule.
make[1]: Entering directory '/usr/lib/modules/5.17.0-rc4-1.0-mainline/build'
CC [M] /var/lib/dkms/nct6687d-dkms-git/r30.4f00ace/build/5.17.0-rc4-1.0-mainline/nct6687.o
MODPOST /var/lib/dkms/nct6687d-dkms-git/r30.4f00ace/build/5.17.0-rc4-1.0-mainline/Module.symvers
CC [M] /var/lib/dkms/nct6687d-dkms-git/r30.4f00ace/build/5.17.0-rc4-1.0-mainline/nct6687.mod.o
LD [M] /var/lib/dkms/nct6687d-dkms-git/r30.4f00ace/build/5.17.0-rc4-1.0-mainline/nct6687.ko
BTF [M] /var/lib/dkms/nct6687d-dkms-git/r30.4f00ace/build/5.17.0-rc4-1.0-mainline/nct6687.ko
make[1]: Leaving directory '/usr/lib/modules/5.17.0-rc4-1.0-mainline/build'
We did all what i had to do yesterday to make nvidia-dkms work after the gcc update.
I just canβt interpret this Make sure the name of the generated module is correct and at the root of the build directory bit.
Edit:
I checked the upstream url for the package and the PKGBUILD file, there is nothing obvious to be found.
It seems to be a path problem, but i canβt figure it out.
Care to post the result of tree /var/lib/dkms/nct6687d-dkms-git ?
(Install tree if needed)
It looks like this is a bug in the upstream source code.
This commit:
re-wrote the Makefile and added some weird kernel version handling that doesnβt make any sense (current kernel is returned by uname -r, so why do you need to create a new directory containing the files for the current kernel, when it will always build against the current kernel anyway?).
It wonβt, it depends on what you append to the dkms command. You can specify a kernel or build for all installed kernels.
Still, i believe the issue must be solved upstream.
Edit: Installed dkms and this package in a vm and can reproduce the errors.
Maybe @Elendil should open a bug report upstream.