NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: misc/59594: SSL checkflist build errors
The following reply was made to PR misc/59594; it has been noted by GNATS.
From: Rob Whitlock <rwhitlock22%gmail.com@localhost>
To: Martin Husemann <martin%duskware.de@localhost>
Cc: gnats-bugs%netbsd.org@localhost,
dholland%netbsd.org@localhost
Subject: Re: misc/59594: SSL checkflist build errors
Date: Fri, 29 Aug 2025 12:13:48 -0400
> On Aug 15, 2025, at 12:09 AM, Rob Whitlock <rwhitlock22%gmail.com@localhost> =
wrote:
>=20
>> On Aug 14, 2025, at 1:43 PM, Martin Husemann <martin%duskware.de@localhost> =
wrote:
>>=20
>> On Thu, Aug 14, 2025 at 01:38:47PM -0400, Rob Whitlock wrote:
>>>> Can you try:
>>>>=20
>>>> cd $NETBSDSRCDIR && make -v HAVE_OPENSSL
>>>>=20
>>>> ?
>>>=20
>>> That prints 30.
>>=20
>> OK, that is the culprit. Apparently this comes from =
/usr/share/mk/bsd.own.mk,
>> instead of $NETBSDSRCDIR/share/mk/bsd.own.mk.
>>=20
>> The version with ${TOOLDIR}/bin/nbmake-amd64 works (and gives 35 as =
answer).
>=20
> I changed the MAKEFLAGS line to
>=20
> MAKEFLAGS=3D"-m $NETBSDSRCDIR/share/mk"
>=20
> and now make -v HAVE_OPENSSL reports 35, but I deleted all the
> build products and kicked off a new build and the error remains.
>=20
>>>> You have a strange setup, usually one would just do a "build.sh =
tools"
>>>> once and then use ${TOOLDIR}/bin/nbmake-amd64 (which is a shell =
script
>>>> that sets most env vars very simillar to what you did manually =
before
>>>> invoking a "neutral" make), instead of running the host "make".
>>>=20
>>> It's a setup that was derived entirely from official documentation
>>> so I don't see why it should be regarded as strange.
>>=20
>> s/strange/rare/ :-) and untested.
>=20
> Fair enough. :-)
>=20
>> We need a make expert to help with this. I bet there are make(1) =
debug
>> options to trace this further.
>>=20
>> Martin
I had an error in my build procedure. MAKEFLAGS is meant to be set via
environment variable, not as a make variable, so I deleted the MAKEFLAGS
line in mk.conf.amd64. However the error remained.
The correct OpenSSL version was being built, but it was the checkflist =
stage
that was failing. This showed that different parts of the build system =
did not
agree on what should be done.
The src/Makefile buildworld target has a line
${:D make}${MAKEDIRTARGET} distrib/sets checkflist
that recurses down into the distrib/sets directory and invokes the =
checkflist
target of distrib/sets/Makefile. That target runs a command
${SETSCMD} ${.CURSDIR}/checkflist \
${MAKEFLIST_FLAGS} ${CHECKFLIST_FLAGS} ${METALOG.unpriv}
which runs the checkflist script. Within that script, the flist is made =
in
the shell function generate_flist, which runs
${HOST_SH} "${rundir}/makeflist" ${xargs} ${dargs} \
| {SORT -u} | ignore_exceptions >"${SETS_FLIST}
and runs the makeflist script. The makeflist script sources =
${rundir}/sets.subr
for some settings, including the settings for HAVE_OPENSSL. It gets the
values of these variables by running make on the ${rundir}/mkvars.mk
makefile and invoking the mkvars target. The ${rundir}/mkvars.mk =
makefile
includes <bsd.own.mk> in order to get the value for HAVE_OPENSSL.
The problem is that mkvars.mk is invoked with "MAKEFLAGS=3D", which
clears the value of MAKEFLAGS. mkvars.mk then does not know where
the system include directory is, and so when mkvars.mk includes
bsd.own.mk, it uses the one in /usr/share/mk instead of the correct
one in src/share/mk.
This is a recent change, in revision 1.212:
Mon Jul 21 01:46:05 2025 UTC (5 weeks, 4 days ago) by dholland
distrib/sets/sets.subr: clear MAKEFLAGS for all submakes, not just =
some.
Should silence warnings about invalid -J options.
Applying the following patch to HEAD allowed the build to complete
without obvious error.
dholland, can you take a look?
Index: distrib/sets/sets.subr
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
RCS file: /cvsroot/src/distrib/sets/sets.subr,v
retrieving revision 1.212
diff -u -r1.212 sets.subr
--- distrib/sets/sets.subr 21 Jul 2025 01:46:05 -0000 1.212
+++ distrib/sets/sets.subr 29 Aug 2025 14:08:04 -0000
@@ -124,13 +124,13 @@
IFS=3D"
"
=20
-for x in $( MAKEFLAGS=3D MAKEVERBOSE=3D ${MAKE} -B -f =
${rundir}/mkvars.mk mkvars ); do
+for x in $( MAKEVERBOSE=3D ${MAKE} -B -f ${rundir}/mkvars.mk mkvars ); =
do
eval export $x
done
=20
IFS=3D$oIFS
=20
-MKVARS=3D"$( MAKEFLAGS=3D MAKEVERBOSE=3D ${MAKE} -B -f =
${rundir}/mkvars.mk mkvars | ${SED} -e 's,=3D.*,,' | ${XARGS} )"
+MKVARS=3D"$( MAKEVERBOSE=3D ${MAKE} -B -f ${rundir}/mkvars.mk mkvars | =
${SED} -e 's,=3D.*,,' | ${XARGS} )"
=20
#####
=20=
Home |
Main Index |
Thread Index |
Old Index