Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 696846 - sys-kernel/gentoo-sources with sys-apps/gawk-5.0.1 - awk: arch/x86/tools/gen-insn-attr-x86.awk:260: warning: regexp escape sequence `\:' is not a known regexp operator
Summary: sys-kernel/gentoo-sources with sys-apps/gawk-5.0.1 - awk: arch/x86/tools/gen-...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: Normal normal (vote)
Assignee: Gentoo Kernel Bug Wranglers and Kernel Maintainers
URL: https://lkml.org/lkml/2019/9/21/55
Whiteboard: https://git.kernel.org/pub/scm/linux/...
Keywords:
Depends on:
Blocks:
 
Reported: 2019-10-06 11:46 UTC by 7_9j~HTz
Modified: 2019-11-22 12:35 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
patch to include support for gawk versions >= 5 (awk-regexp-warnings.patch,3.08 KB, patch)
2019-11-14 23:01 UTC, Mike Pagano
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description 7_9j~HTz 2019-10-06 11:46:04 UTC
> awk: arch/x86/tools/gen-insn-attr-x86.awk:260: warning: regexp escape sequence `\:' is not a known regexp operator
> awk: arch/x86/tools/gen-insn-attr-x86.awk:350: (FILENAME=arch/x86/lib/x86-opcode-map.txt FNR=41) warning: regexp escape sequence `\&' is not a known regexp operator

The gawk manual [1] does not list characters ':' and '&' as needing escaping.
[1] https://www.gnu.org/software/gawk/manual/html_node/Escape-Sequences.html

As a fix it thus should suffice to remove the escaping characters.
Comment 1 Jeroen Roovers (RETIRED) gentoo-dev 2019-10-06 11:55:04 UTC
(In reply to 7_9j~HTz from comment #0)
> > awk: arch/x86/tools/gen-insn-attr-x86.awk:260: warning: regexp escape sequence `\:' is not a known regexp operator
> > awk: arch/x86/tools/gen-insn-attr-x86.awk:350: (FILENAME=arch/x86/lib/x86-opcode-map.txt FNR=41) warning: regexp escape sequence `\&' is not a known regexp operator

Where does that output originate?
Comment 2 7_9j~HTz 2019-10-06 11:57:44 UTC
compiling kernel/modules `make && make modules_install`
Comment 3 7_9j~HTz 2019-10-12 10:06:43 UTC
gen-insn-attr-x86.awk lives in two paths/instances:

* /usr/src/$(uname -r)/tools/objtool/arch/x86/tools/gen-insn-attr-x86.awk
* /usr/src/$(uname -r)/arch/x86/tools/gen-insn-attr-x86.awk
_____

Patching only the latter produces:

  GEN      /usr/src/linux-5.3.5-gentoo/tools/objtool/arch/x86/lib/inat-tables.c
awk: arch/x86/tools/gen-insn-attr-x86.awk:260: warning: regexp escape sequence `\:' is not a known regexp operator
awk: arch/x86/tools/gen-insn-attr-x86.awk:350: (FILENAME=arch/x86/lib/x86-opcode-map.txt FNR=41) warning: regexp escape sequence `\&' is not a known regexp operator

LD       /usr/src/linux-5.3.5-gentoo/tools/objtool/objtool-in.o
Warning: synced file at 'tools/objtool/arch/x86/tools/gen-insn-attr-x86.awk' differs from latest kernel version at 'arch/x86/tools/gen-insn-attr-x86.awk'

____

Patching only the former produces:

  LD       /usr/src/linux-5.3.6-gentoo-r1/tools/objtool/objtool-in.o
Warning: synced file at 'tools/objtool/arch/x86/tools/gen-insn-attr-x86.awk' differs from latest kernel version at 'arch/x86/tools/gen-insn-attr-x86.awk'

____

It would appear that /usr/src/$(uname -r)/tools/objtool/arch/x86/tools/gen-insn-attr-x86.awk takes precedence over /usr/src/$(uname -r)/arch/x86/tools/gen-insn-attr-x86.awk

And whilst patching /usr/src/$(uname -r)/tools/objtool/arch/x86/tools/gen-insn-attr-x86.awk would seem to suffice perhaps both instances should be patched.
Comment 4 Mike Pagano gentoo-dev 2019-11-14 23:01:08 UTC
Created attachment 596180 [details, diff]
patch to include support for gawk versions >= 5

Can you apply this patch on your 5.3.X kernel and run a build ?
Comment 5 Mike Pagano gentoo-dev 2019-11-22 12:35:56 UTC
This is in gentoo-sources-5.3.12


commit c2f22be66c4c66dfca8c9700e773ecf41429d30b
Author: Mike Pagano <mpagano@gentoo.org>
Date:   Thu Nov 14 18:07:49 2019 -0500

    x86/insn: Fix awk regexp warnings. See bug #696846.
    
    Signed-off-by: Mike Pagano <mpagano@gentoo.org>