Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 24 Feb 2023 12:55:56 -0800
From:      Mark Millard <marklmi@yahoo.com>
To:        "Simon J. Gerraty" <sjg@juniper.net>
Cc:        Bryan Drewery <bdrewery@FreeBSD.org>, Current FreeBSD <freebsd-current@FreeBSD.org>, Peter <pmc@citylink.dinoex.sub.org>
Subject:   Re: FYI: Why META_MODE rebuilds so much for building again after installworld (no source changes)
Message-ID:  <19D6D11D-7FA0-4D86-B04C-0EE5D3AAE028@yahoo.com>
In-Reply-To: <30.1677224034@kaos.jnpr.net>
References:  <B74790D9-FBC2-4818-BEAF-34E5B705C460@yahoo.com> <3345EBA5-A09C-4E3F-B94D-39F57F56BDBB@yahoo.com> <DB0C7B41-2101-4C5C-BFC8-3C95CC0B9F6F@yahoo.com> <73088.1611797582@kaos.jnpr.net> <CB7040D0-3BF4-496F-A54F-87E5378016E0@yahoo.com> <F6BF110D-7855-4A10-A53F-52B34282234F@yahoo.com> <10819.1677108389@kaos.jnpr.net> <76FA98EF-6184-4D7E-A01F-0EE8117D0D10@yahoo.com> <29887.1677115125@kaos.jnpr.net> <27790339-240F-4C97-97C7-38AFD8DE03D5@yahoo.com> <7FB6F619-6E71-4075-8A6C-573564371DD5@yahoo.com> <2655.1677134606@kaos.jnpr.net> <242BB478-B2FE-4BCC-A56E-098F3FEB3EE1@yahoo.com> <42586.1677183334@kaos.jnpr.net> <AE95CF5D-0B7E-4DA3-8777-5FA47E1751D8@yahoo.com> <30.1677189836@kaos.jnpr.net> <1B5FCF8A-0DFD-4246-8464-65A44A40529F@yahoo.com> <93460.1677202939@kaos.jnpr.net> <F02F01EE-9866-4F37-884B-74A2665A5F08@yahoo.com> <17672.1677210880@kaos.jnpr.net> <21F1E7D4-D709-4DFF-98D6-51795B9BB291@yahoo.com> <30.1677224034@kaos.jnpr.net>

next in thread | previous in thread | raw e-mail | index | archive | help
On Feb 23, 2023, at 23:33, Simon J. Gerraty <sjg@juniper.net> wrote:
>=20
>> . . .
>=20
> Yes, if the value of MAKEOBJDIRPREFIX isn't consistent that's going to
> cause problems (I'd call it a bug). If so don't use MAKEOBJDIRPREFIX
> directly, set some other variable and export that.
> Hmm src.sys.obj.mk plays games with MAKEOBJDIRPREFIX so that's
> probably not a good option.
> Perhaps:
>=20
> diff --git a/share/mk/src.sys.obj.mk b/share/mk/src.sys.obj.mk
> index 3b48fc3c5514..3c7e570dbdbd 100644
> --- a/share/mk/src.sys.obj.mk
> +++ b/share/mk/src.sys.obj.mk
> @@ -67,6 +67,9 @@ SB_OBJROOT?=3D ${SB}/obj/
> OBJROOT?=3D ${SB_OBJROOT}
> .endif
> OBJROOT?=3D ${_default_makeobjdirprefix}${SRCTOP}/
> +# save the value before we mess with it
> +_OBJROOT:=3D ${OBJROOT:tA}
> +.export _OBJROOT
> .if ${OBJROOT:M*/} !=3D ""
> OBJROOT:=3D ${OBJROOT:H:tA}/
> .else
>=20
> and then something like?
>=20
> .MAKE.META.IGNORE_PATHS +=3D
> ${_OBJROOT}/${MACHINE}.${MACHINE_ARCH}/tmp/legacy/usr
>=20
>> . . .
>=20

Thanks.

That has allowed me to set up the disabling of
specific . . ./tmp/legacy/usr/sbin/* programs
from having their dates lead directly to rebuild
activity (tested via -dM use in the make commands).

For reference, I'm using the below block of text
for the .MAKE.META.IGNORE_PATHS adjustments now.

# _OBJROOT is an addition to share/mk/src.sys.obj.mk
# provided by Simon J. Gerraty for my experimentation
# with this avoidance of some unnecessary build
# activity in META MODE:
#
#  OBJROOT?=3D      ${_default_makeobjdirprefix}${SRCTOP}/
# +# save the value before we mess with it
# +_OBJROOT:=3D ${OBJROOT:tA}
# +.export _OBJROOT
#
# TARGET.TARGET_ARCH   for amd64 stays as  amd64.amd64 for obj-lib32 =
(correct for the purpose)
# MACHINE.MACHINE_ARCH for amd64 turns into i386.i386  for obj-lib32 =
(wrong   for the purpose)
#
IGNORELEGACY_NOSYMLINKPREFIX=3D =
${_OBJROOT}/${TARGET}.${TARGET_ARCH}/tmp/legacy/usr
IGNOREOTHER_NOSYMLINKPREFIX=3D  =
${_OBJROOT}/${TARGET}.${TARGET_ARCH}/tmp/usr/bin
#
.for ignore_legacy_tool in awk basename cap_mkdb cat chmod cmp cp =
crunchgen crunchide cut date dd dirname echo egrep env expr fgrep file2c =
find gencat grep gzip head hostname jot lex lb ln ls m4 make
mkcsmapper mkdir mktemp mtree mv nawk patch realpath rm sed sh sort =
touch tr truncate uudecode uuencode wc xargs
.MAKE.META.IGNORE_PATHS+=3D =
${IGNORELEGACY_NOSYMLINKPREFIX}/sbin/${ignore_legacy_tool}
.endfor
#
.for ignore_other_tool in ctfconvert objcopy nm
.MAKE.META.IGNORE_PATHS+=3D =
${IGNOREOTHER_NOSYMLINKPREFIX}/${ignore_other_tool}
.endfor
#
.MAKE.META.IGNORE_PATHS:=3D ${.MAKE.META.IGNORE_PATHS}

(It is in a file specified via env __MAKE_CONF=3D use.)

I've extended the experiment to span releng/13.0 ,
releng/13.1 , stable/13 as well, not just main
[so: 14]. And I've set up the aarch64 environment
as well for that range of system variations. (It also
builds for targeting armv7 which is also covered.)
We will see how it goes as I track system updates
periodically.

Thanks again.


For reference, the -dM "is newer than" notice counts
in the log for a buildworld buildkernel just after
a installworld installkernel now looks like:

1467 file =
'/usr/obj/BUILDs/main-amd64-nodbg-clang/usr/main-src/amd64.amd64/tmp/usr/l=
ib/Scrt1.o' is newer than the target...
515 file =
'/usr/obj/BUILDs/main-amd64-nodbg-clang/usr/main-src/amd64.amd64/tmp/usr/l=
ib/crti.o' is newer than the target...
236 file =
'/usr/obj/BUILDs/main-amd64-nodbg-clang/usr/main-src/amd64.amd64/tmp/usr/l=
ib32/crti.o' is newer than the target...
 70 file =
'/usr/obj/BUILDs/main-amd64-nodbg-clang/usr/main-src/amd64.amd64/tmp/usr/l=
ib/libgcc_s.so' is newer than the target...
 69 file =
'/usr/obj/BUILDs/main-amd64-nodbg-clang/usr/main-src/amd64.amd64/tmp/usr/l=
ib32/libgcc_s.so' is newer than the target...
 68 file =
'/usr/obj/BUILDs/main-amd64-nodbg-clang/usr/main-src/amd64.amd64/tmp/usr/l=
ib/crt1.o' is newer than the target...
  3 file =
'/usr/obj/BUILDs/main-amd64-nodbg-clang/usr/main-src/amd64.amd64/tmp/usr/i=
nclude/aio.h' is newer than the target...
  1 file =
'/usr/obj/BUILDs/main-amd64-nodbg-clang/usr/main-src/amd64.amd64/tmp/usr/l=
ib32/libssl.so' is newer than the target...
  1 file =
'/usr/obj/BUILDs/main-amd64-nodbg-clang/usr/main-src/amd64.amd64/tmp/usr/l=
ib32/libcxxrt.so' is newer than the target...
  1 file =
'/usr/obj/BUILDs/main-amd64-nodbg-clang/usr/main-src/amd64.amd64/tmp/usr/l=
ib32/libctf.so' is newer than the target...
  1 file =
'/usr/obj/BUILDs/main-amd64-nodbg-clang/usr/main-src/amd64.amd64/tmp/usr/l=
ib32/libcrypto.so' is newer than the target...
  1 file =
'/usr/obj/BUILDs/main-amd64-nodbg-clang/usr/main-src/amd64.amd64/tmp/usr/l=
ib32/libc.so.7' is newer than the target...
  1 file =
'/usr/obj/BUILDs/main-amd64-nodbg-clang/usr/main-src/amd64.amd64/tmp/usr/l=
ib32/Scrt1.o' is newer than the target...
  1 file =
'/usr/obj/BUILDs/main-amd64-nodbg-clang/usr/main-src/amd64.amd64/tmp/usr/l=
ib/libssl.so' is newer than the target...
  1 file =
'/usr/obj/BUILDs/main-amd64-nodbg-clang/usr/main-src/amd64.amd64/tmp/usr/l=
ib/libcxxrt.so' is newer than the target...
  1 file =
'/usr/obj/BUILDs/main-amd64-nodbg-clang/usr/main-src/amd64.amd64/tmp/usr/l=
ib/libctf.so' is newer than the target...
  1 file =
'/usr/obj/BUILDs/main-amd64-nodbg-clang/usr/main-src/amd64.amd64/tmp/usr/l=
ib/libcrypto.so' is newer than the target...
  1 file =
'/usr/obj/BUILDs/main-amd64-nodbg-clang/usr/main-src/amd64.amd64/tmp/lib/l=
ibc.so.7' is newer than the target...

Doing another buildworld buildkernel just after and looking at
its log's counts looks very similar.

(No claim of what the likes of, say, a clang14 -> clang15 based
system update would be like overall: the above is for the
study-state of no source updates being involved.)

=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?19D6D11D-7FA0-4D86-B04C-0EE5D3AAE028>