Re: git: 99feb137f5f6 - main - `make buildworld' with time logging for each stage

From: Wolfram Schneider <wosch_at_freebsd.org>
Date: Sun, 01 Aug 2021 12:35:22 UTC
Hi David,

Thanks for the investigation. I will prepare a fix soon.

BTW, should we care about the error message

"sh: pkg: not found" ?

-Wolfram



On Sun, 1 Aug 2021 at 14:26, David Wolfskill <david@catwhisker.org> wrote:
>
> I believe that src/Makefile.inc1 needs a tweak to add "time" to the list
> of "Required install tools to be saved in a scratch dir for safety" --
> something like:
>
> diff --git a/Makefile.inc1 b/Makefile.inc1
> index 3d54a088d070..213b32a97ed3 100644
> --- a/Makefile.inc1
> +++ b/Makefile.inc1
> @@ -1300,7 +1300,7 @@ _sysctl=sysctl
>  ITOOLS=        [ awk cap_mkdb cat chflags chmod chown cmp cp \
>         date echo egrep find grep id install ${_install-info} \
>         ln make mkdir mtree mv pwd_mkdb \
> -       rm sed services_mkdb sh sort strip ${_sysctl} test true uname wc \
> +       rm sed services_mkdb sh sort strip ${_sysctl} test time true uname wc \
>         ${_zoneinfo} ${LOCAL_ITOOLS}
>
>  # Needed for share/man
>
>
> Because when I tried to update from main-n248391-f7f76c200a8c to
> main-n248404-60fb9e10c74c, I saw:
>
> ...
> ===> etc (install)
> ===> etc/sendmail (install)
> cd /usr/src/share/man; make makedb
> makewhatis /usr/share/man
> makewhatis /usr/share/openssl/man
> cd /usr/src; make -f Makefile.inc1 install32
> sh: pkg: not found
> cd /usr/src/lib; time env MACHINE_CPU="i686 mmx sse sse2" MACHINE=i386 MACHINE_ARCH=i386 PATH=/common/S4/obj/usr/src/amd64.amd64/tmp/bin:/common/S4/obj/usr/src/amd64.amd64/tmp/usr/sbin:/common/S4/obj/usr/src/amd64.amd64/tmp/usr/bin:/common/S4/obj/usr/src/amd64.amd64/tmp/legacy/usr/sbin:/common/S4/obj/usr/src/amd64.amd64/tmp/legacy/usr/bin:/common/S4/obj/usr/src/amd64.amd64/tmp/legacy/bin:/common/S4/obj/usr/src/amd64.amd64/tmp/legacy/usr/libexec::/common/S4/obj/usr/src/amd64.amd64/tmp/bin:/common/S4/obj/usr/src/amd64.amd64/tmp/usr/sbin:/common/S4/obj/usr/src/amd64.amd64/tmp/usr/bin:/common/S4/obj/usr/src/amd64.amd64/tmp/legacy/usr/sbin:/common/S4/obj/usr/src/amd64.amd64/tmp/legacy/usr/bin:/common/S4/obj/usr/src/amd64.amd64/tmp/legacy/bin:/common/S4/obj/usr/src/amd64.amd64/tmp/legacy/usr/libexec::/tmp/install.Z8rMzNyp SYSROOT=/common/S4/obj/usr/src/amd64.amd64/obj-lib32/tmp LIBDIR=/usr/lib32 SHLIBDIR=/usr/lib32 DTRACE="dtrace" make AS="as --32" LD="ld -m elf_i386_fbsd" NM="nm" OBJCOPY="objcopy" -DCOMPAT_32BIT CC="cc -target x86_64-unknown-freebsd14.0 --sysroot=/common/S4/obj/usr/src/amd64.amd64/tmp -B/common/S4/obj/usr/src/amd64.amd64/tmp/usr/bin -DCOMPAT_32BIT -march=i686 -mmmx -msse -msse2 -target x86_64-unknown-freebsd14.0 -m32  --sysroot=/common/S4/obj/usr/src/amd64.amd64/obj-lib32/tmp  -B/common/S4/obj/usr/src/amd64.amd64/tmp/usr/bin -B/common/S4/obj/usr/src/amd64.amd64/obj-lib32/tmp/usr/lib32" CXX="c++  -target x86_64-unknown-freebsd14.0 --sysroot=/common/S4/obj/usr/src/amd64.amd64/tmp -B/common/S4/obj/usr/src/amd64.amd64/tmp/usr/bin  -DCOMPAT_32BIT -march=i686 -mmmx -msse -msse2 -target x86_64-unknown-freebsd14.0 -m32  --sysroot=/common/S4/obj/usr/src/amd64.amd64/obj-lib32/tmp  -B/common/S4/obj/usr/src/amd64.amd64/tmp/usr/bin -B/common/S4/obj/usr/src/amd64.amd64/obj-lib32/tmp/usr/lib32" CPP="cpp -target x86_64-unknown-freebsd14.0 --sysroot=/common/S4/obj/usr/src/amd64.amd64/tmp -B/common/S4/obj/usr/src/amd64.amd64/tmp/usr/bin -DCOMPAT_32BIT -march=i686 -mmmx -msse -msse2 -target x86_64-unknown-freebsd14.0 -m32  --sysroot=/common/S4/obj/usr/src/amd64.amd64/obj-lib32/tmp  -B/common/S4/obj/usr/src/amd64.amd64/tmp/usr/bin -B/common/S4/obj/usr/src/amd64.amd64/obj-lib32/tmp/usr/lib32" -DNO_CPU_CFLAGS MK_CTF=no -DNO_LINT MK_TESTS=no OBJTOP=/common/S4/obj/usr/src/amd64.amd64/obj-lib32 OBJROOT='${OBJTOP}/' MAKEOBJDIRPREFIX= MK_MAN=no MK_HTML=no    -DLIBRARIES_ONLY install
> /tmp/install.Z8rMzNyp/sh: time: not found
> *** Error code 127
>
> Stop.
> make[3]: stopped in /usr/src
> *** Error code 1
>
> Stop.
> make[2]: stopped in /usr/src
>       149.85 real        65.62 user        35.05 sys
> *** Error code 1
>
> Stop.
> make[1]: stopped in /usr/src
> *** Error code 1
>
> Stop.
> make: stopped in /usr/src
>
> Command exit status: 1
> Script done on Sun Aug  1 05:17:29 2021
>
>
> Making the above change, then re-running the "make installworld" has worked.
>
> Peace,
> david
> --
> David H. Wolfskill                              david@catwhisker.org
> Life is not intended to be a zero-sum game.
>
> See https://www.catwhisker.org/~david/publickey.gpg for my public key.



-- 
Wolfram Schneider <wosch@FreeBSD.org> https://wolfram.schneider.org