[wireguard-dkms]: fails to build on linux-libre since at least 5.3.1
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: *** [scripts/Makefile.build:281: /var/lib/dkms/wireguard/0.0.20191012/build/main.o] Error 1 make: *** 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: *** [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'
- Status changed from unconfirmed to forwarded upstream
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
i think it's a package build issue: https://bugs.archlinux.org/task/63644
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
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 \
bsdtar xf linux-libre-5.3-gnu.tar.xz
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
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
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.
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)