Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 28 Jan 2024 10:20:30 -0800
From:      Mark Millard <marklmi@yahoo.com>
To:        david@catwhisker.org, FreeBSD-STABLE Mailing List <freebsd-stable@freebsd.org>
Subject:   Re: Should changes in src/usr.sbin/bhyve/ trigger an llvm rebuild?
Message-ID:  <5BCB8F1A-B5D5-4506-87E1-8B26E713C6F5@yahoo.com>
In-Reply-To: <ZbZ2u9FlUhvb1orU@albert.catwhisker.org>
References:  <EAD76C2C-065E-4EFA-901F-1C0FD13FFC65.ref@yahoo.com> <EAD76C2C-065E-4EFA-901F-1C0FD13FFC65@yahoo.com> <ZbZ2u9FlUhvb1orU@albert.catwhisker.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Jan 28, 2024, at 07:46, David Wolfskill <david@catwhisker.org> wrote:

> On Sun, Jan 28, 2024 at 07:30:53AM -0800, Mark Millard wrote:
>> ...
>> The following two sequences are very different:
>>=20
>> make buildworld
>> make buildworld
>>=20
>> vs.
>>=20
>> make buildworld
>> make installworld
>> make buildworld
>>=20
>> The installworld can update a lot of non-source
>> files that were used to do the first build world.
>> META_MODE notices such updates and does rebuild
>> activity because of them.
>=20
> First: Thank you for replying & suggesting the above.
>=20
> That said, one of the machines in question is my local "build machine" =
--
> and for it, in addition to in-place source updates, I also do (weekly)
> updates of my "production" machines (at home).
>=20
> And for that case, the production machines mount the builder's =
/usr/src
> and /usr/obj (via NFS) read-only.

Which machine(s) are doing the llvm rebuild that
you were hoping would not happen? What was the
context like for the history on that machine?
(The below had to be written without understanding
of such things.)

Here is an example META_MODE line recording a
tool used during a particular file's rebuild:

E 22961 /bin/sh

So installing an update to /bin/sh via isntallworld
would lead to the later META_MODE (re)build
indicating that the file needs to be rebuilt, just
because /bin/sh ends up being newer after the
installworld .

There are other examples of recorded paths to tools
in .meta file, such as (my old context example
used in an old E-mail exchange):

=
/usr/obj/amd64_clang/amd64.amd64/usr/fbsd/mm-src/amd64.amd64/tmp/legacy/us=
r/sbin/awk

So if /usr/obj/. . ./tmp/legacy/usr/sbin/awk is newer than the file
potentially being rebuilt, make ends up with:

file =
'/usr/obj/amd64_clang/amd64.amd64/usr/fbsd/mm-src/amd64.amd64/tmp/legacy/u=
sr/sbin/awk' is newer than the target...

(make has a mode that reports such things. I used it
to find out what all contributed to some rebuild
activity in order to figure out the general type of
thing that was happeneing. Then I used it to find
all the "is newer than" material that I expected to
be unlikely to contribute to build changes.)

It does not matter if:

=
/usr/obj/amd64_clang/amd64.amd64/usr/fbsd/mm-src/amd64.amd64/tmp/legacy/us=
r/sbin/awk

is read-only at the potential-rebuild-of-file time. Only
if it is newer.

Simon J. Gerraty and I had a long exchange about this in
2023-Feb, that was in turn based on a earlier 2021-Jan
report of mine. There are also issues when symbolic links
are involved, if I remember right. At the time (2023) I
was doing experiments with making some of this "unlikely
to cause build differences" material end up being ignored.
Ultimately, Simon provided me a patch to
share/mk/src.sys.obj.mk to help with my experiments.

See "Re: FYI: Why META_MODE rebuilds so much for building again
after installworld (no source changes)", starting with the
2023-Feb material at:

=
https://lists.freebsd.org/archives/freebsd-current/2023-February/003239.ht=
ml

I will note that my activity did not involve
NFS mounts, only completely self-hosted builds
on directly connected media, the boot media.
I've no evidence if such NFS involvement makes
any additional differences.

bectl use can be used to keep around an
example "after the build but before the
install" place from the most recent build.
It can be used for doing the next build
to avoid the later installworld consequences
on time relationships for the likes of /bin/sh .
(It is also a place to revert to if an install
went badly.)

> And without complaints of attempts to
> scribble on read-only stuff. :-}

Detailed time relationships are what matter.
You may have to work out what those are.

> So if "make installworld" messes with anything that META_MODE cares
> about ... that would appear to be somewhat surprising.

See above.

> Mind, I've been wrong before, and I do intend to live long enough to =
be
> wrong again.... :-)
>=20
>> One more sequence:
>>=20
>> make buildworld
>> make installworld
>> update some sources
>> make buildworld
>>=20
>> For that the installworld may be the larger
>> change compared to the source updates as far
>> as contributions to rebuild activity go.
>>=20
>> This sort of thing is likely what you had
>> happen.
>> ....
>=20
> Hmm....  Thanks again.


=3D=3D=3D
Mark Millard
marklmi at yahoo.com




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?5BCB8F1A-B5D5-4506-87E1-8B26E713C6F5>