| Summary: | Compiling sys-kernel/gentoo-sources-5.4.80-r1 fails if wireguard enabled as module: CONFIG_WIREGUARD=m | ||
|---|---|---|---|
| Product: | Gentoo Linux | Reporter: | Michele Testa <michele.testa> |
| Component: | Current packages | Assignee: | Gentoo Kernel Bug Wranglers and Kernel Maintainers <kernel> |
| Status: | RESOLVED TEST-REQUEST | ||
| Severity: | normal | CC: | michele.testa |
| Priority: | Normal | ||
| Version: | unspecified | ||
| Hardware: | All | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Package list: | Runtime testing required: | --- | |
| Attachments: |
Patch to fix wireguard Makefile
.config kernel 5.4.80-gentoo-r1 emerge --info |
||
|
Description
Michele Testa
2020-12-08 22:30:35 UTC
Created attachment 677314 [details, diff]
Patch to fix wireguard Makefile
Just remove the line:
ccflags-y += -D'pr_fmt(fmt)=KBUILD_MODNAME ": " fmt'
and gcc will run smoothly
No problem here on amd64. Can you attach your.config ? Created attachment 677335 [details]
.config kernel 5.4.80-gentoo-r1
My .config after wireguard module was built with the submitted patch.
I'm having trouble replicating. I built 5.4.82 with your .config using both gcc 9.3.0-r1 and 10.2.0-r3 without issue. Can I see your emerge --info, please ? Created attachment 677560 [details]
emerge --info
Thanx a lot Mr. Pagano, for all your awesome work on the kernel :)
Do you have coreutils installed? gcc: error: fmt: No such file or directory /usr/bin/fmt is part of that package. Yes, I've installed the last version of coreutils: > eix -s coreutils > [I] sys-apps/coreutils > Available versions: 8.30^t 8.31-r1^t 8.32-r1^t {acl caps gmp hostname kill multicall nls selinux +split-usr static test vanilla xattr USERLAND="BSD"} > Installed versions: 8.32-r1^t(09:12:25 17/08/2020)(acl nls split-usr xattr -caps -gmp -hostname -kill -multicall -selinux -static -test -vanilla) > Homepage: https://www.gnu.org/software/coreutils/ > Description: Standard GNU utilities (chmod, cp, dd, ls, sort, tr, head, wc, who,...) > ls -lh /usr/bin/fmt > -rwxr-xr-x 1 root root 43K 17 ago 09.12 /usr/bin/fmt Compiling with verbose=1, I have the error on the command: gcc -Wp,-MD,drivers/net/wireguard/.main.o.d -nostdinc -isystem /usr/lib/gcc/x86_64-pc-linux-gnu/9.3.0/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 -Werror=strict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -fshort-wchar -fno-PIE -Werror=implicit-function-declaration -Werror=implicit-int -Wno-format-security -std=gnu89 -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 -march=core2 -mno-red-zone -mcmodel=kernel -DCONFIG_X86_X32_ABI -DCONFIG_AS_CFI=1 -DCONFIG_AS_CFI_SIGNAL_FRAME=1 -DCONFIG_AS_CFI_SECTIONS=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 -DCONFIG_AS_ADX=1 -Wno-sign-compare -fno-asynchronous-unwind-tables -fno-delete-null-pointer-checks -Wno-frame-address -Wno-format-truncation -Wno-format-overflow -Wno-address-of-packed-member -O2 --param=allow-store-data-races=0 -Wframe-larger-than=2048 -fstack-protector -Wno-unused-but-set-variable -Wimplicit-fallthrough -Wno-unused-const-variable -fomit-frame-pointer -fno-var-tracking-assignments -Wdeclaration-after-statement -Wvla -Wno-pointer-sign -Wno-stringop-truncation -Wno-array-bounds -Wno-stringop-overflow -Wno-restrict -Wno-maybe-uninitialized -fno-strict-overflow -fno-merge-all-constants -fmerge-constants -fno-stack-check -fconserve-stack -Werror=date-time -Werror=incompatible-pointer-types -Werror=designated-init -fmacro-prefix- map=./= -Wno-packed-not-aligned -O3 -D'pr_fmt(fmt)=KBUILD_MODNAME ": " fmt' # <== error here -DKBUILD_BASENAME='"main"' -DKBUILD_MODNAME='"wireguard"' -c -o drivers/net/wireguard/main.o drivers/net/wireguard/main.c IMHO, in: > -D'pr_fmt(fmt)=KBUILD_MODNAME ": " fmt' for some reason whitespaces in single quotes are tokenized, so gcc search for '":', '"' and 'fmt' as files, giving the error: > gcc: error: ": : No such file or directory > gcc: error: " : No such file or directory > gcc: error: fmt : No such file or directory can you test this with 5.4.108? |