You are not logged in.

#1 2021-05-20 07:36:23

Cbhihe
Member
Registered: 2017-04-09
Posts: 244

[SOLVED] DKMS: Failure to build module 'r8152' during kernel updates

Hi all:
Whenever I update my kernel and dynamically rebuild kernel module `r8152`, I get the following ouput

...
( 8/14) Arming ConditionNeedsUpdate...
( 9/14) Updating module dependencies...
(10/14) Install DKMS modules
==> dkms install --no-depmod -m r8152 -v 2.10.0 -k 5.12.5-arch1-1
Error! Bad return status for module build on kernel: 5.12.5-arch1-1 (x86_64)
Consult /var/lib/dkms/r8152/2.10.0/build/make.log for more information.
==> Warning, `dkms install --no-depmod -m r8152 -v 2.10.0 -k 5.12.5-arch1-1' returned 10
==> depmod 5.12.5-arch1-1
(11/14) Updating linux initcpios...
...

The box has no Ethernet adapter builtin. An Ethernet dongle is used, but only occasionally when the need for cable connectivity arises.
In other words,  the dongle is not connected to a USB port as a rule.
For what it's worth the dongle is a Realtek Semiconductor Corp. RTL8153 Gigabit Ethernet Adapter (device ID 0bda:8153)

Looking at `/var/lib/dkms/r8152/2.10.0/build/make.log`:

DKMS make.log for r8152-2.10.0 for kernel 5.12.5-arch1-1 (x86_64)
Thu 20 May 2021 08:59:42 CEST
make: Entering directory '/usr/lib/modules/5.12.5-arch1-1/build'
scripts/Makefile.build:43: arch/x86/entry/syscalls/Makefile: No such file or directory
make[1]: *** No rule to make target 'arch/x86/entry/syscalls/Makefile'.  Stop.
make[1]: *** No rule to make target 'bpf/resolve_btfids'.  Stop.
make[1]: Nothing to be done for 'objtool'.
make: *** [arch/x86/Makefile:222: archheaders] Error 2
make: *** Waiting for unfinished jobs....
make: *** [Makefile:1977: tools/bpf/resolve_btfids] Error 2
scripts/Makefile.build:43: arch/x86/tools/Makefile: No such file or directory
make[1]: *** No rule to make target 'arch/x86/tools/Makefile'.  Stop.
make: *** [arch/x86/Makefile:216: archscripts] Error 2
make: Leaving directory '/usr/lib/modules/5.12.5-arch1-1/build'

So apparently I am missing a Makefile. 
A kernel module for Realtek RTL8152/RTL8153/RTL8154/RTL8156 Based USB Ethernet Adapters is available with version 2.14 on AUR, should I just get that and rebuild modules ?

Last edited by Cbhihe (2021-05-20 09:49:53)


I like strawberries, therefore I'm not a bot.

Offline

#2 2021-05-20 08:20:13

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 25,334

Re: [SOLVED] DKMS: Failure to build module 'r8152' during kernel updates

well since the version you currently have is outdated in comparison, you'll probably want to give that a shot, where did you get that from originally if not via the AUR?

Offline

#3 2021-05-20 08:23:38

Cbhihe
Member
Registered: 2017-04-09
Posts: 244

Re: [SOLVED] DKMS: Failure to build module 'r8152' during kernel updates

Just intalled the https://aur.archlinux.org/r8152-dkms.git 2.14-1 module and it produced no error message as before. However:

$ dkms status 
r8152, 2.10.0: added
r8152, 2.14, 5.12.5-arch1-1, x86_64: installed (original_module exists)
$ sudo dkms autoinstall
Error! Could not locate dkms.conf file.
File: /var/lib/dkms/r8152/2.10.0/source/dkms.conf does not exist.
$ sudo dkmsl install -m r8152-dkms -v 2.14-1
Error! Could not find module source directory.
Directory: /usr/src/r8152-dkms-2.14-1 does not exist.

As always, I'm certainly missing something basic... In particular, should I do ?

$ sudo dkms remove -m r8152 -v 2.10.0

I like strawberries, therefore I'm not a bot.

Offline

#4 2021-05-20 08:25:55

Cbhihe
Member
Registered: 2017-04-09
Posts: 244

Re: [SOLVED] DKMS: Failure to build module 'r8152' during kernel updates

V1del wrote:

well since the version you currently have is outdated in comparison, you'll probably want to give that a shot, where did you get that from originally if not via the AUR?

No idea (=the lamest answer I could give you, but I think it is an old AUR package I got from AUR. I keep my boxes very clean in the sense that I NEVER installed anythingthat's not branded either official package repo or AUR, unless it's in a sandbox.


I like strawberries, therefore I'm not a bot.

Offline

#5 2021-05-20 08:31:07

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 25,334

Re: [SOLVED] DKMS: Failure to build module 'r8152' during kernel updates

If it was an AUR package you'd have a package you could cleanly remove or update. That dkms install invocation doesn't work because the -1 is a PKGBUILD rel that will not be relevant for actual interactions with the package itself. ideally DKMS would just build everything automatically when you've installed the package.

Yes you probably want to remove the old version manually via that if it's necessary.

Offline

#6 2021-05-20 09:36:17

Cbhihe
Member
Registered: 2017-04-09
Posts: 244

Re: [SOLVED] DKMS: Failure to build module 'r8152' during kernel updates

V1del wrote:

That dkms install invocation doesn't work because the -1 is a PKGBUILD rel that will not be relevant for actual interactions with the package itself. ideally DKMS would just build everything automatically when you've installed the package.

Yes, of course you are right. I actually had first tried without the package build version, only to get the same result.

Yes you probably want to remove the old version manually via that if it's necessary.

I uninstalled the outdated 2.10.0 version with:

$ sudo pacman -R r8152-dkms-AUR
....
$ rm -fR /var/builds/r8152-dkms-AUR

I am now just perplexed by the fact that I get:

$sudo dkms status
r8152, 2.10.0: added
r8152, 2.14, 5.12.5-arch1-1, x86_64: installed (original_module exists)

$ sudo dkms remove -m r8152 -v 2.10.0
Error! The module/version combo: r8152-2.10.0 is not located in the DKMS tree.

... re-booting now.

Last edited by Cbhihe (2021-05-20 09:51:07)


I like strawberries, therefore I'm not a bot.

Offline

#7 2021-05-20 09:48:57

Cbhihe
Member
Registered: 2017-04-09
Posts: 244

Re: [SOLVED] DKMS: Failure to build module 'r8152' during kernel updates

Back after rebooting, I went on to do:

$ sudo dkms remove -m r8152 -v 2.10.0 --all

------------------------------
Deleting module version: 2.10.0
completely from the DKMS tree.
------------------------------
Done.

$ sudo dkms status
r8152, 2.14, 5.12.5-arch1-1, x86_64: installed (original_module exists)

SOLVED.     (Thank you @V1del for the nudges.)


I like strawberries, therefore I'm not a bot.

Offline

Board footer

Powered by FluxBB