From nobody Wed Nov 08 23:34:04 2023 X-Original-To: freebsd-hackers@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 4SQhHm3Mrxz50qp6 for ; Wed, 8 Nov 2023 23:34:12 +0000 (UTC) (envelope-from brooks@spindle.one-eyed-alien.net) Received: from spindle.one-eyed-alien.net (spindle.one-eyed-alien.net [199.48.129.229]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4SQhHm1NVmz4t6V for ; Wed, 8 Nov 2023 23:34:12 +0000 (UTC) (envelope-from brooks@spindle.one-eyed-alien.net) Authentication-Results: mx1.freebsd.org; none Received: by spindle.one-eyed-alien.net (Postfix, from userid 3001) id E1A5C3C019A; Wed, 8 Nov 2023 23:34:04 +0000 (UTC) Date: Wed, 8 Nov 2023 23:34:04 +0000 From: Brooks Davis To: "Colin S. Gordon" Cc: freebsd-hackers@freebsd.org Subject: Re: Help cross-building kernel from macos Message-ID: References: <8f128d21-4b61-41cc-be00-3d9b48879f98@FreeBSD.org> <6cfecbe9-4fae-43e4-8ab2-d822f1d17e20@app.fastmail.com> List-Id: Technical discussions relating to FreeBSD List-Archive: https://lists.freebsd.org/archives/freebsd-hackers List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-hackers@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <6cfecbe9-4fae-43e4-8ab2-d822f1d17e20@app.fastmail.com> 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:36236, ipnet:199.48.128.0/22, country:US] X-Rspamd-Queue-Id: 4SQhHm1NVmz4t6V On Wed, Nov 08, 2023 at 06:05:21PM -0500, Colin S. Gordon wrote: > On Wed, Nov 8, 2023, at 16:13, Kyle Evans wrote: > > On 11/8/23 13:54, Colin S. Gordon wrote: > > > [... snip ...] > > > > Just a couple of missing dependencies; this seems to do it for me [0], > > could probably still use a bit of cleanup. > > > > diff --git a/Makefile.inc1 b/Makefile.inc1 > > index c1c0b56ef..d9a772a00 100644 > > --- a/Makefile.inc1 > > +++ b/Makefile.inc1 > > @@ -2442,6 +2442,9 @@ _gensnmptree= usr.sbin/bsnmpd/gensnmptree > > _clang_tblgen= \ > > lib/clang/libllvmminimal \ > > usr.bin/clang/llvm-tblgen > > +.if ${BOOTSTRAPPING} < 1300030 > > +${_bt}-usr.bin/clang/llvm-tblgen: ${_bt}-lib/libzstd > > +.endif > > .if ${MK_CLANG_BOOTSTRAP} != "no" || ${MK_CLANG} != "no" || \ > > ${MK_LLDB} != "no" > > _clang_tblgen+= lib/clang/libclangminimal > > @@ -2475,6 +2478,7 @@ _kerberos5_bootstrap_tools= \ > > kerberos5/tools/slc \ > > usr.bin/compile_et > > > > +${_bt}-kerberos5/lib/libroken: ${_bt}-lib/libcrypt > > .ORDER: ${_kerberos5_bootstrap_tools:C/^/${_bt}-/g} > > .for _tool in ${_kerberos5_bootstrap_tools} > > ${_bt}-${_tool}: ${_bt}-usr.bin/yacc ${_bt_lex_depend} > > > > [0] https://termbin.com/oszy > > > > Thanks! This seems to work for me for kernel-toolchain, then switching to a newer LLVM works around a RISC-V-specific failure in buildkernel, and it works! I'm still curious why the CI environment (and presumably others) don't need this patch; clearly there's some other divergence between the CI environment and my machine (and apparently Kyle's, too). The way jobs get scheduled if you use -jN (N>1) seems to cause libztsd to be built in time. The Cirrus-CI job uses -j8. I can reliably trigger the bug on my mac with no -j argument or -j1, but with -j1.2 it builds fine. -- Brooks