From owner-freebsd-hackers@freebsd.org Sat Mar 13 09:40:24 2021 Return-Path: Delivered-To: freebsd-hackers@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id AAB1D5706D7 for ; Sat, 13 Mar 2021 09:40:24 +0000 (UTC) (envelope-from marklmi@yahoo.com) Received: from sonic306-19.consmr.mail.gq1.yahoo.com (sonic306-19.consmr.mail.gq1.yahoo.com [98.137.68.82]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4DyHjN2z98z4d62 for ; Sat, 13 Mar 2021 09:40:24 +0000 (UTC) (envelope-from marklmi@yahoo.com) X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1615628422; bh=5fxU0yDpjTWIRtxrRH3m7UtwAZsmTOs1+A101Oj6j0r=; h=X-Sonic-MF:Subject:From:Date:To:From:Subject; b=capUrXd6DoM6bajvUNehFw15KeJZsVJ8NSu0+vfVpwAyPIN52m3W1PllubXUH+Z6a9JVYXUCq4IGpjcyKCmUH25AEwpK/43jQ+PoCjA05N10komJbU6x+EIjtpliZEFUlYMzB3NvHaeSFIyeEl5hpLBh6Rch8RG5N8n/C0ishrsiCMfPs4/FJDOZliewJiGuOShSxz/tipvvW1QMIKabAhtoEZo2n6w0UvvpETI1Xm7pHvrw7wC7Xhjw9lC9vKplCgVYfoeVJCGem+agDUfoxJKbB5G9KGeZKzor6sM5c/5cfML/1GHSorkBhGzuu5BO26MAJNKeDZdyIzTrXHpsTw== X-YMail-OSG: wXaONEgVM1lMmeDODrll8Mm9dpNJYKP1PKstKF3zEZqOx5CRLlOkJRvuUmo57kR 7Wul_tCmGuz09fnl.aKVuFRdR0AycUpW0tY9xcnsMYLUuECHKenp8p7CjxFKYsmOgxmBluPvGWRu nN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c0XgoxGGbKRwGQ0plKey4jzyD1fiDwSsW1mInu6PJrdL4_th8U2qhxwA e2U7k3baNtWNzeOTuJ.RH6oqMkvsEiPYlecHQ9LI.taA4o3KRmuOpz37gsoCf0XvIX0.Qa.kZLnQ R87Q5m1cgP2lJvE2h19yi4JmC6GX_jiw4LRSmB4oF5R1Zbnd7JGUO4D1iLy5B4t0Zq7HkgcthfrU cvGdkt0j7hAQoZceE.KOGTKJ.xfqG2B_gBKiIoorwvFXLSPQpnF9BzxUTiTLcT7yLT_ZwlZ7Gbi_ TMEFvIqvKLijFmg8TCbDLIW8v2I0- X-Sonic-MF: Received: from sonic.gate.mail.ne1.yahoo.com by sonic306.consmr.mail.gq1.yahoo.com with HTTP; Sat, 13 Mar 2021 09:40:22 +0000 Received: by kubenode575.mail-prod1.omega.gq1.yahoo.com (VZM Hermes SMTP Server) with ESMTPA ID 99dacff56c30ca1f51462aed16d9519b; Sat, 13 Mar 2021 09:40:18 +0000 (UTC) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.60.0.2.21\)) Subject: Re: problems building a release From: Mark Millard In-Reply-To: Date: Sat, 13 Mar 2021 01:40:17 -0800 Cc: freebsd-hackers Content-Transfer-Encoding: quoted-printable Message-Id: <8CE18E0A-8931-4C41-83B4-D30EEC049E6D@yahoo.com> References: To: Don Lewis X-Mailer: Apple Mail (2.3654.60.0.2.21) X-Rspamd-Queue-Id: 4DyHjN2z98z4d62 X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Technical discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Mar 2021 09:40:24 -0000 On 2021-Mar-13, at 00:11, Don Lewis wrote: > On 10 Mar, Mark Millard wrote: >> On 2021-Mar-10, at 15:00, Don Lewis wrote: >>=20 >>> I'm trying to build a customized 13.0 i386 release on a amd64 host >>> running FreeBSD 14.0-CURRENT #89 n245058-1ca8842f3ad9. The source = tree >>> is branch releng/13.0 from last night. The release build gets most = of >>> the way through, but fails with: >>>=20 >>> =3D=3D=3D> usr.bin/svn/lib/libsvn_wc (installconfig) >>> --- installconfig_subdir_usr.sbin --- >>> --- installconfig_subdir_usr.sbin/pkg --- >>> --- installdirs-CONFSDIR --- >>> --- _CONFSINS_FreeBSD.conf.quarterly --- >>> --- installdirs-CONFSDIR --- >>> installing DIRS CONFSDIR >>> install -N /scratch/usr/src/etc -d -m 0755 -o root -g wheel = /scratch/etc/pkg >>> --- _CONFSINS_FreeBSD.conf.quarterly --- >>> install -N /scratch/usr/src/etc -C -o root -g wheel -m 644 = /scratch/usr/src/usr.sbin/pkg/FreeBSD.conf.quarterly = /scratch/etc/pkg/FreeBSD.conf >>> Shared object "libedit.so.8" not found, required by "sh" >>>=20 >>> /scratch/bin/sh seems to work, though it is using the host library: >>> # ldd /scratch/bin/sh >>> /scratch/bin/sh: >>> libedit.so.8 =3D> /usr/lib32/libedit.so.8 (0x20463000) >>> libc.so.7 =3D> /usr/lib32/libc.so.7 (0x20495000) >>> libncursesw.so.9 =3D> /usr/lib32/libncursesw.so.9 (0x20683000) >>> # /scratch/bin/sh >>> #=20 >>>=20 >>> The library is present in /scratch/lib: >>> # file /scratch/lib/libedit.so.8 >>> /scratch/lib/libedit.so.8: ELF 32-bit LSB shared object, Intel = 80386, version 1 (FreeBSD), dynamically linked, for FreeBSD 13.0 = (1300139), stripped >>>=20 >>> Unfortunately the build isn't verbose enough to give me any hints = about >>> where the problem might be. I've been able to build FreeBSD 11.x = and >>> 12.x releases this way, but no luck so far with 13. >>>=20 >>> Update: I am able to build an amd64 release, so the problem has >>> something to do with crossbuilds. There are some other problems = that >>> crop up, though. >>>=20 >>>=20 >>> =3D=3D=3D> usr.bin/svn/lib/libsvn_wc (installconfig) >>> --- installconfig_subdir_usr.sbin --- >>> --- installconfig_subdir_usr.sbin/pkg --- >>> --- installdirs-CONFSDIR --- >>> --- _CONFSINS_FreeBSD.conf.quarterly --- >>> --- installdirs-CONFSDIR --- >>> installing DIRS CONFSDIR >>> install -N /scratch/usr/src/etc -d -m 0755 -o root -g wheel = /scratch/etc/pkg >>> --- _CONFSINS_FreeBSD.conf.quarterly --- >>> install -N /scratch/usr/src/etc -C -o root -g wheel -m 644 = /scratch/usr/src/usr.sbin/pkg/FreeBSD.conf.quarterly = /scratch/etc/pkg/FreeBSD.conf >>> ELF ldconfig path: /lib /usr/lib /usr/lib/compat /usr/local/lib = /usr/local/lib/perl5/5.20/mach/CORE >>> 32-bit compatibility ldconfig path: /usr/lib32 >>> pkg: Warning: Major OS version upgrade detected. Running = "pkg-static install -f pkg" recommended >>> Updating FreeBSD repository catalogue... >>> Fetching meta.txz: 100% 916 B 0.9kB/s 00:01 =20 >>> pkg: repository meta /var/db/pkg/FreeBSD.meta has wrong version 2 >>> repository FreeBSD has no meta file, using default settings >>> Fetching packagesite.txz: 100% 6 MiB 1.6MB/s 00:04 =20 >>> pkg: repository meta /var/db/pkg/FreeBSD.meta has wrong version 2 >>> Unable to open created repository FreeBSD >>> Unable to update repository FreeBSD >>> All repositories are up-to-date. >>> pkg: repository meta /var/db/pkg/FreeBSD.meta has wrong version 2 >>> pkg: Repository FreeBSD cannot be opened. 'pkg update' required >>> Updating database digests format: 100% >>> pkg: No packages available to install matching 'devel/git' have been = found in the repositories >>=20 >>=20 >> To my knowledge FreeBSD does not support 14 directly >> building 13 or before: self hosted and sufficiently >> recent older building newer only, as far as direct >> builds go. >=20 > That doesn't seem to be the problem that I'm running into. I run into = a > similar problem when trying to build a 14-CURRENT release. The cause = of > the problem seems to be that I'm specifying TARGET=3Di386 and = TARGET_ARCH=3Di386 > in both release.conf, and the make.conf that release.conf points to. > With 14-CURRENT the failure mode is that something can't find = ld-elf.so > and aborts. That happens a number of times during the release build, > but this time the release build appears to run to completion. If I > remove the make.conf settings, then the error goes away. The reason > that I did this in the first place was so I could set TARGET_CPUTYPE. > This setting appears to be ignored in release.conf. If I set it in > make.conf without setting TARGET=3Di386 and TARGET_ARCH=3Di386, then I = get a > compiler error because the CPUTYPE is not valid on amd64. Basically, > the difference is that with the settings in both places, I get an i386 > chroot under /scratch and with the settings different, the chroot is > amd64. I thing the failure is being caused when something tries to = run > an amd64 executable in under the i386 chroot. Verbosity is too low to > see what it is. >=20 > Another complication is that I want to maintain the target system with > freebsd-update, so I need to package up my customized make.conf and > src.conf into the release so they get used by the update builder. It > should be easy to tweak the release script to do this, but it gets > complicated if the the make.conf files have different TARGET settings. >=20 You are definitely working outside my direct experience. But I'll note that release/release.conf.sample and the man page have all of the following, not that I understand the various implications of use: ## Set to override the default target architecture. #TARGET=3D"amd64" #TARGET_ARCH=3D"amd64" #KERNEL=3D"GENERIC" ## Multiple kernels may be set. #KERNEL=3D"GENERIC XENHVM" . . . ## Set to pass additional flags to make(1) for the build chroot setup, = such ## as TARGET/TARGET_ARCH. #CHROOT_MAKEENV=3D Also described via: CHROOT_MAKEENV Additional make(1) arguments to pass through, which directly affect the tuning of the build chroot. TARGET and TARGET_ARCH are also listed as controllable via the ENVIRONMENT : TARGET The target hardware platform. This is analogous = to the =E2=80=9Cuname -m=E2=80=9D output. This is = necessary to cross-build some target architectures. For example, = cross-building for ARM64 machines requires TARGET_ARCH=3Daarch64 = and TARGET=3Darm64. If not set, TARGET defaults to = the current hardware platform. TARGET_ARCH The target machine processor architecture. This = is analogous to the =E2=80=9Cuname -p=E2=80=9D = output. Set this to cross- build for a different architecture. If not set, TARGET_ARCH defaults to the current machine architecture, unless TARGET is also set, in which = case it defaults to the appropriate value for that = platform. Typically, one only needs to set TARGET. A possibility would seem to be use of: ## Set to the hardware platform of the target userland. This value ## is passed to make(1) to set the TARGET (value of uname -m) to cross ## build. #EMBEDDED_TARGET=3D ## Set to the machine processor architecture of the target userland. ## This value is passed to make(1) to set the TARGET_ARCH (value of = uname -p) ## to cross build. #EMBEDDED_TARGET_ARCH=3D May be EMBEDDEDBUILD=3D with an empty or nonexistent EMBEDDEDPORTS might happen to do somethings useful for your context? (Implication of WITH_DVD being unset when EMBEDDEDBUILD=3D is in use. Implicit EMBEDDEDPORTS such as devel/subversion ?) A different direction is to have release use a pre-existing build (separately built beforehand). As I vaguely remember, this involved: ## Set to skip the chroot environment = buildworld/installworld/distribution ## step if it is expected the build environment will exist via alternate ## means. #CHROOTBUILD_SKIP=3D Also described via: CHROOTBUILD_SKIP If defined, the buildworld, installworld, and distribution stages of the chroot(8) build = environment setup are skipped. This is intended solely for = cases where the chroot(8) userland are provided by = alternate means. There are also: ## Redefine environment variables here to override prototypes ## defined in release.sh. #load_chroot_env() { } #load_target_env() { } #buildenv_setup() { } =3D=3D=3D Mark Millard marklmi at yahoo.com ( dsl-only.net went away in early 2018-Mar)