emilyst / hid-nx-dkms

Alternative Linux kernel HID driver for Nintendo Switch controllers
GNU General Public License v2.0
40 stars 6 forks source link

"Error! Bad return status for module build on kernel" #12

Open Impeta opened 1 year ago

Impeta commented 1 year ago

Couldn't install your own module over my latest Linux kernel (6.3.3), sadly. I'm on Arch Linux, so naturally, I went for the package and building method.

Error! Bad return status for module build on kernel:
Consult /var/lib/dkms/hid-nx/v1.14/build/make.log for more information.
==> WARNING: `dkms install --no-depmod hid-nx/v1.14 -k (kernel)' exited 10

This is the said make.log:

DKMS make.log for hid-nx-v1.14 for kernel 6.3.3-nitrous-1 (x86_64)
dom 21 mai 2023 15:05:56 -03
  CC [M]  /var/lib/dkms/hid-nx/v1.14/build/hid-nx.o
In file included from <built-in>:2:
././include/linux/kconfig.h:5:10: fatal error: 'generated/autoconf.h' file not found
#include <generated/autoconf.h>
         ^~~~~~~~~~~~~~~~~~~~~~
1 error generated.
make[1]: *** [scripts/Makefile.build:252: /var/lib/dkms/hid-nx/v1.14/build/hid-nx.o] Error 1
make: *** [Makefile:2018: /var/lib/dkms/hid-nx/v1.14/build] Error 2

Cheers!

emilyst commented 1 year ago

Hi, can you verify that the linux-headers package for your current kernel has been installed?

Impeta commented 1 year ago

Hi, can you verify that the linux-headers package for your current kernel has been installed?

Quick reply! Hi, thanks! The equivalent is linux-nitrous-headers, and yes I do have it installed. It won't install correctly, alas. Funnily enough, I figured to make a quick test with the bare standard kernel itself, linux and linux-headers, and it works flawlessly for installing your module. For reference, I would like to install it too on my linux-lts and linux-nitrous, both already has got their headers equivalent installed.

(1/3) Arming ConditionNeedsUpdate...
(2/3) Install DKMS modules
==> dkms install --no-depmod hid-nx/v1.14 -k 5.15.94-1-lts
Error! Bad return status for module build on kernel: 5.15.94-1-lts (x86_64)
Consult /var/lib/dkms/hid-nx/v1.14/build/make.log for more information.
==> WARNING: `dkms install --no-depmod hid-nx/v1.14 -k 5.15.94-1-lts' exited 10
==> dkms install --no-depmod hid-nx/v1.14 -k 6.3.3-nitrous-1
Error! Bad return status for module build on kernel: 6.3.3-nitrous-1 (x86_64)
Consult /var/lib/dkms/hid-nx/v1.14/build/make.log for more information.
==> WARNING: `dkms install --no-depmod hid-nx/v1.14 -k 6.3.3-nitrous-1' exited 10
==> dkms install --no-depmod hid-nx/v1.14 -k 6.3.2-arch1-1
==> depmod 6.3.2-arch1-1
(3/3) Refreshing PackageKit...
emilyst commented 1 year ago

I don't know anything about linux-nitrous, but since linux-headers works fine and linux-nitrous-headers does not, it seems like the issue is with linux-nitrous-headers.

I would suggest pursuing the issue with them. Since the Arch Linux wiki says you can seek help in their repo's issues, I suggest trying to ask there.

Impeta commented 1 year ago

Roger, thank you for the direction and patience! :+1:

xdevs23 commented 1 year ago

@emilyst Where does generated/autoconf.h come from? What's the absolute path? I checked the headers package of linux-nitrous and it does contain it. I added a copy command to the PKGBUILD to copy over generated headers but then, after building, realized that it was already there and thus has been copied twice. So there must be an issue with relative paths here or the linux includes directory is not in the include search path.

I know that nvidia, acpi_call and evdi builds fine via DKMS on Nitrous.

emilyst commented 1 year ago

@emilyst Where does generated/autoconf.h come from? What's the absolute path?

Good questions! I don't know!

I checked the headers package of linux-nitrous and it does contain it. I added a copy command to the PKGBUILD to copy over generated headers but then, after building, realized that it was already there and thus has been copied twice. So there must be an issue with relative paths here or the linux includes directory is not in the include search path.

Huh, good to know. Thanks for taking a look, regardless.

I know that nvidia, acpi_call and evdi builds fine via DKMS on Nitrous.

I'm beginning to suspect that this has nothing to do with Nitrous and more to do with the change in kernel version. It wasn't until I carefully read the output above that I noticed the kernel version changes from 5 to 6.

Why that would break DKMS is beyond me, but maybe I'm doing something weird. I'll try to take a look at this soon.

xdevs23 commented 11 months ago

Any news here? Otherwise I'll consider closing the issue on my side.

emilyst commented 11 months ago

Any news here? Otherwise I'll consider closing the issue on my side.

Terribly sorry about this, but I didn't make any headway.

I should probably re-install Arch on something and try again.