Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 7 Dec 2019 21:02:11 -0800
From:      Mark Millard <marklmi@yahoo.com>
To:        Bryan Drewery <bdrewery@FreeBSD.org>, FreeBSD Current <freebsd-current@freebsd.org>, FreeBSD Toolchain <freebsd-toolchain@freebsd.org>, FreeBSD ports <freebsd-ports@freebsd.org>
Cc:        Ben Woods <woodsb02@gmail.com>
Subject:   Re: head -r355027 context, poudiere jail constructions with the likes of -a arm64.aarch64 -x : awk: can't open file /sys/param.h
Message-ID:  <CF63CC35-F748-495E-B7DD-DF618CAF6305@yahoo.com>
In-Reply-To: <82CE331F-D359-415A-A702-49BF7285D88E@yahoo.com>
References:  <364D98C1-727B-4956-A73B-10CFEB8E1A12.ref@yahoo.com> <364D98C1-727B-4956-A73B-10CFEB8E1A12@yahoo.com> <CAOc73CA3Q=93f2kdd=EUcJtU4aw2Rd8n20uw6ovZ8wb96Y0=XA@mail.gmail.com> <82CE331F-D359-415A-A702-49BF7285D88E@yahoo.com>

next in thread | previous in thread | raw e-mail | index | archive | help
[In part this note shows that the issue is not specific to
cross builds: -a arm64.aarch64 is not essential. But it
also shows just where the /sys/param.h comes from.]

On 2019-Nov-24, at 15:22, Mark Millard <marklmi at yahoo.com> wrote:

> On 2019-Nov-24, at 15:11, Ben Woods <woodsb02 at gmail.com> wrote:
>=20
>> On Sun, 24 Nov 2019 at 1:27 pm, Mark Millard <marklmi@yahoo.com> =
wrote:
>> My poudiere jail constructions with the likes of -a arm64.aarch64 -x =
are
>> all getting:
>>=20
>> awk: can't open file /sys/param.h
>> source line number 1
>>=20
>> Hi Mark,
>>=20
>> I have been getting this same error on amd64 for some time when I use =
the command below.
>> # poudriere jail -j 13amd64 -u -m src=3D/usr/src
>>=20
>> Any ideas what it could be?
>=20
> Not so far. Good to know that cross-building is not part of the =
required context.
>=20
> I've yet to find a place that might be involved that mixes awk use =
with an expression
> generating a file path that could generate /sys/param.h as the path.
>=20
> If this was happening in my prior -r352341 context, I did not notice =
it. I jumped
> from there to -r355027 . So I can not effectively narrow the range for =
when it
> started based on my activity.


I've got evidence of what is reporting the /sys/param.h path:

+ [ -n '' ]
+ return 0
+ build_native_xtools
+ [ 0 -eq 1 ]
+ return 0
+ awk '/^\#define[[:blank:]]__FreeBSD_version/ {print $3}' =
/usr/local/poudriere/jails/testBugzilla215561/usr/include/sys/param.h
+ setvar version_extra 1300061
+ [ -r /usr/src/sys/conf/newvers.sh ]
+ update_version 1300061
+ local 'version_extra=3D1300061'
+ grep '^[RB][A-Z]*=3D' /usr/src/sys/conf/newvers.sh
+ eval 'REVISION=3D"13.0"' 'BRANCH=3D${BRANCH_OVERRIDE:-CURRENT}' =
'RELEASE=3D"${REVISION}-${BRANCH}"' 'RELDATE=3D$(awk' =
$'\'/__FreeBSD_version.*propagated' to newvers/ {print $'$3}\'' =
'${PARAMFILE:-${SYSDIR}/sys/param.h})'
+ awk '/__FreeBSD_version.*propagated to newvers/ {print $3}' =
/sys/param.h
awk: can't open file /sys/param.h
 source line number 1

So it appears that:

${PARAMFILE:-${SYSDIR}/sys/param.h}

became just:

/sys/param.h

suggesting that both PARAMFILE aned SYSDIR were empty/undefined.
But looking around shows that SYSDIR being empty/undefined can
lead to PARAMFILE being /sys/param.h directly.

A grep shows for PARAMFILE :

/usr/src/include/Makefile:      env NEWVERS_SH=3D${NEWVERS_SH} =
PARAMFILE=3D${PARAM_H} SYSDIR=3D${SYSDIR} \
/usr/src/sys/conf/newvers.sh:RELDATE=3D$(awk =
'/__FreeBSD_version.*propagated to newvers/ {print $3}' =
${PARAMFILE:-${SYSDIR}/sys/param.h})

and for PARAM_H :

/usr/src/include/Makefile:PARAM_H=3D              ${SYSDIR}/sys/param.h
/usr/src/include/Makefile:osreldate.h: ${NEWVERS_SH} ${PARAM_H} =
${MK_OSRELDATE_SH}
/usr/src/include/Makefile:      env NEWVERS_SH=3D${NEWVERS_SH} =
PARAMFILE=3D${PARAM_H} SYSDIR=3D${SYSDIR} \


I got the message for the above from doing:

poudriere -x jail -c -m src=3D/usr/src -J 32 -v head@355027 -j =
testBugzilla215561

(with an appropriate env MAKEOBJDIRPREFIX=3D. . . for my
environment). This was as part of seeing if an old
bugzilla report can be closed. (It can be.)

=3D=3D=3D
Mark Millard
marklmi at yahoo.com
( dsl-only.net went
away in early 2018-Mar)




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CF63CC35-F748-495E-B7DD-DF618CAF6305>