Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 8 Feb 2022 11:14:57 -0700
From:      Warner Losh <imp@bsdimp.com>
To:        "Simon J. Gerraty" <sjg@juniper.net>
Cc:        George Abdelmalik <george@fork.id.au>, FreeBSD Current <freebsd-current@freebsd.org>
Subject:   Re: buildworld failed
Message-ID:  <CANCZdfpTV38RyHR3cmvd8Mm6XHMPm6jp9_3iOzy3NMA7STx3dA@mail.gmail.com>
In-Reply-To: <9955.1644342979@kaos.jnpr.net>
References:  <0UZyB4mlM9jAgpWD6iLfODtbpKIM4xVsFg11wqD5CvHnEQNQrXX4Dx6ywa0fW2ZNmzk0XC5Os_gCkYm-knr8JmCokn5xI_onhf5A4mUn2mI=@protonmail.com> <a2412886-99c6-8942-dd77-d02253390a64@fork.id.au> <CANCZdfqZqHfY1irmsTn5Omkz-2Uqo8wFgwuZAPqPmOb9VCdG1Q@mail.gmail.com> <9955.1644342979@kaos.jnpr.net>

next in thread | previous in thread | raw e-mail | index | archive | help
--0000000000006a118605d785b2a2
Content-Type: text/plain; charset="UTF-8"

On Tue, Feb 8, 2022 at 10:56 AM Simon J. Gerraty <sjg@juniper.net> wrote:

> Warner Losh <imp@bsdimp.com> wrote:
> > --- sys/abi_compat.c ---
> > echo "#include <sys/abi_compat.h>" > sys/abi_compat.c
> > sh: cannot create sys/abi_compat.c: No such file or directory
> > *** [sys/abi_compat.c] Error code 2
> >
> > make[4]: stopped in /usr/src/tools/build/test-includes
> > --- sys/acct.c ---
> > echo "#include <sys/acct.h>" > sys/acct.c
> > sh: cannot create sys/acct.c: No such file or directory
> > *** [sys/acct.c] Error code 2
> >
> > make[4]: stopped in /usr/src/tools/build/test-includes
> > --- sys/aio.c ---
> > echo "#include <sys/aio.h>" > sys/aio.c
> > sh: cannot create sys/aio.c: No such file or directory
> > *** [sys/aio.c] Error code 2
> >
> > make[4]: stopped in /usr/src/tools/build/test-includes
> > --- sys/acl.c ---
> > echo "#include <sys/acl.h>" > sys/acl.c
> > sh: cannot create sys/acl.c: No such file or directory
> > *** [sys/acl.c] Error code 2
> >
> >
> >
> > Same here for me for the past couple of weeks. Haven't been able to
> > identify why it fails. My hunch was that a particular objdir wasn't
> > being created. As a workaround I edited the Makefile.inc1 to remove
> > the test-includes command (line 1128 I think).
>
> The sys subdir does not exist.
>

Why does it exist for me, though? What's making it for me and not for the
OP?


> Best bet would be to avoid the need:
>

Oh, I like this and I agree. Do you want to commit, or should I do the
honors?

Warner


> diff --git a/tools/build/test-includes/Makefile
> b/tools/build/test-includes/Makefile
> index 3ae39a2cb61..eb9016ecc03 100644
> --- a/tools/build/test-includes/Makefile
> +++ b/tools/build/test-includes/Makefile
> @@ -24,11 +24,11 @@ CFLAGS.event.c=     -D_WANT_KEVENT32
> -D_WANT_FREEBSD11_KEVENT
>
>  .include "badfiles.inc"
>
> -.for h in ${HDRS}
> +.for h c in ${HDRS:@x@$x ${x:S,/,_,g:R}.c@}
>  .if !${BADHDRS:M${h}}
> -SRCS+= ${h:R}.c
> -CLEANFILES+=${h:R}.c
> -${h:R}.c:
> +SRCS+= $c
> +CLEANFILES+=$c
> +$c:
>         echo "#include <$h>" > ${.TARGET}
>  .endif
>  .endfor
>
> so you get:
>
> echo "#include <sys/abi_compat.h>" > sys_abi_compat.c
> echo "#include <sys/acct.h>" > sys_acct.c
> echo "#include <sys/acl.h>" > sys_acl.c
> echo "#include <sys/aio.h>" > sys_aio.c
> echo "#include <sys/alq.h>" > sys_alq.c
> echo "#include <sys/apm.h>" > sys_apm.c
> echo "#include <sys/arb.h>" > sys_arb.c
> echo "#include <sys/asan.h>" > sys_asan.c
> echo "#include <sys/assym.h>" > sys_assym.c
>
> etc
>

--0000000000006a118605d785b2a2
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div dir=3D"ltr"><br></div><br><div class=3D"gmail_quote">=
<div dir=3D"ltr" class=3D"gmail_attr">On Tue, Feb 8, 2022 at 10:56 AM Simon=
 J. Gerraty &lt;<a href=3D"mailto:sjg@juniper.net">sjg@juniper.net</a>&gt; =
wrote:<br></div><blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0=
px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Warner Lo=
sh &lt;<a href=3D"mailto:imp@bsdimp.com" target=3D"_blank">imp@bsdimp.com</=
a>&gt; wrote:<br>
&gt; --- sys/abi_compat.c ---<br>
&gt; echo &quot;#include &lt;sys/abi_compat.h&gt;&quot; &gt; sys/abi_compat=
.c<br>
&gt; sh: cannot create sys/abi_compat.c: No such file or directory<br>
&gt; *** [sys/abi_compat.c] Error code 2<br>
&gt; <br>
&gt; make[4]: stopped in /usr/src/tools/build/test-includes<br>
&gt; --- sys/acct.c ---<br>
&gt; echo &quot;#include &lt;sys/acct.h&gt;&quot; &gt; sys/acct.c<br>
&gt; sh: cannot create sys/acct.c: No such file or directory<br>
&gt; *** [sys/acct.c] Error code 2<br>
&gt; <br>
&gt; make[4]: stopped in /usr/src/tools/build/test-includes<br>
&gt; --- sys/aio.c ---<br>
&gt; echo &quot;#include &lt;sys/aio.h&gt;&quot; &gt; sys/aio.c<br>
&gt; sh: cannot create sys/aio.c: No such file or directory<br>
&gt; *** [sys/aio.c] Error code 2<br>
&gt; <br>
&gt; make[4]: stopped in /usr/src/tools/build/test-includes<br>
&gt; --- sys/acl.c ---<br>
&gt; echo &quot;#include &lt;sys/acl.h&gt;&quot; &gt; sys/acl.c<br>
&gt; sh: cannot create sys/acl.c: No such file or directory<br>
&gt; *** [sys/acl.c] Error code 2<br>
&gt; <br>
&gt; <br>
&gt; <br>
&gt; Same here for me for the past couple of weeks. Haven&#39;t been able t=
o<br>
&gt; identify why it fails. My hunch was that a particular objdir wasn&#39;=
t<br>
&gt; being created. As a workaround I edited the Makefile.inc1 to remove<br=
>
&gt; the test-includes command (line 1128 I think).<br>
<br>
The sys subdir does not exist.<br></blockquote><div><br></div><div>Why does=
 it exist for me, though? What&#39;s making it for me and not for the OP?</=
div><div>=C2=A0</div><blockquote class=3D"gmail_quote" style=3D"margin:0px =
0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
Best bet would be to avoid the need:<br></blockquote><div><br></div><div>Oh=
, I like this and I agree. Do you want to commit, or should I do the honors=
?</div><div><br></div><div>Warner</div><div>=C2=A0</div><blockquote class=
=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid rg=
b(204,204,204);padding-left:1ex">
diff --git a/tools/build/test-includes/Makefile b/tools/build/test-includes=
/Makefile<br>
index 3ae39a2cb61..eb9016ecc03 100644<br>
--- a/tools/build/test-includes/Makefile<br>
+++ b/tools/build/test-includes/Makefile<br>
@@ -24,11 +24,11 @@ CFLAGS.event.c=3D=C2=A0 =C2=A0 =C2=A0-D_WANT_KEVENT32 -=
D_WANT_FREEBSD11_KEVENT<br>
<br>
=C2=A0.include &quot;badfiles.inc&quot;<br>
<br>
-.for h in ${HDRS}<br>
+.for h c in ${HDRS:@x@$x ${x:S,/,_,g:R}.c@}<br>
=C2=A0.if !${BADHDRS:M${h}}<br>
-SRCS+=3D ${h:R}.c<br>
-CLEANFILES+=3D${h:R}.c<br>
-${h:R}.c:<br>
+SRCS+=3D $c<br>
+CLEANFILES+=3D$c<br>
+$c:<br>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 echo &quot;#include &lt;$h&gt;&quot; &gt; ${.TA=
RGET}<br>
=C2=A0.endif<br>
=C2=A0.endfor<br>
<br>
so you get:<br>
<br>
echo &quot;#include &lt;sys/abi_compat.h&gt;&quot; &gt; sys_abi_compat.c<br=
>
echo &quot;#include &lt;sys/acct.h&gt;&quot; &gt; sys_acct.c<br>
echo &quot;#include &lt;sys/acl.h&gt;&quot; &gt; sys_acl.c<br>
echo &quot;#include &lt;sys/aio.h&gt;&quot; &gt; sys_aio.c<br>
echo &quot;#include &lt;sys/alq.h&gt;&quot; &gt; sys_alq.c<br>
echo &quot;#include &lt;sys/apm.h&gt;&quot; &gt; sys_apm.c<br>
echo &quot;#include &lt;sys/arb.h&gt;&quot; &gt; sys_arb.c<br>
echo &quot;#include &lt;sys/asan.h&gt;&quot; &gt; sys_asan.c<br>
echo &quot;#include &lt;sys/assym.h&gt;&quot; &gt; sys_assym.c<br>
<br>
etc<br>
</blockquote></div></div>

--0000000000006a118605d785b2a2--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CANCZdfpTV38RyHR3cmvd8Mm6XHMPm6jp9_3iOzy3NMA7STx3dA>