r8168 icon indicating copy to clipboard operation
r8168 copied to clipboard

Error! Bad return status for module build on kernel: 5.18.0-zen1-1-zen (x86_64)

Open cryptoquick opened this issue 2 years ago • 2 comments

I received the error in the title of this issue upon doing a full system upgrade on Garuda Linux (an Arch derivative). The kernel upgrade output also provided this line:

Consult /var/lib/dkms/r8168/8.050.02/build/make.log for more information.

The contents of the log file in question:

DKMS make.log for r8168-8.050.02 for kernel 5.18.0-zen1-1-zen (x86_64)
Sun May 29 14:52:40 MDT 2022
make: Entering directory '/usr/lib/modules/5.18.0-zen1-1-zen/build'
  CC [M]  /var/lib/dkms/r8168/8.050.02/build/src/r8168_n.o
  CC [M]  /var/lib/dkms/r8168/8.050.02/build/src/r8168_asf.o
  CC [M]  /var/lib/dkms/r8168/8.050.02/build/src/rtl_eeprom.o
  CC [M]  /var/lib/dkms/r8168/8.050.02/build/src/rtltool.o
/var/lib/dkms/r8168/8.050.02/build/src/r8168_n.c: In function  ^`^xrtl8168_mac_loopback_test ^`^y:
/var/lib/dkms/r8168/8.050.02/build/src/r8168_n.c:3701:17: error: implicit declaration of function  ^`^xpci_dma_sync_single_for_device ^`^y; did you mean  ^`^xdma_sync_single_for_device ^`^y? [-Werror=implicit-fun>
 3701 |                 pci_dma_sync_single_for_device(tp->pci_dev,
      |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |                 dma_sync_single_for_device
/var/lib/dkms/r8168/8.050.02/build/src/r8168_n.c: In function  ^`^xrtl8168_init_board ^`^y:
/var/lib/dkms/r8168/8.050.02/build/src/r8168_n.c:26411:14: error: implicit declaration of function  ^`^xpci_set_dma_mask ^`^y [-Werror=implicit-function-declaration]
26411 |             !pci_set_dma_mask(pdev, DMA_BIT_MASK(64)) &&
      |              ^~~~~~~~~~~~~~~~
/var/lib/dkms/r8168/8.050.02/build/src/r8168_n.c:26412:14: error: implicit declaration of function  ^`^xpci_set_consistent_dma_mask ^`^y [-Werror=implicit-function-declaration]
26412 |             !pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(64))) {
      |              ^~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
make[1]: *** [scripts/Makefile.build:288: /var/lib/dkms/r8168/8.050.02/build/src/r8168_n.o] Error 1
make: *** [Makefile:1829: /var/lib/dkms/r8168/8.050.02/build/src] Error 2
make: Leaving directory '/usr/lib/modules/5.18.0-zen1-1-zen/build'

Let me know if there's any more information I can provide.

cryptoquick avatar May 29 '22 20:05 cryptoquick

Try my 2nd patch in issue 40(2 down from here). The lines are close enough that it should work, otherwise tweak it slightly. You could even do it manually if necessary - it's fairly short and straightforward.

petehg avatar May 30 '22 17:05 petehg

Works fine with Kernel 5.18 / debian

sissiwup avatar Jul 24 '22 09:07 sissiwup