Awk error when building tools on Mingw64
Ryan Long
ral051 at oarcorp.com
Thu Mar 17 14:55:23 UTC 2022
Hello,
I'm trying to build the Aarch64 tools on Mingw64. When building gdb, I
am getting the following error.
config: tools/rtems-gdb-10.cfg
error: shell macro failed: sh -c "/mingw64/bin/python2-config --ldflags
| awk 'BEGIN{FS=\"
\"}/python/{for(i=1;i<NF;++i)if(match($i,\".*lpython.*\")) print
\"lib\"substr($i,3)\"*\";}'": 1: awk: cmd. line:1: BEGIN{FS="
"}/python/{for(i=1;i<NF;++i)if(match(,".*lpython.*")) print
"lib"substr(,3)"*";}
awk: cmd. line:1: ^ syntax error
awk: cmd. line:1: BEGIN{FS="
"}/python/{for(i=1;i<NF;++i)if(match(,".*lpython.*")) print
"lib"substr(,3)"*";}
awk: cmd. line:1: ^ 1 is invalid as number of arguments for match
I made a file to store this command like so
BEGIN {FS=" "}
/python/ {
for(i=1;i<NF;++i)
if(match($i,".*lpython.*"))
print "lib"substr($i,3)"*"
}
and ran it with the command "python2-config --ldflags | awk -f
test.awk". It produces "libpython2.7*" as the output. The only
difference between the two is I took out the "\"s since it's not being
run on the command line.
Does anyone have any ideas what might be going on? And how do we go
about fixing this when the solution is found?
Thanks,
Ryan
More information about the devel
mailing list