Project

General

Profile

Bug #2530

[wireguard-dkms]: fails to build on linux-libre since at least 5.3.1

fauno - 15 days ago - . Updated 4 days ago.

Status:
fixed
Priority:
bug
Assignee:
% Done:

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'

History

#1

Updated by fauno 15 days ago

it does build for linux-libre-lts

#2

Updated by bill-auger 15 days ago

  • Assignee set to Megver83
  • Description updated (diff)

megver - could this be a kernel bug?

#3

Updated by Megver83 14 days 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

#5

Updated by fauno 14 days 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

#6

Updated by fauno 14 days 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
```

#7

Updated by dllud 8 days 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.

#8

Updated by Megver83 7 days ago

Could you try with the latest linux-libre 5.3.8? Also, what GCC version are you using?

#9

Updated by dllud 6 days 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)

#10

Updated by Megver83 4 days ago

  • % Done changed from 0 to 100
  • Status changed from forwarded upstream to fixed

Also available in: Atom PDF