Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 23 Feb 2021 12:34:55 -0600
From:      Kyle Evans <kevans@freebsd.org>
To:        Warner Losh <imp@bsdimp.com>
Cc:        dweimer@dweimer.net, FreeBSD Stable <freebsd-stable@freebsd.org>
Subject:   Re: 13-BETA3 installation from source problems.
Message-ID:  <CACNAnaF6_vXKEk-auxr_zvu=q6ywvY=ndhWkg0VyW66GGAc4pw@mail.gmail.com>
In-Reply-To: <CANCZdfpQUtPpyFYgVEke1jFpDJUne1LVS%2B0ncHFWozArfs2WQQ@mail.gmail.com>
References:  <b75040cf0985c0582dbe4d82143adc7b@dweimer.net> <CANCZdfor02pyBnYsPviqOuPKMLabUCczSf8Z--u2j6kU5jj%2BUQ@mail.gmail.com> <909bf509b35ec1cda7b70c749edc6b75@dweimer.net> <df551839bde8a440e2917779d949933c@dweimer.net> <0b5141137f69e2f86dd49edd4ffd1e78@dweimer.net> <CANCZdfpYnYsqwriuJUmXB1M5RMYMGB08hvQQZavyOaGuUDh0eg@mail.gmail.com> <CACNAnaHm-2cu4C2pOspG4eeCEP5Zmom_fTWMRgqL962tHoTw0A@mail.gmail.com> <CANCZdfpQUtPpyFYgVEke1jFpDJUne1LVS%2B0ncHFWozArfs2WQQ@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
The more I look at `make -dm` output, the less sense it makes. Your
patch is decidedly correct regardless of how this specific scenario is
playing out:

1.) As you noted, it's wrong to clean something that's built
elsewhere. You can reasonably expect `make clean all` to work pretty
much everywhere else.

2.) i386/loader cannot make an informed decision about whether it's
out-of-date, which is sufficient to tell that the existing addition to
OBJS was not the correct implementation in hindsight.

3.) The failure mode if it's *missing* is exactly the same before and
after your patch; file can't be found, cannot build it.

On Tue, Feb 23, 2021 at 12:09 PM Warner Losh <imp@bsdimp.com> wrote:
>
> I'm unsure of the mechanics as well. I do know that we shouldn't delete s=
tuff in OTHER directories, though. the btx stuff is trying to do a bit of a=
n end run around the link only with the installed stuff here and using crt0=
.o as a library from the 'where it was built' directory which I think creat=
es one too many dependencies... I've not yet puzzled through all of them to=
 find out which one is causing us to think we need to rebuild though.
>
> Warner
>
> On Tue, Feb 23, 2021 at 9:21 AM Kyle Evans <kevans@freebsd.org> wrote:
>>
>> Hi,
>>
>> What I don't understand here is, why are these being considered
>> out-of-date? That seems like it is indicative of a larger problem that
>> we'd surely fall over elsewhere on if not for here, that the source
>> tree's timestamps are post-dated w.r.t. the objdir.
>>
>> Thanks,
>>
>> Kyle Evans
>>
>> On Mon, Feb 22, 2021 at 5:52 PM Warner Losh <imp@bsdimp.com> wrote:
>> >
>> > What does this patch do for you?
>> >
>> > diff --git a/stand/i386/loader/Makefile b/stand/i386/loader/Makefile
>> > index ad95948ec50a..cbbe15bd1fc0 100644
>> > --- a/stand/i386/loader/Makefile
>> > +++ b/stand/i386/loader/Makefile
>> > @@ -90,7 +90,8 @@ FILES+=3D       ${LOADER}
>> >  FILESMODE_${LOADER}=3D ${BINMODE} -b
>> >
>> >  # XXX crt0.o needs to be first for pxeboot(8) to work
>> > -OBJS=3D  ${BTXCRT}
>> > +# Can't add it to OBJS w/o pain and suffering
>> > +LDFLAGS+=3D      ${BTXCRT}
>> >
>> >  DPADD=3D ${LDR_INTERP32} ${LIBFIREWIRE} ${LIBI386} ${LIBSA32}
>> >  LDADD=3D ${LDR_INTERP32} ${LIBFIREWIRE} ${LIBI386} ${LIBSA32}
>> >
>> > Anything?
>> >
>> > Warner
>> >
>> > On Mon, Feb 22, 2021 at 4:17 PM Dean E. Weimer <dweimer@dweimer.net> w=
rote:
>> >
>> > > On 2021-02-22 10:53 am, Dean E. Weimer wrote:
>> > > > On 2021-02-22 9:38 am, Dean E. Weimer via freebsd-stable wrote:
>> > > >> On 2021-02-22 9:29 am, Warner Losh wrote:
>> > > >>
>> > > >>> On Mon, Feb 22, 2021 at 8:24 AM Dean E. Weimer via freebsd-stabl=
e
>> > > >>> <freebsd-stable@freebsd.org> wrote:
>> > > >>>
>> > > >>>> I was able to successfully build and install BETA2 from source,
>> > > >>>> however
>> > > >>>> I am now attempting to upgrade the same machine to BETA3 buildw=
orld
>> > > >>>> and
>> > > >>>> buildkernel complete. installkernel also completes, but install=
world
>> > > >>>> fails, it appears to not find a file for i386 boot.
>> > > >>>>
>> > > >>>> I do have a customized src.conf
>> > > >>>> WIHTOUT_FLOPPY=3D"YES"
>> > > >>>> WITHOUT_FREEBSD_UPDATE=3D"YES"
>> > > >>>> WITH_BSD_GREP=3D"YES"
>> > > >>>> WITHOUT_BLUETOOTH=3D"YES"
>> > > >>>> WITHOUT_PORTSNAP=3D"YES"
>> > > >>>> WITHOUT_WIRELESS=3D"YES"
>> > > >>>> WITHOUT_WPA_SUPPLICANT_EAPOL=3D"YES"
>> > > >>>> WITHOUT_ATM=3D"YES"
>> > > >>>> WITHOUT_LPR=3D"YES"
>> > > >>>> WITHOUT_PPP=3D"YES"
>> > > >>>> WITHOUT_LLDB=3D"YES"
>> > > >>>> WITHOUT_FTP=3D"YES"
>> > > >>>> WITHOUT_RBOOTD=3D"YES"
>> > > >>>> WITHOUT_TALK=3D"YES"
>> > > >>>> WITHOUT_NTP=3D"YES"
>> > > >>>> WITH_ISCSI=3D"YES"
>> > > >>>> WITH_REPRODUCIBLE_BUILD=3D"YES"
>> > > >>>> WITHOUT_GNU_DIFF=3D"YES"
>> > > >>>> WITH_KERNEL_RETPOLINE=3D"YES"
>> > > >>>>
>> > > >>>> and customized make.conf
>> > > >>>> CFLAGS?=3D -O
>> > > >>>> CLFAGS+=3D -pipe
>> > > >>>> NO_CPU_CFLAGS=3D
>> > > >>>> MK_WERROR=3Dno
>> > > >>>>
>> > > >>>> WITH_CCACHE_BUILD=3D YES
>> > > >>>> OPTIONS_SET=3D LIBEDIT OPTIMIZED_CFLAGS GSSAPI_NONE
>> > > >>>> OPTIONS_UNSET=3D X11 X GUI TLS_SRP AVAHI GSSAPI_BASE XPM CUPS E=
XAMPLES
>> > > >>>> DOCS
>> > > >>>> WRKDIRPREFIX=3D /var/ports
>> > > >>>> PACKAGES=3D /var/ports/packages
>> > > >>>> WITH_PKGNG=3D YES
>> > > >>>> DEFAULT_VERSIONS=3D pgsql=3D13 php=3D80 apache=3D2.4 perl5=3D5.=
32 bdb=3D6
>> > > >>>> mysql=3D105m
>> > > >>>> ssl=3Dopenssl python=3D3.9 python3=3D3.9 gcc=3D9 linux=3Dc7 sam=
ba=3D4.13
>> > > >>>>
>> > > >>>> .if (!empty(.CURDIR:M/usr/src*) || !empty(.CURDIR:M/usr/obj*)) =
&&
>> > > >>>> !defined(NOCCACHE)
>> > > >>>> CC:=3D${CC:C,^cc,/usr/local/libexec/ccache/world/cc,1}
>> > > >>>> CXX:=3D${CXX:C,^c\+\+,/usr/local/libexec/ccache/world/c++,1}
>> > > >>>> .endif
>> > > >>>> .if (!empty(.CURDIR:M/jails/devel/ROOT/usr/src*) ||
>> > > >>>> !empty(.CURDIR:M/jails/devel/ROOT/usr/obj*)) && !defined(NOCCAC=
HE)
>> > > >>>> CC:=3D${CC:C,^cc,/usr/local/libexec/ccache/world/cc,1}
>> > > >>>> CXX:=3D${CXX:C,^c\+\+,/usr/local/libexec/ccache/world/c++,1}
>> > > >>>> .endif
>> > > >>>>
>> > > >>>> Here's the part of where it fails during the install, src tree =
was
>> > > >>>> checked out at commit 1d0d443daa570c8eaa60ec2c2accbe19554a6c12.
>> > > >>>>
>> > > >>>> ...
>> > > >>>> =3D=3D=3D> stand/userboot (install)
>> > > >>>> =3D=3D=3D> stand/userboot/test (install)
>> > > >>>> =3D=3D=3D> stand/userboot/userboot_4th (install)
>> > > >>>> install   -o root -g wheel -m 444   -S  userboot_4th.so
>> > > >>>> /jails/devel/ROOT/boot/
>> > > >>>> install  -o root -g wheel -m 444    userboot_4th.so.debug
>> > > >>>> /jails/devel/ROOT/usr/lib/debug/boot/
>> > > >>>> =3D=3D=3D> stand/userboot/userboot_lua (install)
>> > > >>>> install   -o root -g wheel -m 444   -S  userboot_lua.so
>> > > >>>> /jails/devel/ROOT/boot/
>> > > >>>> install  -o root -g wheel -m 444    userboot_lua.so.debug
>> > > >>>> /jails/devel/ROOT/usr/lib/debug/boot/
>> > > >>>> install -l h -o root -g wheel -m 444
>> > > >>>> /jails/devel/ROOT/boot/userboot_lua.so
>> > > >>>> /jails/devel/ROOT/boot/userboot.so
>> > > >>>> =3D=3D=3D> stand/i386 (install)
>> > > >>>> =3D=3D=3D> stand/i386/btx (install)
>> > > >>>> =3D=3D=3D> stand/i386/btx/btx (install)
>> > > >>>> =3D=3D=3D> stand/i386/btx/btxldr (install)
>> > > >>>> =3D=3D=3D> stand/i386/btx/lib (install)
>> > > >>>> =3D=3D=3D> stand/i386/libi386 (install)
>> > > >>>> =3D=3D=3D> stand/i386/mbr (install)
>> > > >>>> install   -o root -g wheel -m 444   mbr /jails/devel/ROOT/boot/=
mbr
>> > > >>>> =3D=3D=3D> stand/i386/pmbr (install)
>> > > >>>> install   -o root -g wheel -m 444   pmbr /jails/devel/ROOT/boot=
/pmbr
>> > > >>>> =3D=3D=3D> stand/i386/boot0 (install)
>> > > >>>> install   -o root -g wheel -m 444   boot0
>> > > >>>> /jails/devel/ROOT/boot/boot0
>> > > >>>> =3D=3D=3D> stand/i386/boot0sio (install)
>> > > >>>> install   -o root -g wheel -m 444   boot0
>> > > >>>> /jails/devel/ROOT/boot/boot0sio
>> > > >>>> =3D=3D=3D> stand/i386/boot2 (install)
>> > > >>>> objcopy -S -O binary boot1.out boot1
>> > > >>>> objcopy -S -O binary boot2.out boot2.bin
>> > > >>>> btxld -v -E 0x2000 -f bin -b
>> > > >>>>
>> > > /jails/devel/ROOT/usr/obj/jails/devel/ROOT/usr/src/amd64.amd64/stand=
/i386/btx/btx/btx
>> > > >>>> -l boot2.ldr  -o boot2.ld -P 1 boot2.bin
>> > > >>>> make[6]: exec(btxld) failed (No such file or directory)
>> > > >>>
>> > > >>> Does this happen every time, or only sometimes? Do you have the
>> > > >>> complete log? Why we're trying to run btxld and objcopy in the
>> > > >>> *INSTALL* phase is likely why (paths are different between the t=
wo)
>> > > >>>
>> > > >>> Warner
>> > > >>>
>> > > >>>> mail to "freebsd-stable-unsubscribe@freebsd.org"
>> > > >>
>> > > >> Everytime, not sure why I am trying to run btxld and objcopy in
>> > > >> install phase, I am simply running the command make installworld
>> > > >>
>> > > >> I do use env variables to change paths, as I install to a ZFS clo=
ne of
>> > > >> the original system dataset then change boot setting on pool and
>> > > >> reboot.
>> > > >>
>> > > >> Environment Variables used during build and install, been doing t=
his
>> > > >> process ever since I started using ZFS boot on FreeBSD 9.2.
>> > > >>
>> > > >> setenv MAKEOBJDIRPREFIX /jails/devel/ROOT/usr/obj
>> > > >> setenv DESTDIR /jails/devel/ROOT
>> > > >> setenv __MAKE_CONF /jails/devel/ROOT/etc/make.conf
>> > > >> setenv SRCCONF /jails/devel/ROOT/etc/src.conf
>> > > >
>> > > > I had already started a new build specifying CPUTYPE=3Dsilvermont =
in
>> > > > make.conf, as attempt work around. It failed as well. I did check =
and
>> > > > the path above exists on the system
>> > > >
>> > > >
>> > > :/jails/devel/ROOT/usr/obj/jails/devel/ROOT/usr/src/amd64.amd64/stan=
d/i386/btx/btx
>> > > > # ll
>> > > > total 10
>> > > > -rw-r--r--  1 root  wheel   117B Feb 22 10:13 .depend.btx.o
>> > > > -rwxr-xr-x  1 root  wheel   1.7K Feb 22 10:37 btx*
>> > > > -rw-r--r--  1 root  wheel   5.4K Feb 22 10:13 btx.o
>> > > > drwxr-xr-x  2 root  wheel     4B Feb 22 10:13 include/
>> > > >
>> > > > I have removed my CPU Type specification and will run a new make a=
nd
>> > > > install capturing full logs so that I can post a link to full logs=
.
>> > >
>> > > I did a new build and capture output from full buildworld and
>> > > installworld, but first I cleared ccache same error was a result.
>> > >
>> > > Here is the entire output along with my make.conf and src.conf files=
.
>> > > https://nextcloud.dweimer.net/index.php/s/YYx6WX7KieatM9L
>> > >
>> > >
>> > > --
>> > > Thanks,
>> > >     Dean E. Weimer
>> > >     http://www.dweimer.net/
>> > >
>> > _______________________________________________
>> > freebsd-stable@freebsd.org mailing list
>> > https://lists.freebsd.org/mailman/listinfo/freebsd-stable
>> > To unsubscribe, send any mail to "freebsd-stable-unsubscribe@freebsd.o=
rg"



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CACNAnaF6_vXKEk-auxr_zvu=q6ywvY=ndhWkg0VyW66GGAc4pw>