Development discussion of WireGuard
 help / color / mirror / Atom feed
From: Ilie Halip <ilie.halip@gmail.com>
To: "Jason A. Donenfeld" <Jason@zx2c4.com>
Cc: WireGuard mailing list <wireguard@lists.zx2c4.com>,
	Nicholas Joll <najoll@posteo.net>
Subject: Re: Building module on Mint on 5.4 kernels: fatal 'make' errors
Date: Fri, 7 Feb 2020 15:19:01 +0200	[thread overview]
Message-ID: <CAHFW8PSKTg5KAaZgTGhRkYVF+dBzY1ztHpK248B3HGC5R8mtOA@mail.gmail.com> (raw)
In-Reply-To: <CAHmME9pC5Ki=Rnj-W+=t7CZtmVP9aUQJRL0bCzV1MHm3eO60NQ@mail.gmail.com>

My guess is you're installing the kernel from the Ubuntu PPA,
https://kernel.ubuntu.com/~kernel-ppa/mainline, is that right?

I can reproduce this build error with a fresh 5.4.6 kernel. Turns out, these
kernels are built with a newer GCC (9.2.1). As such, the kernel's generated
headers have CONFIG_CC_HAS_ASM_INLINE=1. But your GCC (probably 7.4.0? that's
what I have on Mint 19.3 machine) doesn't support this feature.

I installed GCC 9 from a PPA and was able to build the module manually:
    $ KERNELRELEASE=5.4.6-050406-generic
KERNELDIR=/home/ihalip/Projects/wireguard/kernels/ubuntu/usr/src/linux-headers-5.4.6-050406-generic
make CC=gcc-9
    [ ...snip... ]
      MODPOST 1 modules
      CC [M]  /home/ihalip/Projects/wireguard/wireguard-linux-compat/src/wireguard.mod.o
      LD [M]  /home/ihalip/Projects/wireguard/wireguard-linux-compat/src/wireguard.ko

I imagine you'd see the same issue building any out-of-tree kernel module.

I.H.
_______________________________________________
WireGuard mailing list
WireGuard@lists.zx2c4.com
https://lists.zx2c4.com/mailman/listinfo/wireguard

      parent reply	other threads:[~2020-02-07 13:19 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-24 14:50 Nicholas Joll
2020-02-07 11:25 ` Jason A. Donenfeld
2020-02-07 12:13   ` Nicholas Joll
2020-02-07 13:19   ` Ilie Halip [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAHFW8PSKTg5KAaZgTGhRkYVF+dBzY1ztHpK248B3HGC5R8mtOA@mail.gmail.com \
    --to=ilie.halip@gmail.com \
    --cc=Jason@zx2c4.com \
    --cc=najoll@posteo.net \
    --cc=wireguard@lists.zx2c4.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).