Bug #2530
[wireguard-dkms]: fails to build on linux-libre since at least 5.3.1
100%
Description
Hi, I noticed this happening since linux-libre 5.3.1 and some bug reports on Arch suggested it was a matter of rebuilding the kernel, so I just waited for the next update, but the issue persisted. Said bug reports are closed without a clear fix so I don't have more helpful info :/
DKMS make.log for wireguard-0.0.20191012 for kernel 5.3.7-gnu-1 (x86_64) sáb nov 2 11:38:35 -03 2019 make: se entra en el directorio '/usr/lib/modules/5.3.7-gnu-1/build' CC [M] /var/lib/dkms/wireguard/0.0.20191012/build/noise.o CC [M] /var/lib/dkms/wireguard/0.0.20191012/build/main.o cc1: error: incompatible gcc/plugin versions cc1: error: no se puede inicializar el plugin ./scripts/gcc-plugins/structleak_plugin.so make[1]: *** [scripts/Makefile.build:281: /var/lib/dkms/wireguard/0.0.20191012/build/main.o] Error 1 make[1]: *** Se espera a que terminen otras tareas.... cc1: error: incompatible gcc/plugin versions cc1: error: no se puede inicializar el plugin ./scripts/gcc-plugins/structleak_plugin.so make[1]: *** [scripts/Makefile.build:281: /var/lib/dkms/wireguard/0.0.20191012/build/noise.o] Error 1 make: *** [Makefile:1626: _module_/var/lib/dkms/wireguard/0.0.20191012/build] Error 2 make: se sale del directorio '/usr/lib/modules/5.3.7-gnu-1/build'
Related issues
History
Updated by bill-auger over 4 years ago
- Assignee set to Megver83
- Description updated (diff)
megver - could this be a kernel bug?
Updated by Megver83 over 4 years ago
- Status changed from unconfirmed to forwarded upstream
bill-auger wrote:
megver - could this be a kernel bug?
looks like it is, and if according to fauno the same bug was reported in Arch, then it is a problem of upstream kernel (Torvals), which I cannot solve in the meantime unfortunately. Meanwhile users will have to build it using the LTS kernel
Updated by fauno over 4 years ago
i think it's a package build issue: https://bugs.archlinux.org/task/63644
somewhat related: https://unix.stackexchange.com/questions/547159/how-to-rebuild-gcc-plugins-for-kernel-module
Updated by fauno over 4 years ago
the only difference between the headers package i see between mainline and lts are that mainline contains the failing build/scripts/gcc-plugins/structleak_plugin.so but lts doesn't. i tried removing the file and any binary file in the gcc-plugins directory but now it complains it can't find the file
Updated by fauno over 4 years ago
i fixed it like this, so i think it's a build issue (is the issue tracker indexed by search engines? it should be useful for people asking the same for arch and manjaro)
- download, unpack and patch linux-libre 5.3.7 sources from pkgbuild
```
wget https://linux-libre.fsfla.org/pub/linux-libre/releases/5.3-gnu/linux-libre-5.3-gnu.tar.xz \
https://linux-libre.fsfla.org/pub/linux-libre/releases/5.3.7-gnu/patch-5.3-gnu-5.3.7-gnu.xz
bsdtar xf linux-libre-5.3-gnu.tar.xz
unxz patch-5.3-gnu-5.3.7-gnu.xz
cd linux-5.3
patch -Np 1 -i ../patch-5.3-gnu-5.3.7-gnu
```
- Copy config
```
zcat /proc/config.gz > .config
```
- Build scripts, this builds gcc-plugins, and strip the broken plugin
```
make scripts
strip --strip-unneeded scripts/gcc-plugins/structleak_plugin.so
```
- Replace it and reinstall wireguard-dkms to rebuild modules
```
sudo cp -a scripts/gcc-plugins/structleak_plugin.so /lib/modules/5.3.7-gnu-1/build/scripts/gcc-plugins/
sudo pacman -S --noconfirm wireguard-dkms
```
Updated by dllud over 4 years ago
I am facing this exact same issue both with wireguard-dkms and tp_smapi-dkms (probably affects all dkms builds).
Didn't had the time yet to try fauno's fix, though it seems it should be incorporated into the linux-libre build for the time being, while that structleak_plugin is broken.
Updated by Megver83 over 4 years ago
Could you try with the latest linux-libre 5.3.8? Also, what GCC version are you using?
Updated by dllud over 4 years ago
It builds successfully with linux-libre 5.3.8. Unfortunately I cannot test if the modules actually work because I am having another issue with 5.3.8: #2543
Anyway, upon a successful build these modules always worked, so I guess you can close this issue.
gcc 9.2.0-4 (base-devel)
Updated by Megver83 over 4 years ago
- % Done changed from 0 to 100
- Status changed from forwarded upstream to fixed
Updated by dllud about 4 years ago
This same exact issue has now re-emerged with linux-libre 5.5.x
Could you please apply the same fix as before?
DKMS make.log for wireguard-0.0.20200215 for kernel 5.5.1-gnu-1 (x86_64) Sat 29 Feb 2020 17:46:32 WET make: Entering directory '/usr/lib/modules/5.5.1-gnu-1/build' AR /var/lib/dkms/wireguard/0.0.20200215/build/built-in.a CC [M] /var/lib/dkms/wireguard/0.0.20200215/build/noise.o CC [M] /var/lib/dkms/wireguard/0.0.20200215/build/main.o CC [M] /var/lib/dkms/wireguard/0.0.20200215/build/device.o CC [M] /var/lib/dkms/wireguard/0.0.20200215/build/peer.o cc1: error: incompatible gcc/plugin versions cc1: error: incompatible gcc/plugin versions cc1: error: fail to initialize plugin ./scripts/gcc-plugins/structleak_plugin.so cc1: error: fail to initialize plugin ./scripts/gcc-plugins/structleak_plugin.so make[1]: *** [scripts/Makefile.build:266: /var/lib/dkms/wireguard/0.0.20200215/build/main.o] Error 1 make[1]: *** Waiting for unfinished jobs.... make[1]: *** [scripts/Makefile.build:266: /var/lib/dkms/wireguard/0.0.20200215/build/noise.o] Error 1 cc1: error: incompatible gcc/plugin versions cc1: error: fail to initialize plugin ./scripts/gcc-plugins/structleak_plugin.so make[1]: *** [scripts/Makefile.build:266: /var/lib/dkms/wireguard/0.0.20200215/build/device.o] Error 1 cc1: error: incompatible gcc/plugin versions cc1: error: fail to initialize plugin ./scripts/gcc-plugins/structleak_plugin.so make[1]: *** [scripts/Makefile.build:266: /var/lib/dkms/wireguard/0.0.20200215/build/peer.o] Error 1 make: *** [Makefile:1693: /var/lib/dkms/wireguard/0.0.20200215/build] Error 2 make: Leaving directory '/usr/lib/modules/5.5.1-gnu-1/build'
Updated by bill-auger about 4 years ago
- Related to Bug #2658: incompatible gcc/plugin versions added