All of lore.kernel.org
 help / color / mirror / Atom feed
* Trouble building WireGuard since December releases
@ 2018-01-22 14:42 Kevin
  2018-01-22 15:23 ` Greg KH
  2018-01-22 15:34 ` Jason A. Donenfeld
  0 siblings, 2 replies; 7+ messages in thread
From: Kevin @ 2018-01-22 14:42 UTC (permalink / raw)
  To: wireguard

Hi all,

I've been having trouble building WireGuard on Solus since its December
snapshots. Earlier snapshots (e.g. November) still build without a
problem, even on new kernels. Does this have to do with Solus kernel
builds, or am I overlooking something?

user@t450s-solus ~/bin/WireGuard-0.0.20180118/src $ make debug
test -e include/generated/autoconf.h -a -e include/config/auto.conf ||
(	\
echo >&2;							\
echo >&2 "  ERROR: Kernel configuration is invalid.";		\
echo >&2 "         include/generated/autoconf.h or
include/config/auto.conf are missing.";\
echo >&2 "         Run 'make oldconfig && make prepare' on kernel src
to fix it.";	\
echo >&2 ;							\
/bin/false)
mkdir -p /home/user/bin/WireGuard-0.0.20180118/src/.tmp_versions ; rm
-f /home/user/bin/WireGuard-0.0.20180118/src/.tmp_versions/*
make -f ./scripts/Makefile.build obj=/home/user/bin/WireGuard-
0.0.20180118/src
make[2]: *** No rule to make target '/home/user/bin/WireGuard-
0.0.20180118/src/main.o', needed by '/home/user/bin/WireGuard-
0.0.20180118/src/wireguard.o'.  Stop.
make[1]: *** [Makefile:1507: _module_/home/user/bin/WireGuard-
0.0.20180118/src] Error 2
make: *** [Makefile:39: module-debug] Error 2

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Trouble building WireGuard since December releases
  2018-01-22 14:42 Trouble building WireGuard since December releases Kevin
@ 2018-01-22 15:23 ` Greg KH
  2018-01-22 15:34 ` Jason A. Donenfeld
  1 sibling, 0 replies; 7+ messages in thread
From: Greg KH @ 2018-01-22 15:23 UTC (permalink / raw)
  To: Kevin; +Cc: wireguard

On Mon, Jan 22, 2018 at 03:42:25PM +0100, Kevin wrote:
> Hi all,
> 
> I've been having trouble building WireGuard on Solus since its December
> snapshots. Earlier snapshots (e.g. November) still build without a
> problem, even on new kernels. Does this have to do with Solus kernel
> builds, or am I overlooking something?
> 
> user@t450s-solus ~/bin/WireGuard-0.0.20180118/src $ make debug
> test -e include/generated/autoconf.h -a -e include/config/auto.conf ||
> (	\
> echo >&2;							\
> echo >&2 "  ERROR: Kernel configuration is invalid.";		\
> echo >&2 "         include/generated/autoconf.h or
> include/config/auto.conf are missing.";\
> echo >&2 "         Run 'make oldconfig && make prepare' on kernel src
> to fix it.";	\

Have you run 'make oldconfig' and 'make prepare' on the kernel source
tree you are wanting to build the wireguard code against?

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Trouble building WireGuard since December releases
  2018-01-22 14:42 Trouble building WireGuard since December releases Kevin
  2018-01-22 15:23 ` Greg KH
@ 2018-01-22 15:34 ` Jason A. Donenfeld
  2018-01-22 15:53   ` Jason A. Donenfeld
  1 sibling, 1 reply; 7+ messages in thread
From: Jason A. Donenfeld @ 2018-01-22 15:34 UTC (permalink / raw)
  To: Kevin; +Cc: WireGuard mailing list

Strange. I'm getting Solus installed in a VM now, so I should have an
answer for you not before too long.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Trouble building WireGuard since December releases
  2018-01-22 15:34 ` Jason A. Donenfeld
@ 2018-01-22 15:53   ` Jason A. Donenfeld
  2018-01-22 16:07     ` Jason A. Donenfeld
  0 siblings, 1 reply; 7+ messages in thread
From: Jason A. Donenfeld @ 2018-01-22 15:53 UTC (permalink / raw)
  To: Kevin; +Cc: WireGuard mailing list

Worked exactly as intended for me.

1. I downloaded the latest ISO from the solus website.
2. I installed it using the GUI installer.
3. I booted into the new installation.
4. I updated all packages using the GUI updater.
5. I ran these commands in the built-in terminal:
$ sudo eopkg install git
$ sudo eopkg install -c kernel.devel
$ sudo eopkg install -c system.devel
$ sudo eopkg install libmnl-devel
$ git clone https://git.zx2c4.com/WireGuard
$ cd WireGuard/src && make debug -j$(nproc) && sudo make install
$ sudo modprobe wireguard && dmesg | grep wireguard
[   31.554056] wireguard: loading out-of-tree module taints kernel.
[   31.555061] wireguard: allowedips self-tests: pass
[   31.555463] wireguard: nonce counter self-tests: pass
[   31.555761] wireguard: curve25519 self-tests: pass
[   31.555798] wireguard: chacha20poly1305 self-tests: pass
[   31.555808] wireguard: poly1305 self-tests: pass
[   31.556129] wireguard: blake2s self-tests: pass
[   31.755518] wireguard: ratelimiter self-tests: pass
[   31.755531] wireguard: WireGuard 0.0.20180118-2-gc80cbfa loaded.
See www.wireguard.com for information.
[   31.755532] wireguard: Copyright (C) 2015-2018 Jason A. Donenfeld
<Jason@zx2c4.com>. All Rights Reserved.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Trouble building WireGuard since December releases
  2018-01-22 15:53   ` Jason A. Donenfeld
@ 2018-01-22 16:07     ` Jason A. Donenfeld
  2018-01-24 18:49       ` Daniel Kahn Gillmor
  0 siblings, 1 reply; 7+ messages in thread
From: Jason A. Donenfeld @ 2018-01-22 16:07 UTC (permalink / raw)
  To: Kevin; +Cc: WireGuard mailing list

Ahh, small update. When building this, I noticed:

Makefile:944: "Cannot use CONFIG_STACK_VALIDATION=y, please install
libelf-dev, libelf-devel or elfutils-libelf-devel"

After installing libelf-devel, the exact problem you reported
appeared. I then tried this hack:

$ sudo ln -s /bin/true /lib/modules/$(uname -r)/build/tools/objtool/objtool

And after, the build worked again. It therefore appears that Solus is
not distributing objtool with their kernel headers, when they should
be.

I opened a bug for your issue, but as I've never used Solus until
today, I won't be following up on it. So, please direct your
distribution to the bug at: https://dev.solus-project.com/T5607 and
see what you can do about helping to get this fixed.

Regards,
Jason

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Trouble building WireGuard since December releases
  2018-01-22 16:07     ` Jason A. Donenfeld
@ 2018-01-24 18:49       ` Daniel Kahn Gillmor
  2018-01-24 23:07         ` Jason A. Donenfeld
  0 siblings, 1 reply; 7+ messages in thread
From: Daniel Kahn Gillmor @ 2018-01-24 18:49 UTC (permalink / raw)
  To: Jason A. Donenfeld, Kevin; +Cc: WireGuard mailing list

On Mon 2018-01-22 17:07:38 +0100, Jason A. Donenfeld wrote:
> Ahh, small update. When building this, I noticed:
>
> Makefile:944: "Cannot use CONFIG_STACK_VALIDATION=y, please install
> libelf-dev, libelf-devel or elfutils-libelf-devel"

fwiw, debian had the same issue around libelf-dev with their kernel
source packaging, and treated it as a bug there, which was resolved in
the kernel package itself, rather than requiring additional build
dependencies of all kernel modules: https://bugs.debian.org/886474

(this message is just about libelf-dev; i haven't followed the details
about objtool)

             --dkg

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Trouble building WireGuard since December releases
  2018-01-24 18:49       ` Daniel Kahn Gillmor
@ 2018-01-24 23:07         ` Jason A. Donenfeld
  0 siblings, 0 replies; 7+ messages in thread
From: Jason A. Donenfeld @ 2018-01-24 23:07 UTC (permalink / raw)
  To: Daniel Kahn Gillmor; +Cc: Kevin, WireGuard mailing list

On Wed, Jan 24, 2018 at 7:49 PM, Daniel Kahn Gillmor
<dkg@fifthhorseman.net> wrote:
>
> On Mon 2018-01-22 17:07:38 +0100, Jason A. Donenfeld wrote:
> > Ahh, small update. When building this, I noticed:
> >
> > Makefile:944: "Cannot use CONFIG_STACK_VALIDATION=y, please install
> > libelf-dev, libelf-devel or elfutils-libelf-devel"
>
> fwiw, debian had the same issue around libelf-dev with their kernel
> source packaging, and treated it as a bug there, which was resolved in
> the kernel package itself, rather than requiring additional build
> dependencies of all kernel modules: https://bugs.debian.org/886474

Seems like a sane resolution.

>
> (this message is just about libelf-dev; i haven't followed the details
> about objtool)

The detail about objtool is just that they forgot to include it in
their headers, so when the build system tries to use it, it can't find
it and fails. Simple problem with a simple solution, thankfully.

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2018-01-24 23:03 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-01-22 14:42 Trouble building WireGuard since December releases Kevin
2018-01-22 15:23 ` Greg KH
2018-01-22 15:34 ` Jason A. Donenfeld
2018-01-22 15:53   ` Jason A. Donenfeld
2018-01-22 16:07     ` Jason A. Donenfeld
2018-01-24 18:49       ` Daniel Kahn Gillmor
2018-01-24 23:07         ` Jason A. Donenfeld

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.