Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 31 Jul 2021 08:07:42 -0600
From:      Warner Losh <imp@bsdimp.com>
To:        Kristof Provost <kp@freebsd.org>
Cc:        Warner Losh <imp@freebsd.org>, src-committers <src-committers@freebsd.org>, "<dev-commits-src-all@freebsd.org>" <dev-commits-src-all@freebsd.org>, dev-commits-src-branches@freebsd.org
Subject:   Re: git: 6edf5082bab7 - stable/12 - one-true-awk: import 20210221 (1e4bc42c53a1) which fixes a number of bugs
Message-ID:  <CANCZdfp96v_oinwe75-LVsn3Y0Y%2Bn5Q=BSLWHwfk5xJ4KW%2BekQ@mail.gmail.com>
In-Reply-To: <4AD3AB8C-A960-43BE-A89B-5D9C4CD077DD@FreeBSD.org>
References:  <202107101712.16AHCwoE088447@gitrepo.freebsd.org> <4AD3AB8C-A960-43BE-A89B-5D9C4CD077DD@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, Jul 31, 2021 at 3:11 AM Kristof Provost <kp@freebsd.org> wrote:

> Hi Warner,
>
> On 10 Jul 2021, at 19:12, Warner Losh wrote:
>
> The branch stable/12 has been updated by imp:
>
> URL:
> https://cgit.FreeBSD.org/src/commit/?id=3D6edf5082bab71cf923efff9f18e38ef=
e5b83b0ec
>
> commit 6edf5082bab71cf923efff9f18e38efe5b83b0ec
> Author: Warner Losh <imp@FreeBSD.org>
> AuthorDate: 2021-07-07 23:30:35 +0000
> Commit: Warner Losh <imp@FreeBSD.org>
> CommitDate: 2021-07-10 17:11:15 +0000
>
> one-true-awk: import 20210221 (1e4bc42c53a1) which fixes a number of bugs
>
> Import the latest bsd-features branch of the one-true-awk upstream:
>
> o Move to bison for $YACC
> o Set close-on-exec flag for file and pipe redirects that aren't std*
> o lots of little fixes to modernize ocde base
> o free sval member before setting it
> o fix a bug where a{0,3} could match aaaa
> o pull in systime and strftime from NetBSD awk
> o pull in fixes from {Net,Free,Open}BSD (normalized our code with them)
> o add BSD extensions and, or, xor, compl, lsheift, rshift (mostly a nop)
>
> Also revert a few of the trivial FreeBSD changes that were done slightly
> differently in the upstreaming process. Also, our PR database may have
> been mined by upstream for these fixes, and Mikolaj Golub may deserve
> credit for some of the fixes in this update.
>
> Suggested by: Mikolaj Golub <to.my.trociny@gmail.com>
> PR: 143363,143365,143368,143369,143373,143375,214782
> Sponsored by: Netflix
>
> (cherry picked from commit f39dd6a9784467f0db5886012b3f4b13899be6b8)
>
> I *think* this is the relevant commit, but I=E2=80=99m not 100% sure.
>
> Anyway, I=E2=80=99ve recently started seeing issues building pfSense for =
aarch64.
> I=E2=80=99ve finally narrowed it down, and replicated the problem on base=
 FreeBSD
> (stable/12, but I assume other branches are affected too).
>
> It fails to build proctab.c. This file is generated by maketab, a tool
> built as part of the build process. In my case this tool is built for
> aarch64, which makes executing it on amd64 less successful than we=E2=80=
=99d like.
>
> This only happens when building with META_MODE though. I do not understan=
d
> the build system sufficiently to debug why. Hopefully you=E2=80=99ll have=
 a better
> idea.
>
Generally I do, but this one is a bit weird. Also, the amount of context
you've included omits the actual error :( Though I'm guessing it's wrong
arch for the build tool...

I rarely use meta mode, and understand it not at all, but awk follows the
same patterns as /bin/sh and /bin/csh does.

Warner

This triggers the build failure:
>
> % cat /usr/src/src_env.conf
> WITH_META_MODE=3Dyes
> % env SRC_ENV_CONF=3D/usr/src/src_env.conf TARGET_ARCH=3Daarch64 make -j =
8 buildworld
>
> =E2=80=A6
> --- proctab.c ---
> *** [proctab.c] Error code 255
>
> make[4]: stopped in /usr/src/usr.bin/awk
> .ERROR_TARGET=3D'proctab.c'
> .ERROR_META_FILE=3D'/usr/obj/usr/src/arm64.aarch64/usr.bin/awk/proctab.c.=
meta'
> .MAKE.LEVEL=3D'4'
> MAKEFILE=3D''
> .MAKE.MODE=3D'meta missing-filemon=3Dyes missing-meta=3Dyes silent=3Dyes =
verbose'
> _ERROR_CMD=3D'./maketab awkgram.h > proctab.c;'
> .CURDIR=3D'/usr/src/usr.bin/awk'
> .MAKE=3D'make'
> .OBJDIR=3D'/usr/obj/usr/src/arm64.aarch64/usr.bin/awk'
> .TARGETS=3D'all'
> DESTDIR=3D'/usr/obj/usr/src/arm64.aarch64/tmp'
> LD_LIBRARY_PATH=3D''
> MACHINE=3D'arm64'
> MACHINE_ARCH=3D'aarch64'
> MAKEOBJDIRPREFIX=3D''
> MAKESYSPATH=3D'/usr/src/share/mk'
> MAKE_VERSION=3D'20200710'
>
> Further up in the build output:
>
> --- maketab ---
> cc -target aarch64-unknown-freebsd12.2 --sysroot=3D/usr/obj/usr/src/arm64=
.aarch64/tmp -B/usr/obj/usr/src/arm64.aarch64/tmp/usr/bin -O2 -pipe -fno-co=
mmon   -DHAS_ISBLANK -I. -I/usr/src/contrib/one-true-awk -DFOPEN_MAX=3D64 -=
g -std=3Dgnu99 -Wno-format-zero-length -fstack-protector-strong -Wsystem-he=
aders -Werror -Wno-pointer-sign -Wno-empty-body -Wno-string-plus-int -Wno-u=
nused-const-variable -Wno-tautological-compare -Wno-unused-value -Wno-paren=
theses-equality -Wno-unused-function -Wno-enum-conversion -Wno-unused-local=
-typedef -Wno-address-of-packed-member -Wno-switch -Wno-switch-enum -Wno-kn=
r-promoted-parameter -Wno-parentheses  -Qunused-arguments    /usr/src/contr=
ib/one-true-awk/maketab.c  -o maketab
>
> Without META_MODE maketab is built as an amd64 binary, and the entire
> build succeeds.
>
> Best regards,
> Kristof
>



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CANCZdfp96v_oinwe75-LVsn3Y0Y%2Bn5Q=BSLWHwfk5xJ4KW%2BekQ>