M-Bab / linux-kernel-amdgpu-binaries

Kernel binaries (amd64) of amd-staging with DAL and latest security patches
214 stars 29 forks source link

Wireguard install / compile issue #69

Closed foureight84 closed 5 years ago

foureight84 commented 6 years ago

Looks like there are missing dependencies in the kernel headers? I am trying to install Wireguard and even tried compiling from source and I'm getting these errors:

Get:1 http://ppa.launchpad.net/wireguard/wireguard/ubuntu bionic/main amd64 wireguard-dkms all 0.0.20180910-wg1~bionic [504 kB]
Get:2 http://ppa.launchpad.net/wireguard/wireguard/ubuntu bionic/main amd64 wireguard-tools amd64 0.0.20180910-wg1~bionic [78.7 kB]
Fetched 583 kB in 3s (192 kB/s)            
Selecting previously unselected package wireguard-dkms.
(Reading database ... 274914 files and directories currently installed.)
Preparing to unpack .../wireguard-dkms_0.0.20180910-wg1~bionic_all.deb ...
Unpacking wireguard-dkms (0.0.20180910-wg1~bionic) ...
Selecting previously unselected package wireguard-tools.
Preparing to unpack .../wireguard-tools_0.0.20180910-wg1~bionic_amd64.deb ...
Unpacking wireguard-tools (0.0.20180910-wg1~bionic) ...
Selecting previously unselected package wireguard.
Preparing to unpack .../wireguard_0.0.20180910-wg1~bionic_all.deb ...
Unpacking wireguard (0.0.20180910-wg1~bionic) ...
Setting up wireguard-dkms (0.0.20180910-wg1~bionic) ...
Loading new wireguard-0.0.20180910 DKMS files...
Building for 4.18.8
Building initial module for 4.18.8
ERROR (dkms apport): kernel package linux-headers-4.18.8 is not supported
Error! Bad return status for module build on kernel: 4.18.8 (x86_64)
Consult /var/lib/dkms/wireguard/0.0.20180910/build/make.log for more information.
Setting up wireguard-tools (0.0.20180910-wg1~bionic) ...
Setting up wireguard (0.0.20180910-wg1~bionic) ...
Processing triggers for man-db (2.8.3-2) ...

Compile error:

~/Documents/WireGuard-0.0.20180910/src > make
make[2]: *** No rule to make target '/home/khoa/Documents/WireGuard-0.0.20180910/src/main.o', needed by '/home/khoa/Documents/WireGuard-0.0.20180910/src/wireguard.o'.  Stop.
Makefile:1533: recipe for target '_module_/home/khoa/Documents/WireGuard-0.0.20180910/src' failed
make[1]: *** [_module_/home/khoa/Documents/WireGuard-0.0.20180910/src] Error 2
Makefile:36: recipe for target 'module' failed
make: *** [module] Error 2
M-Bab commented 6 years ago

"kernel package linux-headers-4.18.8 is not supported" this sounds like this kernel version in generel doesn't work with wireguard. Can you cross check with a mainline build?

http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.18.8/

M-Bab commented 6 years ago

Maybe also this comment helps that wrote you need the full source in https://github.com/M-Bab/linux-kernel-amdgpu-binaries/issues/44

Simple fix sudo su cd /usr/src ; git clone https://github.com/M-Bab/linux-kernel-amdgpu.git # run the above script. done

leshik commented 6 years ago

@M-Bab I'm seeing the same behavior with r8168-dkms – it's not something specific to Wireguard, all DKMS-related packages will fail because Ubuntu kernel builds have different structure. While full source might help, it might be a bit overkill to clone the full repository.

stuaxo commented 6 years ago

Ah, dkms hasn't been working for me for a little while, might well be this :)

M-Bab commented 6 years ago

Yeah dkms and this special kernel never played nicely together and I wasn't able to fix that. Well but Wireguard is expected to enter the official kernel soon anyways.

stuaxo commented 6 years ago

My dkms issue is trying to use virtualbox and anbox, but it's the same sort of error.

M-Bab commented 5 years ago

Can you try again with the make build?

stuaxo commented 5 years ago

Tried building the kernel and installing, dkms rebuild seemed to fail with some different errors:

DKMS make.log for virtualbox-5.2.18 for kernel 4.20.0-rc6-18.12.13.amdgpu.ubuntu (x86_64)
Wed 19 Dec 23:40:07 GMT 2018
make: Entering directory '/usr/src/linux-headers-4.20.0-rc6-18.12.13.amdgpu.ubuntu'
  CC [M]  /var/lib/dkms/virtualbox/5.2.18/build/vboxdrv/linux/SUPDrv-linux.o
  CC [M]  /var/lib/dkms/virtualbox/5.2.18/build/vboxdrv/SUPDrv.o
  CC [M]  /var/lib/dkms/virtualbox/5.2.18/build/vboxdrv/SUPDrvGip.o
  CC [M]  /var/lib/dkms/virtualbox/5.2.18/build/vboxdrv/SUPDrvSem.o
  CC [M]  /var/lib/dkms/virtualbox/5.2.18/build/vboxdrv/SUPDrvTracer.o
  CC [M]  /var/lib/dkms/virtualbox/5.2.18/build/vboxdrv/SUPLibAll.o
  CC [M]  /var/lib/dkms/virtualbox/5.2.18/build/vboxdrv/r0drv/alloc-r0drv.o
  CC [M]  /var/lib/dkms/virtualbox/5.2.18/build/vboxdrv/r0drv/initterm-r0drv.o
Assembler messages:
Error: can't open arch/x86/kernel/macros.s for reading: No such file or directory
make[2]: *** [scripts/Makefile.build:299: /var/lib/dkms/virtualbox/5.2.18/build/vboxdrv/SUPLibAll.o] Error 1
make[2]: *** Waiting for unfinished jobs....
Assembler messages:
Error: can't open arch/x86/kernel/macros.s for reading: No such file or directory
make[2]: *** [scripts/Makefile.build:299: /var/lib/dkms/virtualbox/5.2.18/build/vboxdrv/SUPDrvSem.o] Error 1
Assembler messages:
Error: can't open arch/x86/kernel/macros.s for reading: No such file or directory
make[2]: *** [scripts/Makefile.build:299: /var/lib/dkms/virtualbox/5.2.18/build/vboxdrv/r0drv/initterm-r0drv.o] Error 1
Assembler messages:
Error: can't open arch/x86/kernel/macros.s for reading: No such file or directory
make[2]: *** [scripts/Makefile.build:299: /var/lib/dkms/virtualbox/5.2.18/build/vboxdrv/r0drv/alloc-r0drv.o] Error 1
Assembler messages:
Error: can't open arch/x86/kernel/macros.s for reading: No such file or directory
make[2]: *** [scripts/Makefile.build:299: /var/lib/dkms/virtualbox/5.2.18/build/vboxdrv/SUPDrvTracer.o] Error 1
Assembler messages:
Error: can't open arch/x86/kernel/macros.s for reading: No such file or directory
./arch/x86/include/asm/paravirt.h:134: Error: no such instruction: `paravirt_call type="8"clobber="511"pv_opptr="pv_ops+64"'
make[2]: *** [scripts/Makefile.build:299: /var/lib/dkms/virtualbox/5.2.18/build/vboxdrv/linux/SUPDrv-linux.o] Error 1
Assembler messages:
Error: can't open arch/x86/kernel/macros.s for reading: No such file or directory
make[2]: *** [scripts/Makefile.build:299: /var/lib/dkms/virtualbox/5.2.18/build/vboxdrv/SUPDrvGip.o] Error 1
Assembler messages:
Error: can't open arch/x86/kernel/macros.s for reading: No such file or directory
make[2]: *** [scripts/Makefile.build:299: /var/lib/dkms/virtualbox/5.2.18/build/vboxdrv/SUPDrv.o] Error 1
make[1]: *** [scripts/Makefile.build:539: /var/lib/dkms/virtualbox/5.2.18/build/vboxdrv] Error 2
make: *** [Makefile:1594: _module_/var/lib/dkms/virtualbox/5.2.18/build] Error 2
make: Leaving directory '/usr/src/linux-headers-4.20.0-rc6-18.12.13.amdgpu.ubuntu'
M-Bab commented 5 years ago

I tried wireguard installation with the new 5.0-rc4 kernel. Neither a problem with the Wireguard PPA and DKMS nor with building from source and installing.