morrownr / 88x2bu-20210702

Linux Driver for USB WiFi Adapters that are based on the RTL8812BU and RTL8822BU Chipsets - v5.13.1

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Driver installation failed with gcc 11

KaMyKaSii opened this issue · comments

I've been using your driver for a long time on KDE Neon but now the driver won't install anymore.

: ---------------------------
: install-driver.sh v20230628
: x86_64 (architecture)
: 4/4 (in-use/total processing units)
: 3884804 (total system memory)
: 6.4.10-060410-generic (kernel version)
: gcc (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0
: dkms-2.8.7
: SecureBoot disabled
: ---------------------------

Checking for previously installed drivers.
: ---------------------------

Starting installation.
Installing 88x2bu.conf to /etc/modprobe.d
The dkms installation routines are in use.
Copying source files to /usr/src/rtl88x2bu-5.13.1
Creating symlink /var/lib/dkms/rtl88x2bu/5.13.1/source -> /usr/src/rtl88x2bu-5.13.1
The driver was added to dkms successfully.
: ---------------------------

Kernel preparation unnecessary for this kernel. Skipping...

Building module:
cleaning build area...
./dkms-make.sh...(bad exit status: 2)
Error! Bad return status for module build on kernel: 6.4.10-060410-generic (x86_64)
Consult /var/lib/dkms/rtl88x2bu/5.13.1/build/make.log for more information.
Command exited with non-zero status 10
Compile time: 0.34 seconds
An error occurred. dkms build error:  10
Please report this error.
Please copy all screen output and paste it into the problem report.
Run the following before reattempting installation.
$ sudo ./remove-driver.sh

/var/lib/dkms/rtl88x2bu/5.13.1/build/make.log:

DKMS make.log for rtl88x2bu-5.13.1 for kernel 6.4.10-060410-generic (x86_64)
qua 16 ago 2023 14:17:03 -03
make ARCH=x86_64 CROSS_COMPILE= -C /lib/modules/6.4.10-060410-generic/build M=/var/lib/dkms/rtl88x2bu/5.13.1/build  modules
make[1]: Entering directory '/usr/src/linux-headers-6.4.10-060410-generic'
warning: the compiler differs from the one used to build the kernel
  The kernel was built by: x86_64-linux-gnu-gcc-13 (Ubuntu 13.2.0-1ubuntu1) 13.2.0
  You are using:           
/bin/sh: 1: gcc-13: not found
(standard_in) 1: syntax error
  CC [M]  /var/lib/dkms/rtl88x2bu/5.13.1/build/core/rtw_cmd.o
/bin/sh: 1: gcc-13: not found
make[2]: *** [scripts/Makefile.build:252: /var/lib/dkms/rtl88x2bu/5.13.1/build/core/rtw_cmd.o] Error 127
make[1]: *** [Makefile:2038: /var/lib/dkms/rtl88x2bu/5.13.1/build] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-6.4.10-060410-generic'
make: *** [Makefile:2523: modules] Error 2

After editing the dkms-make.sh file and adding the parameter CC=/usr/bin/gcc-12 in the make command the installation becomes successful.

commented

Hi @KaMyKaSii

Once you stretch things out, for the lack of a better way to say it, dkms will start resisting. Another way to say it is dkms checks what compiler version is used to compile the kernel and once you have a compiler that far enough behind the kernel, dkms does not like it...and for good reason. It gets hard to maintain compatibility. I'm not aware of an automatic way to fix the problem given that I try to make the drivers here compatible with as many distros as possible so...

Here is what I generally recommend as a solution:

Go to the site Main Menu:

https://github.com/morrownr/USB-WiFi

Select:

  1. How to install multiple gcc compiler versions

FYI: You won't see this if you continue to use the kernel for the distro version you are using as the devs are mindful of this. The Ubuntu devs seem to have moved from gcc 12 to gcc 13 with kernel 6.4.4 which would have triggered this.