From nobody Sat Oct 04 12:42:43 2025 X-Original-To: dev-commits-src-main@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 4cf4v13Zmjz6BX0w for ; Sat, 04 Oct 2025 12:42:53 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: from mail-qt1-x835.google.com (mail-qt1-x835.google.com [IPv6:2607:f8b0:4864:20::835]) (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 "WR4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cf4v119Brz3lM1 for ; Sat, 04 Oct 2025 12:42:53 +0000 (UTC) (envelope-from markjdb@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-qt1-x835.google.com with SMTP id d75a77b69052e-4dfbab4fb0dso41661701cf.3 for ; Sat, 04 Oct 2025 05:42:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1759581767; x=1760186567; darn=freebsd.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:sender:from:to:cc:subject:date:message-id :reply-to; bh=ES8JBDfBfeU6dxudtUPShvPnmvvHlFfYPWIFVSCN+fI=; b=XukWyZlnQEvCWGce5y1sKrLo2K/x7+Hg1gvb2PFrvqPnsC36kZOR483wgGcauoU/7d ZeCidX/DL10Uofvec+MNjbVReSwL8hThwWGE4oTRBFm/McTnIYBhG8K8u52DjA8oFMxA 1OyHw/DvwDEXQcG2ZhWIupg1ViP/kqyKCXXiQpx1VFIGHTVnEBtyunWkj/44TU6Y5Vxv 9SDRJbRGkdmhNR2JprZK5hMa3BQr0hibFPjZvCxQDNxvAY6EqVj3Oir0AgSURWFd6MsQ O2JHw539rqKW+KSPk53QVXuSZsX9OBiuXxN3NBYLzZFMyoNo9KODgYVr/RvfwOvTcTVr khng== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1759581767; x=1760186567; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:sender:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=ES8JBDfBfeU6dxudtUPShvPnmvvHlFfYPWIFVSCN+fI=; b=M6I87wwV7dMEszfEpWpPqiDpVLvEe4t0kkcTw5hj3JiA5iwgNZ4jFDYCuWkPP6LUAm VTt7Ct3V2QC3GEvYO5Z6Eh0um2YPnCWTy1Jq/NSsIDEiOjdQuKjIPZRBCcrdG77PKRby tf7JMtIPNx726pQw+/FWSVGUoW5EVJZiFues4jpm5DTjjqQPzkdeyTRsJAKu3FlhPcku fkpqTQtM/by6HZzmB+nDL8OgnVWM63n7QmnroY9/YJcyVBwGUcZ+GwHThyG9SUeor1l4 zK1EXa80wwpar6naBXNi0GDeGDoCPqF/0jYn1aI+EmA7i1sFW9dzO06+xJ2wrUno3xfs 3xDw== X-Forwarded-Encrypted: i=1; AJvYcCX2l5hIgeHhSDXij1mzPzD8SNXLgTJnC+zD9IJ5COjaRSqKwlDLiXufzjsuPKpY2c0vI/gXKB2oLWcCJbPsdNM8DF3YZQ==@freebsd.org X-Gm-Message-State: AOJu0YxSx7AYGWjBc1US9qy6MjqvhIpvgf7ZQJjmIr/9KMM8lgHWpYOk rGXV03McIXzvtOXLuArmd6MS1sRfjvVXAQOWmMo0j80oEcbT1PIr1djnTRZccyfj X-Gm-Gg: ASbGncuL3eDfQhAQvrtfWLM4roeCSK1jcSr3v96okK5GRqJTS4wDCiTdfYIlsX3H/yU C0iuqD2T9nPLF9Eiw8IB7LMYadj0y7Hoh3qsp8P/GiaeV/MFJWU6wiPFZQvOKv597TeGznftsJn 66cBvsDlFd7vk5NwEbRaWUdnhe+mhh58+mucURO6Gs8ss9xKUEridB3gqV+XIyTxRkXUp4gXU1/ pTKEZzydX/8192G3ioL4SZcpm8MzaXFAsG1uQYB/Bu7EKqCwhT6aQ+0U+6HwS/N25yN4QOBLmUn Ml2qxfqt0U+e5/P48MjSSBEGSRAL9WKkHyEF+stSl1I1iYkRXwVF/BCRX/TWS23p5Wh36eHOSps 5mbz9F5D63TNYZU6xjvppjMYebNF2xX8qoiSsQicesKQUZ25CkqieF6bEj9kqwD0Gq7WNBF8= X-Google-Smtp-Source: AGHT+IGnbtQiNr3BdH8q7u56w67V1Msl7zyHYLFkJAQ0kmswA9LhLPuK+tjgwTgJr8ZjfozD8B+gVA== X-Received: by 2002:a05:622a:4e:b0:4d9:5a18:3f64 with SMTP id d75a77b69052e-4e576b1681fmr73854081cf.80.1759581767311; Sat, 04 Oct 2025 05:42:47 -0700 (PDT) Received: from nuc (192-0-220-237.cpe.teksavvy.com. [192.0.220.237]) by smtp.gmail.com with ESMTPSA id d75a77b69052e-4e55cfd463bsm63826611cf.33.2025.10.04.05.42.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 04 Oct 2025 05:42:46 -0700 (PDT) Date: Sat, 4 Oct 2025 08:42:43 -0400 From: Mark Johnston To: Kyle Evans Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: 1953a12ee2cd - main - flua: support our flua modules in the bootstrap flua Message-ID: References: <202510031810.593IAZE9008541@gitrepo.freebsd.org> <27098bd2-04e8-4ef7-8b8e-f7b170eb8151@FreeBSD.org> List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Rspamd-Queue-Id: 4cf4v119Brz3lM1 On Fri, Oct 03, 2025 at 07:57:31PM -0500, Kyle Evans wrote: > On 10/3/25 17:45, Mark Johnston wrote: > > On Fri, Oct 03, 2025 at 04:44:38PM -0500, Kyle Evans wrote: > > > On 10/3/25 16:39, Mark Johnston wrote: > > > > On Fri, Oct 03, 2025 at 06:10:35PM +0000, Kyle Evans wrote: > > > > > The branch main has been updated by kevans: > > > > > > > > > > URL: https://cgit.FreeBSD.org/src/commit/?id=1953a12ee2cde1afacb3e3f7612d89695c96e04f > > > > > > > > > > commit 1953a12ee2cde1afacb3e3f7612d89695c96e04f > > > > > Author: Kyle Evans > > > > > AuthorDate: 2025-10-03 18:09:03 +0000 > > > > > Commit: Kyle Evans > > > > > CommitDate: 2025-10-03 18:09:14 +0000 > > > > > > > > > > flua: support our flua modules in the bootstrap flua > > > > > This version builds every module into the flua binary itself, since all > > > > > of the bootstrap tools are built -DNO_SHARED. As a result, we also > > > > > cannot dlsym(), so we can't really discover the names of our newly > > > > > builtin modules. Instead, just build out a linker set with all of our > > > > > luaopen_*() functions to register everything up-front. > > > > > Building in all of the modules isn't strictly necessary, but it means > > > > > that we have an example of how to add a bootstrap module everywhere you > > > > > go and one doesn't need to consider whether bootstrap flua can use a > > > > > module when writing scripts. On my build machine, the consequence on > > > > > our binary size is an increase from around 1.6M -> 1.9M, which isn't > > > > > really that bad. > > > > > .lua modules can install into their usual path below $WORLDTMP/legacy > > > > > and we'll pick them up automagically by way of the ctor that sets up > > > > > LUA_PATH early on. > > > > > Reviewed by: bapt, emaste > > > > > Differential Revision: https://reviews.freebsd.org/D51890 > > > > > > > > This breaks cross-building from other OSes since linker.h and kenv.h > > > > aren't available. I guess we can safely exclude those from the > > > > bootstrap build? It could be done conditionally on ${.MAKE.OS} perhaps, > > > > but it's probably better to be consistent. > > > > > > Hi, > > > > > > Hmm, yes- I think excluding libfreebsd and libjail doesn't make it much more > > > difficult to reason about what's available in the bootstrap flua. > > > > > > re: cross-builds, yikes- I forgot that we'll end up bootstrapping flua there. I > > > bet it's also broken without libyaml and libucl here: https://reviews.freebsd.org/D52894? > > > > I don't see any bootstrap build failures in an Ubuntu chroot after I > > disable building libfreebsd. Let me know if you'd like me to submit a > > patch for that. > > I backed all of it out for the time being, because testing with the github jobs pointed out > something funky[0] with the for mach-o, and I don't want to stand in the > way of breaking cross-builds for this at the moment. Thanks! On the latest main I do see some test failures from nuageinit, which I presume are fallout from the changes. For instance: Standard output: Executing command [ /usr/libexec/flua /usr/tests/libexec/nuageinit/addfile.lua ] Standard error: Fail: incorrect exit status: 1, expected: 0 stdout: stderr: /usr/libexec/flua: /usr/share/flua/nuage.lua:7: module 'posix.unistd' not found: no field package.preload['posix.unistd'] no file '/usr/share/flua/posix/unistd.lua' no file '/usr/share/flua/posix/unistd/init.lua' no file '/usr/lib/flua/posix/unistd.lua' no file '/usr/lib/flua/posix/unistd/init.lua' no file './posix/unistd.lua' no file './posix/unistd/init.lua' no file '/usr/lib/flua/posix/unistd.so' no file '/usr/lib/flua/loadall.so' no file './posix/unistd.so' no module 'posix.unistd' in file '/usr/lib/flua/posix.so' stack traceback: [C]: in function 'require' /usr/share/flua/nuage.lua:7: in main chunk [C]: in function 'require' /usr/tests/libexec/nuageinit/addfile.lua:3: in main chunk [C]: in ?