Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 3 Mar 2026 11:46:54 -0700
From:      Warner Losh <imp@bsdimp.com>
To:        "Enji Cooper (yaneurabeya)" <yaneurabeya@gmail.com>
Cc:        Brooks Davis <brooks@freebsd.org>, Enji Cooper <ngie@freebsd.org>,  src-committers <src-committers@freebsd.org>,  "<dev-commits-src-all@freebsd.org>" <dev-commits-src-all@freebsd.org>,  "<dev-commits-src-main@freebsd.org>" <dev-commits-src-main@freebsd.org>
Subject:   Re: git: 912864912b71 - main - Run `make obj` before running `make test-includes`
Message-ID:  <CANCZdforN%2Bdx2-f0q%2BneZiH3TAw3QtF0%2BBpxCUEmGrdR-d4Geg@mail.gmail.com>
In-Reply-To: <E18DC595-DF37-4981-B73A-467EC9AEE136@gmail.com>
References:  <69a678f3.3f811.148b0d7d@gitrepo.freebsd.org> <CANCZdfpdrkwj8RZtKubzg4feo5i61ivfwRSgwZM7U0k_9V%2B=pQ@mail.gmail.com> <aabRjaEUESOKOFZj@spindle.one-eyed-alien.net> <CANCZdfrfKgMm7N9nE-DNkWzr9=vqmaKzd%2BRrvYeg_7OQ=aSL4Q@mail.gmail.com> <E18DC595-DF37-4981-B73A-467EC9AEE136@gmail.com>

index | next in thread | previous in thread | raw e-mail

[-- Attachment #1 --]
On Tue, Mar 3, 2026 at 11:17 AM Enji Cooper (yaneurabeya) <
yaneurabeya@gmail.com> wrote:

>
> > On Mar 3, 2026, at 4:22 AM, Warner Losh <imp@bsdimp.com> wrote:
> >
> > On Tue, Mar 3, 2026 at 5:18 AM Brooks Davis <brooks@freebsd.org> wrote:
> > On Tue, Mar 03, 2026 at 04:25:48AM -0700, Warner Losh wrote:
> > > On Mon, Mar 2, 2026, 11:00???PM Enji Cooper <ngie@freebsd.org> wrote:
> > >
> > > > The branch main has been updated by ngie:
> > > >
> > > > URL:
> > > >
> https://cgit.FreeBSD.org/src/commit/?id=912864912b71951f9a636190b1dba80528f588eb
> > > >
> > > > commit 912864912b71951f9a636190b1dba80528f588eb
> > > > Author:     Enji Cooper <ngie@FreeBSD.org>
> > > > AuthorDate: 2026-03-03 05:59:50 +0000
> > > > Commit:     Enji Cooper <ngie@FreeBSD.org>
> > > > CommitDate: 2026-03-03 05:59:56 +0000
> > > >
> > > >     Run `make obj` before running `make test-includes`
> > > >
> > > >     Before this change, `make test-includes` (run as part of
> buildworld)
> > > >     would place test files in the current directory, which would
> clutter up
> > > >     git clones. Run `make obj` beforehand to ensure that the files
> are put
> > > >     in `${.OBJDIR}` instead of `${.CURDIR}`. This helps cut down on
> the
> > > >     noise significantly when running commands like `git status`.
> > > >
> > >
> > > I've never seen this happen. .OBJDIR is created automatically for me
> always
> > > for the last 5 years... I run buildworld all the time. Can you explain
> when
> > > /  how it happens more specifically or back out the change?
> >
> > The commit message is unintentionally misleading and incomplete.  I hit
> > the problem a week or so ago when fixing gcc12 builds and lacked the
> > time to follow up.  test-includes is fine as part of buildworld, but
> > when run directly from src does fill tools/build/test-includes with .c
> > files if you blow away the objdir (which seems to the the only reliably
> > way to cause test-includes to retest some more complex cases.)
> >
> > Ah! That should have been in the commit message as the edge case
> > that provoked this. That's a decent explanation, though there's other
> > bits of buildworld that will also cause problems if you do them in
> isolation
> > and not part of buildworld. This one, though, is important enough to make
> > an exception for, I think. It's one that's most likely to be used in
> isolation.
>
> Hi Warner,
>
> I consistently run into this behavior when doing mfsbsd builds on my
> 14.3-RELEASE host using this src.conf: https://reviews.freebsd.org/P702 .
> MK_AUTO_OBJ=yes as shown here: https://reviews.freebsd.org/P703 .
>
> I always run this target as part of buildworld on my 14.3-RELEASE host, so
> whatever is working on your end is likely an artifact of the build host
> environment, whereas what’s not working for me like you expect is an
> artifact of my build host environment.
>
> This:
>
> > Before this change, `make test-includes` (run as part of buildworld)
> > would place test files in the current directory, which would clutter up
> > git clones.
>
>
> Could more accurately be expressed like this:
>
> > Before this change, `make test-includes` (run as part of buildworld)
> > would place test files in the current directory on my 14.3-RELEASE
> > build host, which would clutter up git clones.
>
>
> The exact reason why there’s a difference eludes me right now.
>

The likely reason is that you explicitly ran `make test-includes` without
first running `buildworld` to create the objdir. As part of buildworld, it
always creates the right thing. Or there's some other partial evaluation.
That's the only way I could recreate it, and only if I turned off metamode.

PS I was waiting for a response to the Differential for over a week; I
> landed the change because I hadn’t received feedback on the review in that
> period of time and because it gets really old quickly having to always do
> `git status -uno` in my clones to make sure I’m not accidentally committing
> things that shouldn’t be committed. This is especially annoying when doing
> rebases with my “Mac” dev branch because it has a lot of overlapping
> sections of code in asmc(4) and thunderbolt(4).


Yea, you didn't ping me on it. I've got a lot going on... There's a lot of
requests with my name on it and w/o an explicit ping, I can often miss
them. It's not wrong, per se, but the commit message was incorrect and
overly broad. Brooks showed me a way to recreate it, which I did, but I
couldn't otherwise create this with either meta mode on or off. I doubt
that cross-version builds would cause it too, but I suppose it might.

I do get the annoyance. And it all worked out: I found a way to trigger
this, even if it isn't what you are hitting.

Warner

[-- Attachment #2 --]
<div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote gmail_quote_container"><div dir="ltr" class="gmail_attr">On Tue, Mar 3, 2026 at 11:17 AM Enji Cooper (yaneurabeya) &lt;<a href="mailto:yaneurabeya@gmail.com">yaneurabeya@gmail.com</a>&gt; wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><br>
&gt; On Mar 3, 2026, at 4:22 AM, Warner Losh &lt;<a href="mailto:imp@bsdimp.com" target="_blank">imp@bsdimp.com</a>&gt; wrote:<br>
&gt; <br>
&gt; On Tue, Mar 3, 2026 at 5:18 AM Brooks Davis &lt;<a href="mailto:brooks@freebsd.org" target="_blank">brooks@freebsd.org</a>&gt; wrote:<br>
&gt; On Tue, Mar 03, 2026 at 04:25:48AM -0700, Warner Losh wrote:<br>
&gt; &gt; On Mon, Mar 2, 2026, 11:00???PM Enji Cooper &lt;<a href="mailto:ngie@freebsd.org" target="_blank">ngie@freebsd.org</a>&gt; wrote:<br>
&gt; &gt; <br>
&gt; &gt; &gt; The branch main has been updated by ngie:<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; URL:<br>
&gt; &gt; &gt; <a href="https://cgit.FreeBSD.org/src/commit/?id=912864912b71951f9a636190b1dba80528f588eb" rel="noreferrer" target="_blank">https://cgit.FreeBSD.org/src/commit/?id=912864912b71951f9a636190b1dba80528f588eb</a><br>;
&gt; &gt; &gt;<br>
&gt; &gt; &gt; commit 912864912b71951f9a636190b1dba80528f588eb<br>
&gt; &gt; &gt; Author:     Enji Cooper &lt;ngie@FreeBSD.org&gt;<br>
&gt; &gt; &gt; AuthorDate: 2026-03-03 05:59:50 +0000<br>
&gt; &gt; &gt; Commit:     Enji Cooper &lt;ngie@FreeBSD.org&gt;<br>
&gt; &gt; &gt; CommitDate: 2026-03-03 05:59:56 +0000<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt;     Run `make obj` before running `make test-includes`<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt;     Before this change, `make test-includes` (run as part of buildworld)<br>
&gt; &gt; &gt;     would place test files in the current directory, which would clutter up<br>
&gt; &gt; &gt;     git clones. Run `make obj` beforehand to ensure that the files are put<br>
&gt; &gt; &gt;     in `${.OBJDIR}` instead of `${.CURDIR}`. This helps cut down on the<br>
&gt; &gt; &gt;     noise significantly when running commands like `git status`.<br>
&gt; &gt; &gt;<br>
&gt; &gt; <br>
&gt; &gt; I&#39;ve never seen this happen. .OBJDIR is created automatically for me always<br>
&gt; &gt; for the last 5 years... I run buildworld all the time. Can you explain when<br>
&gt; &gt; /  how it happens more specifically or back out the change?<br>
&gt; <br>
&gt; The commit message is unintentionally misleading and incomplete.  I hit<br>
&gt; the problem a week or so ago when fixing gcc12 builds and lacked the<br>
&gt; time to follow up.  test-includes is fine as part of buildworld, but<br>
&gt; when run directly from src does fill tools/build/test-includes with .c<br>
&gt; files if you blow away the objdir (which seems to the the only reliably<br>
&gt; way to cause test-includes to retest some more complex cases.)<br>
&gt; <br>
&gt; Ah! That should have been in the commit message as the edge case<br>
&gt; that provoked this. That&#39;s a decent explanation, though there&#39;s other<br>
&gt; bits of buildworld that will also cause problems if you do them in isolation<br>
&gt; and not part of buildworld. This one, though, is important enough to make<br>
&gt; an exception for, I think. It&#39;s one that&#39;s most likely to be used in isolation.<br>
<br>
Hi Warner,<br>
<br>
I consistently run into this behavior when doing mfsbsd builds on my 14.3-RELEASE host using this src.conf: <a href="https://reviews.freebsd.org/P702" rel="noreferrer" target="_blank">https://reviews.freebsd.org/P702</a>; . MK_AUTO_OBJ=yes as shown here: <a href="https://reviews.freebsd.org/P703" rel="noreferrer" target="_blank">https://reviews.freebsd.org/P703</a>; .<br>
<br>
I always run this target as part of buildworld on my 14.3-RELEASE host, so whatever is working on your end is likely an artifact of the build host environment, whereas what’s not working for me like you expect is an artifact of my build host environment.<br>
<br>
This:<br>
<br>
&gt; Before this change, `make test-includes` (run as part of buildworld)<br>
&gt; would place test files in the current directory, which would clutter up<br>
&gt; git clones. <br>
<br>
<br>
Could more accurately be expressed like this:<br>
<br>
&gt; Before this change, `make test-includes` (run as part of buildworld)<br>
&gt; would place test files in the current directory on my 14.3-RELEASE<br>
&gt; build host, which would clutter up git clones. <br>
<br>
<br>
The exact reason why there’s a difference eludes me right now.<br></blockquote><div><br></div><div>The likely reason is that you explicitly ran `make test-includes` without first running `buildworld` to create the objdir. As part of buildworld, it always creates the right thing. Or there&#39;s some other partial evaluation. That&#39;s the only way I could recreate it, and only if I turned off metamode.</div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
PS I was waiting for a response to the Differential for over a week; I landed the change because I hadn’t received feedback on the review in that period of time and because it gets really old quickly having to always do `git status -uno` in my clones to make sure I’m not accidentally committing things that shouldn’t be committed. This is especially annoying when doing rebases with my “Mac” dev branch because it has a lot of overlapping sections of code in asmc(4) and thunderbolt(4).</blockquote><div><br></div><div>Yea, you didn&#39;t ping me on it. I&#39;ve got a lot going on... There&#39;s a lot of requests with my name on it and w/o an explicit ping, I can often miss them. It&#39;s not wrong, per se, but the commit message was incorrect and overly broad. Brooks showed me a way to recreate it, which I did, but I couldn&#39;t otherwise create this with either meta mode on or off. I doubt that cross-version builds would cause it too, but I suppose it might. </div><div><br></div><div>I do get the annoyance. And it all worked out: I found a way to trigger this, even if it isn&#39;t what you are hitting.</div><div><br></div><div>Warner</div></div></div>
home | help

Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CANCZdforN%2Bdx2-f0q%2BneZiH3TAw3QtF0%2BBpxCUEmGrdR-d4Geg>