Created attachment 577532 [details, diff] wireguard-0.0.20190406.patch Some of the contrib/examples require compilation and that is not possible the way they are installed on gentoo due to missing sources. For example: # cd /usr/share/doc/wireguard-0.0.20190406/examples/extract-handshakes/ 2019-05-21 22:46 sky extract-handshakes $ make make -C /lib/modules/4.19.40-r11/build M=/usr/share/doc/wireguard-0.0.20190406/examples/extract-handshakes offset-finder.o make[1]: Entering directory '/usr/src/linux-4.19.40' /usr/share/doc/wireguard-0.0.20190406/examples/extract-handshakes/Makefile:27: /usr/share/doc/wireguard-0.0.20190406/examples/extract-handshakes/../../../src/crypto/Kbuild.include: No such file or directory make[2]: *** No rule to make target '/usr/share/doc/wireguard-0.0.20190406/examples/extract-handshakes/../../../src/crypto/Kbuild.include'. Stop. make[1]: *** [Makefile:1677: offset-finder.o] Error 2 make[1]: Leaving directory '/usr/src/linux-4.19.40' make: *** [Makefile:14: offset-finder.o] Error 2 They are missing a few files from the src directory. By just uncompressing WireGuard-0.0.20190406.tar.xz and building, all is fine. There are 2 ways to solve it: * [quick] by installing all in src as well, see the attached patch (it is really dirty hack and installs a lot more than needed, e.g. object files * [proper] USE=tools should compile the tools that need that during src_compile, so that they can be used directly
This is example *code*, not example programs to be used directly.