Installing kernel module from AUR fails

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? :wink:

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.

Post /var/lib/dkms/nct6687d-dkms-git/r30.4f00ace/build/make.log

and

ls -l /var/lib/dkms
$ cat /var/lib/dkms/nct6687d-dkms-git/r30.4f00ace/build/make.log
DKMS make.log for nct6687d-dkms-git-r30.4f00ace for kernel 5.16.9-zen1-1-zen (x86_64)
Fr 18. Feb 17:09:17 CET 2022
rm -rf /var/lib/dkms/nct6687d-dkms-git/r30.4f00ace/build/5.16.9-zen1-1-zen
mkdir -p /var/lib/dkms/nct6687d-dkms-git/r30.4f00ace/build/5.16.9-zen1-1-zen
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.16.9-zen1-1-zen
cd /var/lib/dkms/nct6687d-dkms-git/r30.4f00ace/build/5.16.9-zen1-1-zen
make -C /lib/modules/5.16.9-zen1-1-zen/build M=/var/lib/dkms/nct6687d-dkms-git/r30.4f00ace/build/5.16.9-zen1-1-zen modules
make[1]: Warnung: Kein Jobserver verfΓΌgbar: -j1 wird gesetzt. FΓΌgen Sie der Ursprungsregel
β€ž+β€œ hinzu.
make[1]: Verzeichnis β€ž/usr/lib/modules/5.16.9-zen1-1-zen/buildβ€œ wird betreten
  CC [M]  /var/lib/dkms/nct6687d-dkms-git/r30.4f00ace/build/5.16.9-zen1-1-zen/nct6687.o
  MODPOST /var/lib/dkms/nct6687d-dkms-git/r30.4f00ace/build/5.16.9-zen1-1-zen/Module.symvers
  CC [M]  /var/lib/dkms/nct6687d-dkms-git/r30.4f00ace/build/5.16.9-zen1-1-zen/nct6687.mod.o
  LD [M]  /var/lib/dkms/nct6687d-dkms-git/r30.4f00ace/build/5.16.9-zen1-1-zen/nct6687.ko
  BTF [M] /var/lib/dkms/nct6687d-dkms-git/r30.4f00ace/build/5.16.9-zen1-1-zen/nct6687.ko
make[1]: Verzeichnis β€ž/usr/lib/modules/5.16.9-zen1-1-zen/buildβ€œ wird verlassen
$ ls -l /var/lib/dkms
insgesamt 0
drwxr-xr-x 1 root root  22 18. Feb 16:56 nct6687d-dkms-git
drwxr-xr-x 1 root root 250 18. Feb 16:56 v4l2loopback
drwxr-xr-x 1 root root 254 18. Feb 16:56 vhba-module

Running out of ideas.
Please post the content of the dkms.conf file

This one?

/var/lib/dkms/nct6687d-dkms-git/r30.4f00ace/build> cat dkms.conf
PACKAGE_NAME="nct6687d-dkms-git"
PACKAGE_VERSION="r30.4f00ace"
AUTOINSTALL="yes"

BUILT_MODULE_NAME[0]="nct6687"
DEST_MODULE_LOCATION[0]="/updates"
MAKE[0]="make TARGET=${kernelver} KERNEL_BUILD=${kernel_source_dir}"

#POST_REMOVE="rmdir /usr/lib/modules/${kernelver}/updates"%

Btw, this is the package: https://aur.archlinux.org/packages/nct6687d-dkms-git

That’s the one.

Try dkms install nct6687/r30.4f00ace

$ 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.

Probably not related to this issue, but it’s worth updating again as we’re on to 5.16.10 now.

Updating made no difference

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'
1 Like

Huh. So the package is just broken?

That was just an idea born out of desperation. :slight_smile:

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.

The module itself builds from source so it’s something in the DKMS setup within the nct6687d-dkms-git package… :thinking:

What I noticed is that % at the end. Is it supposed to be there?

#POST_REMOVE="rmdir /usr/lib/modules/${kernelver}/updates"%

That line is commented out so won’t do anything during the module build process.

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)

tree /var/lib/dkms/nct6687d-dkms-git
/var/lib/dkms/nct6687d-dkms-git
└── r30.4f00ace
    β”œβ”€β”€ build
    β”‚   β”œβ”€β”€ 5.16.10-246-tkg-pds
    β”‚   β”‚   β”œβ”€β”€ Makefile
    β”‚   β”‚   β”œβ”€β”€ modules.order
    β”‚   β”‚   β”œβ”€β”€ Module.symvers
    β”‚   β”‚   β”œβ”€β”€ nct6687.c
    β”‚   β”‚   β”œβ”€β”€ nct6687.ko
    β”‚   β”‚   β”œβ”€β”€ nct6687.mod
    β”‚   β”‚   β”œβ”€β”€ nct6687.mod.c
    β”‚   β”‚   β”œβ”€β”€ nct6687.mod.o
    β”‚   β”‚   └── nct6687.o
    β”‚   β”œβ”€β”€ dkms.conf
    β”‚   β”œβ”€β”€ LICENSE
    β”‚   β”œβ”€β”€ Makefile
    β”‚   β”œβ”€β”€ make.log
    β”‚   β”œβ”€β”€ nct6687.c
    β”‚   └── README.md
    └── source -> /usr/src/nct6687d-dkms-git-r30.4f00ace

4 directories, 15 files

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?).

I suspect this is what broke DKMS.

3 Likes

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.

1 Like