From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms13.migadu.com with LMTPS id AO49C3EDOmeiAwEA62LTzQ:P1 (envelope-from ) for ; Sun, 17 Nov 2024 14:53:37 +0000 Received: from aspmx1.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1.migadu.com with LMTPS id AO49C3EDOmeiAwEA62LTzQ (envelope-from ) for ; Sun, 17 Nov 2024 15:53:37 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=debbugs.gnu.org header.s=debbugs-gnu-org header.b=MS1EvhUm; dkim=fail ("headers rsa verify failed") header.d=ultrarare.space header.s=dkim header.b="Oe/4NS8G"; spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=gnu.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1731855217; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:resent-cc:resent-from:resent-sender: resent-message-id:in-reply-to:in-reply-to:references:references: list-id:list-help:list-unsubscribe:list-subscribe:list-post: dkim-signature; bh=seyIghHYRc0eY/gmle9O6Gs05DrpirNRorGsIt8YjcE=; b=GnFyf2BnQdLISjHmedo2oTBEal/cVkuLVHWPkVIZhzIsvoWt7kJT3DA8yUj+LjQ6Zs18gT /+FHIp3S/GHF51ba+aMf8HldPZ1ao9wc+0A9uasOe6oopGT9GRvuLYjRoDqFNEYMhyliOF yXSN/QWuW0a4yQN28JLe9vZN3VnhQW0tdumNRmB9wCD8JRKoY3AwRXyy7i09QTWm0Jil+q /XEuJCUnwSFB3MpVBrW866FZwCSL2KSimdzJop1XbF8czL5shY0uFple1+R8Q+4F0RrjqP 21cpl09F/BCn1j4oDhzXYx1hjtCrxTtAlXNI/czFtFmA/T8DsJKhSYSxVrdKcQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=debbugs.gnu.org header.s=debbugs-gnu-org header.b=MS1EvhUm; dkim=fail ("headers rsa verify failed") header.d=ultrarare.space header.s=dkim header.b="Oe/4NS8G"; spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=gnu.org ARC-Seal: i=1; s=key1; d=yhetil.org; t=1731855217; a=rsa-sha256; cv=none; b=TTyIBCDN3yJlIiAl+rJXBQt0Y0nZ4qe30OkCk6/5NOdRdcWYXNrrqFBLhtxsZuxHVzAvuk W9suUP4lsQ2JmQr3Mmv3dO3V1fvZCs5qtkYfmhvZPrWOKNrxT26nDSDZYXnjU15ssTQtp5 w8PNDvpN/8GIw6bt/htcUbSdBpjJrr9IukKIO0b6EQdcWzPRYDqr2uEyWT/mY60leXEh5y gseJn2UqqikLSiiYYtTAbHlS4yiCPDM7D8c8wgIsvecci/2JTuaJ6UFQf/ChG+z+nYBG+g E/lV/jOfSTiaYB3LAEPqAhKfV+qmKOWwH30wovjAwX5bHhJwK20K/Mg7jOLYMQ== Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id F3BBF8633B for ; Sun, 17 Nov 2024 15:53:36 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tCgeA-0008MD-1g; Sun, 17 Nov 2024 09:53:06 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tCge7-0008Ll-P9 for bug-guix@gnu.org; Sun, 17 Nov 2024 09:53:03 -0500 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tCge7-0004yY-4I for bug-guix@gnu.org; Sun, 17 Nov 2024 09:53:03 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:References:In-Reply-To:From:Date:To:Subject; bh=seyIghHYRc0eY/gmle9O6Gs05DrpirNRorGsIt8YjcE=; b=MS1EvhUmSotWrcM+wU/opjGfSPjn5xMW2mC0pc4XvHfXvIBt2HPE9XixGxrTMUhYt6NHnw8cM+PeiDS5xeqrW0Crx+1mK/gGDuczUPGKKONpgtyisGz2+Jr2jzhPazoNoO2K3rNWgZelp5yzAKmC0KnMhX0xI0W9n5k6LY98QjOfAKS59Fn+MDU+ecXD5qEbzYt3spZ+Zkcytkyt8c7biW2v2Ya+4wJ7ZgksPxtE8nFo48eXW6Ip3NEKCuYO0t8pI9fBeybk1PpNB2wKBePDTFh+kwSHNOoksAuazHWmLBtoL64Dfath/Eljf9nfoE4yX11ZeSoXCPaVJK+SiXC/HA==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tCge6-0005dG-0v; Sun, 17 Nov 2024 09:53:02 -0500 X-Loop: help-debbugs@gnu.org Subject: bug#74217: Bootstrapping Zig with no Binary Blobs Resent-From: Hilton Chain Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org, Ekaitz Zarraga Resent-Date: Sun, 17 Nov 2024 14:53:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 74217 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: 74217@debbugs.gnu.org Cc: Motiejus =?UTF-8?Q?Jak=C5=A1tys?= , dan , Ekaitz Zarraga , =?UTF-8?Q?No=C3=A9?= Lopez , Efraim Flashner , Hilton Chain Received: via spool by 74217-submit@debbugs.gnu.org id=B74217.173185512921567 (code B ref 74217); Sun, 17 Nov 2024 14:53:01 +0000 Received: (at 74217) by debbugs.gnu.org; 17 Nov 2024 14:52:09 +0000 Received: from localhost ([127.0.0.1]:56365 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tCgdF-0005bn-AI for submit@debbugs.gnu.org; Sun, 17 Nov 2024 09:52:09 -0500 Received: from mail.boiledscript.com ([144.168.59.46]:47840) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tCgdC-0005bH-H8 for 74217@debbugs.gnu.org; Sun, 17 Nov 2024 09:52:07 -0500 Date: Sun, 17 Nov 2024 22:51:48 +0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ultrarare.space; s=dkim; t=1731855118; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=seyIghHYRc0eY/gmle9O6Gs05DrpirNRorGsIt8YjcE=; b=Oe/4NS8GavARz+Wk2fSu4YFOjisO11lH41xAuicj/eat2a9f16VsA1iaFsVPAEFT3wzcgK +B+AgsigcnDnP+cZo/Iaa4Ym8lM2KqrNUGrOkIxYJygcPGf/5WmCqtyrusUWa1NUZXLLW9 PFKWQiBXPap4sd6L/TDtcBI4djnWOhLZJnqH36Y+MoAHxM9rRckpAxnV0LZ4zGqDGRIoxc Z6DHfSlZmlK/AeL374plEdV37D0cqj8d4KXCsG2OKOfr+33SnILd36XKU0xS/l62RqltWD lQImtv6eC2Q4IVrE49N1I1kI+rCtlWwH0jiVd9aCHScjOLIz3r2Yf0KNg6O+Kw== Message-ID: <87a5dx7w1n.wl-hako@ultrarare.space> In-Reply-To: References: <87ldxngjy4.wl-hako@ultrarare.space> <878qtmvh2i.wl-hako@ultrarare.space> <877c96vd3u.wl-hako@ultrarare.space> <874j4auz7j.wl-hako@ultrarare.space> <87v7wqtbjq.wl-hako@ultrarare.space> <878qtl5g55.wl-hako@ultrarare.space> <87jzd47enj.wl-hako@ultrarare.space> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-Spamd-Bar: -- X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-guix@gnu.org List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-to: Hilton Chain From: Hilton Chain via Bug reports for GNU Guix Errors-To: bug-guix-bounces+larch=yhetil.org@gnu.org Sender: bug-guix-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN X-Migadu-Scanner: mx11.migadu.com X-Migadu-Spam-Score: -2.41 X-Spam-Score: -2.41 X-Migadu-Queue-Id: F3BBF8633B X-TUID: 6Y/MfqCo0yPz On Sun, 17 Nov 2024 15:16:13 +0800, Efraim Flashner wrote: > > [1 ] > On Fri, Nov 15, 2024 at 10:30:40PM +0800, Hilton Chain wrote: > > On Fri, 15 Nov 2024 11:29:10 +0800, > > Hilton Chain wrote: > > > > > > Good news: Thanks to this diff, I know how to add libc to RUNPATH now :) > > > > > > Another forced push, I have ensured consistent behavior for > > > (CROSS_)?LIBRARY_PATH and added libc RUNPATH without restoring the behavior > > > passing '-lc' to linker. > > > > > > Who said not going to implement a ld-wrapper within Zig? :P > > > Fortunately it was already there :) > > > > > > BTW, adding pkg-config to native-inputs works for ncdu. > > > > I have locally made the "use-system-paths" patch larger so that Zig can really > > honor "CROSS_" environment variables. > > > > The next issue is cross building with pkg-config. Zig only invokes > > "pkg-config", but we don't have a "pkg-config" with search path for target > > inputs. I can add a pkg-config-for-zig to workaround this, and then... It's > > dynamic linker path, I'll look into it soon. > > I found a patch after the 0.13.0 release that switches from hardcoding > pkg-config to using the PKG_CONFIG environment variable and falling back > to pkg-config, so I backported it to 0.12 and was able to use that and > guix's regular pkg-config package. I've added those patches to the > wip-zig-bootstrap tree. Thanks, I have ported all patches and pushed. GUIX_ZIG_LIBC_DIR is changed to GUIX_ZIG_GLIBC_LINKER and is set as full path in Guix side because I don't want mess with strings in Zig side... > We now have a couple of phases that are before the 'build phase, do you > think it'd be better to consolidate them into a 'configure phase? > There's no 'configure' script to run, but it does do a lot of > preparation before the actual 'build phase... I have merged these phases into configure, forgot to change commit log though. The reproducibility issue is related to kernel version from target ("native" by default) information, to address this we need to specify a target for native builds too.[1] --- [1]: https://github.com/ziglang/zig/issues/22002#issuecomment-2480933071