From nobody Sun Aug 06 15:58:32 2023 X-Original-To: freebsd-current@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RJkdW05pVz4TwZx for ; Sun, 6 Aug 2023 15:58:39 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-ed1-x533.google.com (mail-ed1-x533.google.com [IPv6:2a00:1450:4864:20::533]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RJkdV2Sc8z3QG6 for ; Sun, 6 Aug 2023 15:58:38 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-ed1-x533.google.com with SMTP id 4fb4d7f45d1cf-52307552b03so5214323a12.0 for ; Sun, 06 Aug 2023 08:58:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20221208.gappssmtp.com; s=20221208; t=1691337517; x=1691942317; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :from:to:cc:subject:date:message-id:reply-to; bh=wOXfSfjpuVD8GABy0QoBuI265+uS3sgd+sFp7wANHH8=; b=nUBh8vS8BWCjtsaJQal9tFRAbzTg4RO4jBl/9TqwXkWo33JVAyPy/bePH5LovrmZie hZDwShCZGjbQ1D8lIXMXHK/M022l1R7EuUON6vGNla9NHG1Ji2FRQLvbs3Ew5iPBYXb1 qszueyYCDq/JVtv7M0siki0U5TypQSqpI0KgHICZ39hriN5ivi5d6YnfWNo7937aWKOe jTk+E7vOWmKWvK4i0xSdtmM0+mjl7VOWDHx0wo7wzQJ8eKTMrZd2KwExwpsxyxIGXo6V NvIseCX051JN+yhW21MmTX2dJLpjinX6f4IjNSXqkcsp7U9H6uw16WVUsfLub6C+RrJH foVw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1691337517; x=1691942317; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=wOXfSfjpuVD8GABy0QoBuI265+uS3sgd+sFp7wANHH8=; b=IuWTv7Bcnwmesb2Wc8uoq3NAi7ZdihLm5NMQluekexQgFULLNkdnIcSV/r12lGjZ0X /+mP3Ei+s4IlpQkIrW6r8CLxOqHVsTU4e3MEW6ziY8DBOdBZjQt0dSMcyjT4UsOqnk4O Z2VbYdGf356r6IfUDrZQY+NyeIMQBX7meD+KOXWqZT6zdF+LwpwD7ymX0eKTCi+hhHla vG99NXJDh09T5O5sXC/2lIi2oYI86wl6H3CKrXG+fJqI1bKi+EoWcVR9c8D5hfBPH1Ea 39UwnuSMsp9Lr2EehdtoJI49OLUKA33Zu0f3kV8sHHMNlrB4Q8uFdctdr/zSp5eX0KEF RnKg== X-Gm-Message-State: AOJu0YwoSEQpdYLJpjC84yNXVe4l1csCmR4ALgeOiXr7Z3zjepgS8gUY BDI3oDfkhVa7nD2GHoWnjEB5BX2q7wWj8LZRcGq8UFXY1FBLmN0LKMU= X-Google-Smtp-Source: AGHT+IG2t9h+MXPWDz6fbT7kWuu3eOSaSk2jTXl69sGvlopOjBybDqZ34k25yEaqvMEPQBUMyFyYcekhou07csy2+48= X-Received: by 2002:aa7:c943:0:b0:522:b929:9f01 with SMTP id h3-20020aa7c943000000b00522b9299f01mr6059959edt.9.1691337516934; Sun, 06 Aug 2023 08:58:36 -0700 (PDT) List-Id: Discussions about the use of FreeBSD-current List-Archive: https://lists.freebsd.org/archives/freebsd-current List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-current@freebsd.org MIME-Version: 1.0 References: In-Reply-To: From: Warner Losh Date: Sun, 6 Aug 2023 09:58:32 -0600 Message-ID: Subject: Re: make buildworld puts legacy tools into the /usr/obj/... tree To: Matthias Apitz , freebsd-current@freebsd.org Content-Type: multipart/alternative; boundary="000000000000e481f7060243335d" X-Rspamd-Queue-Id: 4RJkdV2Sc8z3QG6 X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US] --000000000000e481f7060243335d Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Sun, Aug 6, 2023 at 7:58=E2=80=AFAM Matthias Apitz wr= ote: > > I did, based of a git clone of head, a clean compile of world and kernel > with > > # cd /usr > # rm -rf obj > # mkdir obj > # cd src > # make -j8 buildworld > # make -j8 buildkernel > ... > I installed the result and the system runs fine. For some test I wanted > to do another installation to some DESTDIR with > > # make installworld DESTDIR=3D/home/... > > This failed with: > > --- installworld --- > mkdir -p /tmp/install.j76anzU56j > > ... > Required library libdialog.so.8 not found. > *** [installworld] Error code 1 > > make[1]: stopped in /usr/src > > Investigating the problem it turned out that the 'make buildworld' puts > a lot of legacy binaries in to some directory: > > # ls -l /usr/obj/usr/src/amd64.amd64/tmp/legacy/bin > total 36976 > -r-xr-xr-x 1 root wheel 13304 Nov 30 2020 [ > lrwxr-xr-x 1 root wheel 54 Aug 5 13:05 apropos -> > /usr/obj/usr/src/amd64.amd64/tmp/legacy/usr/bin/mandoc > -rwxr-xr-x 1 root wheel 1008512 Aug 5 13:05 asn1_compile > -r-xr-xr-x 1 root wheel 217504 Nov 30 2020 awk > -r-xr-xr-x 1 root wheel 9576 Nov 30 2020 basename > -r-xr-xr-x 1 root wheel 195712 Nov 30 2020 bmake > -r-xr-xr-x 1 root wheel 33848 Nov 30 2020 bunzip2 > ... > They are all from the system before updating it (from Nov 30 2020) and > of course are missing shared libs when they get called in the actual > system, for example > > # ldd /usr/obj/usr/src/amd64.amd64/tmp/legacy/bin/tzsetup > /usr/obj/usr/src/amd64.amd64/tmp/legacy/bin/tzsetup: > libdialog.so.8 =3D> not found (0) > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ > libncursesw.so.9 =3D> /lib/libncursesw.so.9 (0xf283d7b4000) > libc.so.7 =3D> /lib/libc.so.7 (0xf283e729000) > libtinfow.so.9 =3D> /lib/libtinfow.so.9 (0xf283c93d000) > [vdso] (0xf283c4a4000) > > # which tzsetup > /usr/sbin/tzsetup > # ldd /usr/sbin/tzsetup > /usr/sbin/tzsetup: > libprivatebsddialog.so.0 =3D> /usr/lib/libprivatebsddialog.so.0 > (0x1797fe45c000) > libc.so.7 =3D> /lib/libc.so.7 (0x1797fec89000) > libncursesw.so.9 =3D> /lib/libncursesw.so.9 (0x1798011df000) > libtinfow.so.9 =3D> /lib/libtinfow.so.9 (0x17980043d000) > libformw.so.6 =3D> /usr/lib/libformw.so.6 (0x17980164c000) > [vdso] (0x1797fe2d9000) > > Why is this with the tools in /usr/obj/usr/src/amd64.amd64/tmp/legacy/bin= ? > Or what I have done wrong or overlooked? > So, the build process builds tools that are used to make and install FreeBSD. That's what legacy is about: providing a compatible way to do all this. We setup env vars, etc, so that these tools pull their libraries from legacy as well so that we have a consistent set of binaries to run on while the rest of the world is being replaced. I'm surprised to see this failing, since it's what nanobsd does all the time, and I build new systems with nanobsd every week based on recent current trees. Is there a libdalog.so.8 in your tmp/legacy tree at all? Warner --000000000000e481f7060243335d Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


=
On Sun, Aug 6, 2023 at 7:58=E2=80=AFA= M Matthias Apitz <guru@unixarea.de> wrote:
I did, based of a git clone of head, a clean compile of world and kernel with

# cd /usr
# rm -rf obj
# mkdir obj
# cd src
# make -j8 buildworld
# make -j8 buildkernel
...
I installed the result and the system runs fine. For some test I wanted
to do another installation to some DESTDIR with

# make installworld DESTDIR=3D/home/...

This failed with:

--- installworld ---
mkdir -p /tmp/install.j76anzU56j

...
Required library libdialog.so.8 not found.
*** [installworld] Error code 1

make[1]: stopped in /usr/src

Investigating the problem it turned out that the 'make buildworld' = puts
a lot of legacy binaries in to some directory:

# ls -l /usr/obj/usr/src/amd64.amd64/tmp/legacy/bin
total 36976
-r-xr-xr-x=C2=A0 1 root wheel=C2=A0 =C2=A013304 Nov 30=C2=A0 2020 [
lrwxr-xr-x=C2=A0 1 root wheel=C2=A0 =C2=A0 =C2=A0 54 Aug=C2=A0 5 13:05 apro= pos -> /usr/obj/usr/src/amd64.amd64/tmp/legacy/usr/bin/mandoc
-rwxr-xr-x=C2=A0 1 root wheel 1008512 Aug=C2=A0 5 13:05 asn1_compile
-r-xr-xr-x=C2=A0 1 root wheel=C2=A0 217504 Nov 30=C2=A0 2020 awk
-r-xr-xr-x=C2=A0 1 root wheel=C2=A0 =C2=A0 9576 Nov 30=C2=A0 2020 basename<= br> -r-xr-xr-x=C2=A0 1 root wheel=C2=A0 195712 Nov 30=C2=A0 2020 bmake
-r-xr-xr-x=C2=A0 1 root wheel=C2=A0 =C2=A033848 Nov 30=C2=A0 2020 bunzip2 ...
They are all from the system before updating it (from Nov 30 2020) and
of course are missing shared libs when they get called in the actual
system, for example

# ldd /usr/obj/usr/src/amd64.amd64/tmp/legacy/bin/tzsetup
/usr/obj/usr/src/amd64.amd64/tmp/legacy/bin/tzsetup:
=C2=A0 =C2=A0 =C2=A0 =C2=A0 libdialog.so.8 =3D> not found (0)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
=C2=A0 =C2=A0 =C2=A0 =C2=A0 libncursesw.so.9 =3D> /lib/libncursesw.so.9 = (0xf283d7b4000)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 libc.so.7 =3D> /lib/libc.so.7 (0xf283e729000= )
=C2=A0 =C2=A0 =C2=A0 =C2=A0 libtinfow.so.9 =3D> /lib/libtinfow.so.9 (0xf= 283c93d000)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 [vdso] (0xf283c4a4000)

# which tzsetup
/usr/sbin/tzsetup
# ldd /usr/sbin/tzsetup
/usr/sbin/tzsetup:
=C2=A0 =C2=A0 =C2=A0 =C2=A0 libprivatebsddialog.so.0 =3D> /usr/lib/libpr= ivatebsddialog.so.0 (0x1797fe45c000)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 libc.so.7 =3D> /lib/libc.so.7 (0x1797fec8900= 0)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 libncursesw.so.9 =3D> /lib/libncursesw.so.9 = (0x1798011df000)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 libtinfow.so.9 =3D> /lib/libtinfow.so.9 (0x1= 7980043d000)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 libformw.so.6 =3D> /usr/lib/libformw.so.6 (0= x17980164c000)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 [vdso] (0x1797fe2d9000)

Why is this with the tools in /usr/obj/usr/src/amd64.amd64/tmp/legacy/bin ?=
Or what I have done wrong or overlooked?

So, the build process builds tools that are used to make and install Free= BSD.


--000000000000e481f7060243335d--