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

[DKMS] AUR DKMS Module Fails to Link With Linux-tkg-pds-llvm #390

Open
ThisNekoGuy opened this issue Dec 27, 2021 · 14 comments
Open

[DKMS] AUR DKMS Module Fails to Link With Linux-tkg-pds-llvm #390

ThisNekoGuy opened this issue Dec 27, 2021 · 14 comments
Labels
upstream Not directly related to this repo

Comments

@ThisNekoGuy
Copy link

ThisNekoGuy commented Dec 27, 2021

configuration-info.zip

I was trying to add the Nintendo Switch Joy-Con controller DKMS module from the AUR but it "returned a bad status" for some reason? It builds against other kernels just fine :/

:: Processing package changes...
(1/1) installing hid-nintendo-dkms                                                                                              [#############################################################################] 100%
:: Running post-transaction hooks...
(1/6) Arming ConditionNeedsUpdate...
(2/6) Install DKMS modules
==> dkms install --no-depmod hid-nintendo/3.2 -k 5.14.21-230-tkg-pds-llvm
Error! Bad return status for module build on kernel: 5.14.21-230-tkg-pds-llvm (x86_64)
Consult /var/lib/dkms/hid-nintendo/3.2/build/make.log for more information.
==> WARNING: `dkms install --no-depmod hid-nintendo/3.2 -k 5.14.21-230-tkg-pds-llvm' exited 10
@ptr1337
Copy link
Contributor

ptr1337 commented Dec 27, 2021

Which dkms version youre running ?

@ThisNekoGuy
Copy link
Author

3.0.3-1

@ptr1337
Copy link
Contributor

ptr1337 commented Dec 27, 2021

clang, lld, llvm installed?

and output of:
cat /var/lib/dkms/hid-nintendo/3.2/build/make.log

@ThisNekoGuy
Copy link
Author

clang, lld, llvm installed?

Yes

neko-san@ARCH ~ [1]> doas dkms install --no-depmod hid-nintendo/3.2 -k 5.14.21-230-tkg-pds-llvm
doas (neko-san@ARCH) password: 

Building module:
cleaning build area...(bad exit status: 2)
make -j16 KERNELRELEASE=5.14.21-230-tkg-pds-llvm -C /usr/lib/modules/5.14.21-230-tkg-pds-llvm/build M=/var/lib/dkms/hid-nintendo/3.2/build/src modules CC=clang LD=ld.lld...(bad exit status: 2)
Error! Bad return status for module build on kernel: 5.14.21-230-tkg-pds-llvm (x86_64)
Consult /var/lib/dkms/hid-nintendo/3.2/build/make.log for more information.
neko-san@ARCH ~/w/proton-tkg (master) [10]> cat /var/lib/dkms/hid-nintendo/3.2/build/make.log
DKMS make.log for hid-nintendo-3.2 for kernel 5.14.21-230-tkg-pds-llvm (x86_64)
Mon Dec 27 13:35:17 CST 2021
make: Entering directory '/usr/lib/modules/5.14.21-230-tkg-pds-llvm/build'

  ERROR: Kernel configuration is invalid.
         include/generated/autoconf.h or include/config/auto.conf are missing.
         Run 'make oldconfig && make prepare' on kernel src to fix it.

make: *** [Makefile:748: include/config/auto.conf] Error 1
make: Leaving directory '/usr/lib/modules/5.14.21-230-tkg-pds-llvm/build'
neko-san@ARCH ~> 

@ThisNekoGuy
Copy link
Author

However, other DKMS modules I have have no problem with my kernel

@ptr1337
Copy link
Contributor

ptr1337 commented Dec 27, 2021

However, other DKMS modules I have have no problem with my kernel

Rebuild the package which got the hid-nintendo moduel in with llvm. that will work :)

@ThisNekoGuy
Copy link
Author

Its only dependencies are: 'dkms' and 'bc'; you're saying I should compile bc with llvm?
I had looked over the PKGBUILD and it doesn't even compile the module, it just "installs" it :/

@C43H66N12O12S2
Copy link

This package ships a dkms.conf and overrides the default with it, and that's likely the issue. Download the package from AUR, and modify the dkms.conf to work with Clang, then makepkg manually.

@ptr1337
Copy link
Contributor

ptr1337 commented Dec 27, 2021

Yeah, did tested it. Since its more a -bin then a make pkgbuild. With the dkms config i dont get it worked. Even if i got a custom compiled gcc, the dkms installation fails.

Maybe manually compile the module with llvm. Or live without lto or without the module :D

@ThisNekoGuy
Copy link
Author

modify the dkms.conf to work with Clang

I don't know how to do this?

Maybe manually compile the module with llvm

I've never compiled a module by itself before?
I found on its github to do this:

git clone https://github.com/nicman23/dkms-hid-nintendo
cd dkms-hid-nintendo

sudo dkms add .
sudo dkms build nintendo -v 3.2
sudo dkms install nintendo -v 3.2

But doing it manually like this would also mean that I wouldn't know when the package has an update :/

I had made a request over at the community-patches repo about adding support for the driver a while ago (before I realized there was a DKMS AUR package for it) but struggling with this is kind of making me feel more strongly about that :/

@C43H66N12O12S2
Copy link

I don't know how to do this?

Put CC=clang CXX=clang++ to the top of dkms.conf in the package.

@ThisNekoGuy
Copy link
Author

@C43H66N12O12S2 This didn't work; it produces the same result

@flindeberg
Copy link
Contributor

It seems to be an issue with dkms-hid-nintendo and llvm. I'd open an issue at https://github.com/nicman23/dkms-hid-nintendo/issues instead. Both dkms and linux-tkg behaves as expected.

A bit off-topic, but from the dkms-hid-nintendo build-log:

make: Entering directory '/usr/lib/modules/5.15.11-230-tkg-cacule-llvm/build'

  ERROR: Kernel configuration is invalid.
         include/generated/autoconf.h or include/config/auto.conf are missing.
         Run 'make oldconfig && make prepare' on kernel src to fix it.

@ThisNekoGuy
Copy link
Author

@flindeberg

A bit off-topic, but from the dkms-hid-nintendo build-log:

I already know about that but performing this (basically already done automatically in linux-tkg) makes no difference

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

No branches or pull requests

5 participants