oasislinux/toolchain

awk: syntax error at pkg/strace/sen.awk:13

hovind opened this issue · 3 comments

When executing ninja commit, I receive the following error:

context is
if >>> (close <<< ("sort -u"))
awk: illegal statement at pkg/strace/sen.awk:14
FAILED: pkg/transmission/fetch

The output of whereis awk is:

awk: /usr/bin/awk.def /usr/lib/plan9/bin/awk /usr/share/man/man1/awk.1.gz /usr/share/man/man1/awk.1plan9.gz

I am not familiar with awk, and cannot tell what is wrong.

I removed the if and assumed successful closure to circumvent the problem.

Generally I assume POSIX-compatible tools. close is valid in POSIX awk (http://pubs.opengroup.org/onlinepubs/9699919799/utilities/awk.html#tag_20_06_13_14). Based on that output, it seems like you're using awk from plan9port/9base.

I think it's probably a good idea to put the plan9port utilities at the end of your path so that they aren't used accidentally.

As shown in the whereis output, I renamed my /usr/bin/awk /usr/bin/awk.def to force usage of the plan9 version, due to an earlier error, probably due to me having an old version of awk. Thanks for clearing it up!