Re: Odd whine during "make installworld"

Warner Losh <[email protected]> Tue, 4 Aug 2026 07:03:18 -0600
Newsgroups gmane.os.freebsd.current
Message-ID <CANCZdfqLydwmw7icyU3=wzxYp0_NDp9qaOQ15Z2pnKeHaoo0pw@mail.gmail.com>
--0000000000000ce79d0658384805
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

On Tue, Aug 4, 2026 at 6:51=E2=80=AFAM David Wolfskill <[email protected]=
g> wrote:

> System was running;
>
> FreeBSD 16.0-CURRENT #652 main-n287884-16e47f317c4c: Sun Aug  2 13:47:23
> UTC 2026     [email protected]:/common/S4/obj/usr/src/amd64.a=
md64/sys/GENERIC
> amd64 1600019 1600019
>
> I then updated sources to main-n287899-1c91c3ae1ec6, and performed the
> usual in-place source-based update.  During the "make installworld"
> phase, I happened to note:
>
> ...
> =3D=3D=3D> share/man/man3lua (install)
> install   -o root -g wheel -m 444 intro.3lua.gz  /usr/share/man/man3lua/
> =3D=3D=3D> share/man/man4 (install)
> ld-elf.so.1: /bin/ls: Undefined symbol "fts_open@FBSD_1.9"
> make[6]: /usr/src/share/man/man4/Makefile:1009: warning: Command "/bin/sh
> -c "/bin/ls -d /usr/src/share/man/man4/man4.*"" exited with status 1
> install   -o root -g wheel -m 444 atf-test-case.4.gz  /usr/share/man/man4=
/
> install   -o root -g wheel -m 444 aac.4.gz  /usr/share/man/man4/
> ....
>

Looks like ls needs to be an install tool. But it really shouldn't be, more
below

TOOLS=3D [ awk cap_mkdb cat chflags chmod chown cmp cp \
        date echo egrep find grep id install \
        ln make mkdir mtree mv pwd_mkdb \
        rm sed services_mkdb sh sort strip ${_sysctl} test time true uname
wc

Also, why is ls used in this way:

.if empty(MAN_ARCH) || ${MAN_ARCH} =3D=3D "all"
__arches=3D       ${:!/bin/sh -c "/bin/ls -d ${.CURDIR}/man4.*"!:E}
.else
__arches=3D       ${MAN_ARCH}
.endif
.for __arch in ${__arches:O:u}
.if exists(${.CURDIR}/man4.${__arch})
SUBDIR+=3D        man4.${__arch}
.endif
.endfor

Why can't we just 'echo' and be done with it? Usually in the tree, though,
we list things
explicitly. Putting that aside, does the following fix the installworld
whine?

diff --git a/share/man/man4/Makefile b/share/man/man4/Makefile
index 80b9ac16ce87..cc20a3058b38 100644
--- a/share/man/man4/Makefile
+++ b/share/man/man4/Makefile
@@ -999,7 +999,7 @@ MLINKS+=3Dcgem.4 if_cgem.4
 .endif

 .if empty(MAN_ARCH) || ${MAN_ARCH} =3D=3D "all"
-__arches=3D      ${:!/bin/sh -c "/bin/ls -d ${.CURDIR}/man4.*"!:E}
+__arches=3D      ${:!/bin/sh -c "echo ${.CURDIR}/man4.*"!:E}
 .else
 __arches=3D      ${MAN_ARCH}
 .endif

Warner

--0000000000000ce79d0658384805
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 g=
mail_quote_container"><div dir=3D"ltr" class=3D"gmail_attr">On Tue, Aug 4, =
2026 at 6:51=E2=80=AFAM David Wolfskill &lt;<a href=3D"mailto:david@catwhis=
ker.org">[email protected]</a>&gt; wrote:<br></div><blockquote class=3D"=
gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(20=
4,204,204);padding-left:1ex">System was running;<br>
<br>
FreeBSD 16.0-CURRENT #652 main-n287884-16e47f317c4c: Sun Aug=C2=A0 2 13:47:=
23 UTC 2026=C2=A0 =C2=A0 =C2=A0<a href=3D"mailto:[email protected].=
org" target=3D"_blank">[email protected]</a>:/common/S4/obj/usr=
/src/amd64.amd64/sys/GENERIC amd64 1600019 1600019<br>
<br>
I then updated sources to main-n287899-1c91c3ae1ec6, and performed the<br>
usual in-place source-based update.=C2=A0 During the &quot;make installworl=
d&quot;<br>
phase, I happened to note:<br>
<br>
...<br>
=3D=3D=3D&gt; share/man/man3lua (install)<br>
install=C2=A0 =C2=A0-o root -g wheel -m 444 intro.3lua.gz=C2=A0 /usr/share/=
man/man3lua/<br>
=3D=3D=3D&gt; share/man/man4 (install)<br>
ld-elf.so.1: /bin/ls: Undefined symbol &quot;fts_open@FBSD_1.9&quot;<br>
make[6]: /usr/src/share/man/man4/Makefile:1009: warning: Command &quot;/bin=
/sh -c &quot;/bin/ls -d /usr/src/share/man/man4/man4.*&quot;&quot; exited w=
ith status 1<br>
install=C2=A0 =C2=A0-o root -g wheel -m 444 atf-test-case.4.gz=C2=A0 /usr/s=
hare/man/man4/<br>
install=C2=A0 =C2=A0-o root -g wheel -m 444 aac.4.gz=C2=A0 /usr/share/man/m=
an4/<br>
....<br></blockquote><div><br></div><div>Looks like ls needs to be an insta=
ll tool. But it really shouldn&#39;t be, more below</div><div><br></div><di=
v>TOOLS=3D [ awk cap_mkdb cat chflags chmod chown cmp cp \<br>=C2=A0 =C2=A0=
 =C2=A0 =C2=A0 date echo egrep find grep id install \<br>=C2=A0 =C2=A0 =C2=
=A0 =C2=A0 ln make mkdir mtree mv pwd_mkdb \<br>=C2=A0 =C2=A0 =C2=A0 =C2=A0=
 rm sed services_mkdb sh sort strip ${_sysctl} test time true uname wc</div=
><div><br></div><div>Also, why is ls used in this way:</div><div><br></div>=
<div>.if empty(MAN_ARCH) || ${MAN_ARCH} =3D=3D &quot;all&quot;<br>__arches=
=3D =C2=A0 =C2=A0 =C2=A0 ${:!/bin/sh -c &quot;/bin/ls -d ${.CURDIR}/man4.*&=
quot;!:E}<br>.else<br>__arches=3D =C2=A0 =C2=A0 =C2=A0 ${MAN_ARCH}<br>.endi=
f<br>.for __arch in ${__arches:O:u}<br>.if exists(${.CURDIR}/man4.${__arch}=
)<br>SUBDIR+=3D =C2=A0 =C2=A0 =C2=A0 =C2=A0man4.${__arch}<br>.endif<br>.end=
for</div><div><br></div><div>Why can&#39;t we just &#39;echo&#39; and be do=
ne with it? Usually in the tree, though, we list things</div><div>explicitl=
y. Putting that aside, does the following fix the installworld whine?</div>=
<div><br></div><div>diff --git a/share/man/man4/Makefile b/share/man/man4/M=
akefile<br>index 80b9ac16ce87..cc20a3058b38 100644<br>--- a/share/man/man4/=
Makefile<br>+++ b/share/man/man4/Makefile<br>@@ -999,7 +999,7 @@ MLINKS+=3D=
cgem.4 if_cgem.4<br>=C2=A0.endif<br><br>=C2=A0.if empty(MAN_ARCH) || ${MAN_=
ARCH} =3D=3D &quot;all&quot;<br>-__arches=3D =C2=A0 =C2=A0 =C2=A0${:!/bin/s=
h -c &quot;/bin/ls -d ${.CURDIR}/man4.*&quot;!:E}<br>+__arches=3D =C2=A0 =
=C2=A0 =C2=A0${:!/bin/sh -c &quot;echo ${.CURDIR}/man4.*&quot;!:E}<br>=C2=
=A0.else<br>=C2=A0__arches=3D =C2=A0 =C2=A0 =C2=A0${MAN_ARCH}<br>=C2=A0.end=
if</div><div><br></div><div>Warner</div></div></div>

--0000000000000ce79d0658384805--