Development discussion of WireGuard
 help / color / mirror / Atom feed
From: "Martin Hundebøll" <martin@geanix.com>
To: wireguard@lists.zx2c4.com
Subject: Compilation fails with linux-headers-4.20
Date: Wed, 28 Nov 2018 10:25:00 +0100	[thread overview]
Message-ID: <1aec0b5a-a911-13b1-0d06-65baa356f1a0@geanix.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 2209 bytes --]

Hi,

I am experiencing the following error (verbose log attached) when 
building the wireguard module on my Arch Linux running 4.20-rc4:

% make -C /usr/lib/modules/4.20.0-rc4-1-git/build/ M=$(pwd) modules 
 
 

make: Entering directory '/usr/lib/modules/4.20.0-rc4-1-git/build' 
 
 

   CC [M]  /home/martin/projects/wireguard/git/src/main.o 
 
 

   CC [M]  /home/martin/projects/wireguard/git/src/noise.o 
 
 

./arch/x86/include/asm/refcount.h: Assembler messages: 
 
 

./arch/x86/include/asm/refcount.h:90: Error: no such instruction: 
`lock_prefix decl 680(%rbx)' 
 

./arch/x86/include/asm/refcount.h:91: Error: no such instruction: 
`refcount_check_lt_zero counter="680(%rbx)"' 
 

./arch/x86/include/asm/refcount.h:90: Error: no such instruction: 
`lock_prefix decl 680(%rbx)' 
 

./arch/x86/include/asm/refcount.h:91: Error: no such instruction: 
`refcount_check_lt_zero counter="680(%rbx)"' 
 

./arch/x86/include/asm/atomic.h:200: Error: no such instruction: 
`lock_prefix cmpxchgl %ecx,(%rdx)' 
 

./arch/x86/include/asm/refcount.h:109: Error: no such instruction: 
`refcount_error counter="(%rdx)"' 
 

./arch/x86/include/asm/refcount.h:90: Error: no such instruction: 
`lock_prefix decl 680(%rbx)' 
 

./arch/x86/include/asm/refcount.h:91: Error: no such instruction: 
`refcount_check_lt_zero counter="680(%rbx)"' 
 

./arch/x86/include/asm/atomic64_64.h:160: Error: no such instruction: 
`lock_prefix xaddq %rax,keypair_counter(%rip)' 
 

make[1]: *** [scripts/Makefile.build:294: 
/home/martin/projects/wireguard/git/src/noise.o] Error 1 
 
 

make: *** [Makefile:1565: 
_module_/home/martin/projects/wireguard/git/src] Error 2 
 
 

make: Leaving directory '/usr/lib/modules/4.20.0-rc4-1-git/build'

The issue seems to be caused by this series:
https://lkml.org/lkml/2018/10/4/25

The compilation succeeds when building against a full checkout of the 
kernel, so I suspect that something is missing in the linux-headers 
package on my distro.

Can you point me any direction to make this work? Let me know if any 
testing/logging is needed.

Thanks.

-- 
Kind regards,
Martin Hundebøll
Embedded Linux Consultant

+45 61 65 54 61
martin@geanix.com

Geanix IVS
https://geanix.com
DK39600706

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: compile.log --]
[-- Type: text/x-log; name="compile.log", Size: 7150 bytes --]

% make -C /usr/lib/modules/4.20.0-rc4-1-git/build/ M=$(pwd) V=1 modules
make: Entering directory '/usr/lib/modules/4.20.0-rc4-1-git/build'
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/martin/projects/wireguard/git/src/.tmp_versions ; rm -f /home/martin/projects/wireguard/git/src/.tmp_versions/*
make -f ./scripts/Makefile.build obj=/home/martin/projects/wireguard/git/src
(cat /dev/null;   echo kernel//home/martin/projects/wireguard/git/src/wireguard.ko;) > /home/martin/projects/wireguard/git/src/modules.order
  gcc -Wp,-MD,/home/martin/projects/wireguard/git/src/.main.o.d  -nostdinc -isystem /usr/lib/gcc/x86_64-pc-linux-gnu/8.2.1/include -I./arch/x86/include -I./arch/x86/include/generated  -I./include -I./arch/x86/include/uapi -I./arch/x86/include/generated/uapi -I./include/uapi -I./include/generated/uapi -include ./include/linux/kconfig.h -include ./include/linux/compiler_types.h -D__KERNEL__ -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -fshort-wchar -Werror-implicit-function-declaration -Wno-format-security -std=gnu89 -fno-PIE -DCC_HAVE_ASM_GOTO -mno-sse -mno-mmx -mno-sse2 -mno-3dnow -mno-avx -m64 -falign-jumps=1 -falign-loops=1 -mno-80387 -mno-fp-ret-in-387 -mpreferred-stack-boundary=3 -mskip-rax-setup -mtune=generic -mno-red-zone -mcmodel=kernel -funit-at-a-time -DCONFIG_AS_CFI=1 -DCONFIG_AS_CFI_SIGNAL_FRAME=1 -DCONFIG_AS_CFI_SECTIONS=1 -DCONFIG_AS_FXSAVEQ=1 -DCONFIG_AS_SSSE3=1 -DCONFIG_AS_AVX=1 -DCONFIG_AS_AVX2=1 -DCONFIG_AS_AVX512=1 -DCONFIG_AS_SHA1_NI=1 -DCONFIG_AS_SHA256_NI=1 -Wno-sign-compare -fno-asynchronous-unwind-tables -mindirect-branch=thunk-extern -mindirect-branch-register -DRETPOLINE -Wa,arch/x86/kernel/macros.s -fno-delete-null-pointer-checks -Wno-frame-address -Wno-format-truncation -Wno-format-overflow -Wno-int-in-bool-context -O2 --param=allow-store-data-races=0 -Wframe-larger-than=2048 -fstack-protector-strong -Wno-unused-but-set-variable -Wno-unused-const-variable -fno-var-tracking-assignments -pg -mrecord-mcount -mfentry -DCC_USING_FENTRY -Wdeclaration-after-statement -Wvla -Wno-pointer-sign -Wno-stringop-truncation -fno-strict-overflow -fno-merge-all-constants -fmerge-constants -fno-stack-check -fconserve-stack -Werror=implicit-int -Werror=strict-prototypes -Werror=date-time -Werror=incompatible-pointer-types -Werror=designated-init -fmacro-prefix-map=./= -Wno-packed-not-aligned -O3 -fvisibility=hidden -D'pr_fmt(fmt)=KBUILD_MODNAME ": " fmt' -I/home/martin/projects/wireguard/git/src/crypto/include -DCONFIG_ZINC_ARCH_X86_64 -include /home/martin/projects/wireguard/git/src/compat/compat.h -I/home/martin/projects/wireguard/git/src/compat/simd/include -DCONFIG_AS_SSSE3=1 -DCONFIG_AS_AVX=1 -DCONFIG_AS_AVX2=1 -DCONFIG_AS_AVX512=1  -DMODULE  -DKBUILD_BASENAME='"main"' -DKBUILD_MODNAME='"wireguard"' -c -o /home/martin/projects/wireguard/git/src/.tmp_main.o /home/martin/projects/wireguard/git/src/main.c
   ./tools/objtool/objtool orc generate  --module --no-fp --retpoline "/home/martin/projects/wireguard/git/src/.tmp_main.o";
  gcc -Wp,-MD,/home/martin/projects/wireguard/git/src/.noise.o.d  -nostdinc -isystem /usr/lib/gcc/x86_64-pc-linux-gnu/8.2.1/include -I./arch/x86/include -I./arch/x86/include/generated  -I./include -I./arch/x86/include/uapi -I./arch/x86/include/generated/uapi -I./include/uapi -I./include/generated/uapi -include ./include/linux/kconfig.h -include ./include/linux/compiler_types.h -D__KERNEL__ -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -fshort-wchar -Werror-implicit-function-declaration -Wno-format-security -std=gnu89 -fno-PIE -DCC_HAVE_ASM_GOTO -mno-sse -mno-mmx -mno-sse2 -mno-3dnow -mno-avx -m64 -falign-jumps=1 -falign-loops=1 -mno-80387 -mno-fp-ret-in-387 -mpreferred-stack-boundary=3 -mskip-rax-setup -mtune=generic -mno-red-zone -mcmodel=kernel -funit-at-a-time -DCONFIG_AS_CFI=1 -DCONFIG_AS_CFI_SIGNAL_FRAME=1 -DCONFIG_AS_CFI_SECTIONS=1 -DCONFIG_AS_FXSAVEQ=1 -DCONFIG_AS_SSSE3=1 -DCONFIG_AS_AVX=1 -DCONFIG_AS_AVX2=1 -DCONFIG_AS_AVX512=1 -DCONFIG_AS_SHA1_NI=1 -DCONFIG_AS_SHA256_NI=1 -Wno-sign-compare -fno-asynchronous-unwind-tables -mindirect-branch=thunk-extern -mindirect-branch-register -DRETPOLINE -Wa,arch/x86/kernel/macros.s -fno-delete-null-pointer-checks -Wno-frame-address -Wno-format-truncation -Wno-format-overflow -Wno-int-in-bool-context -O2 --param=allow-store-data-races=0 -Wframe-larger-than=2048 -fstack-protector-strong -Wno-unused-but-set-variable -Wno-unused-const-variable -fno-var-tracking-assignments -pg -mrecord-mcount -mfentry -DCC_USING_FENTRY -Wdeclaration-after-statement -Wvla -Wno-pointer-sign -Wno-stringop-truncation -fno-strict-overflow -fno-merge-all-constants -fmerge-constants -fno-stack-check -fconserve-stack -Werror=implicit-int -Werror=strict-prototypes -Werror=date-time -Werror=incompatible-pointer-types -Werror=designated-init -fmacro-prefix-map=./= -Wno-packed-not-aligned -O3 -fvisibility=hidden -D'pr_fmt(fmt)=KBUILD_MODNAME ": " fmt' -I/home/martin/projects/wireguard/git/src/crypto/include -DCONFIG_ZINC_ARCH_X86_64 -include /home/martin/projects/wireguard/git/src/compat/compat.h -I/home/martin/projects/wireguard/git/src/compat/simd/include -DCONFIG_AS_SSSE3=1 -DCONFIG_AS_AVX=1 -DCONFIG_AS_AVX2=1 -DCONFIG_AS_AVX512=1  -DMODULE  -DKBUILD_BASENAME='"noise"' -DKBUILD_MODNAME='"wireguard"' -c -o /home/martin/projects/wireguard/git/src/.tmp_noise.o /home/martin/projects/wireguard/git/src/noise.c
./arch/x86/include/asm/refcount.h: Assembler messages:
./arch/x86/include/asm/refcount.h:90: Error: no such instruction: `lock_prefix decl 680(%rbx)'
./arch/x86/include/asm/refcount.h:91: Error: no such instruction: `refcount_check_lt_zero counter="680(%rbx)"'
./arch/x86/include/asm/refcount.h:90: Error: no such instruction: `lock_prefix decl 680(%rbx)'
./arch/x86/include/asm/refcount.h:91: Error: no such instruction: `refcount_check_lt_zero counter="680(%rbx)"'
./arch/x86/include/asm/atomic.h:200: Error: no such instruction: `lock_prefix cmpxchgl %ecx,(%rdx)'
./arch/x86/include/asm/refcount.h:109: Error: no such instruction: `refcount_error counter="(%rdx)"'
./arch/x86/include/asm/refcount.h:90: Error: no such instruction: `lock_prefix decl 680(%rbx)'
./arch/x86/include/asm/refcount.h:91: Error: no such instruction: `refcount_check_lt_zero counter="680(%rbx)"'
./arch/x86/include/asm/atomic64_64.h:160: Error: no such instruction: `lock_prefix xaddq %rax,keypair_counter(%rip)'
make[1]: *** [scripts/Makefile.build:294: /home/martin/projects/wireguard/git/src/noise.o] Error 1
make: *** [Makefile:1565: _module_/home/martin/projects/wireguard/git/src] Error 2
make: Leaving directory '/usr/lib/modules/4.20.0-rc4-1-git/build'

[-- Attachment #3: Type: text/plain, Size: 148 bytes --]

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

                 reply	other threads:[~2018-12-06 23:18 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=1aec0b5a-a911-13b1-0d06-65baa356f1a0@geanix.com \
    --to=martin@geanix.com \
    --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).