From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms13.migadu.com with LMTPS id WOulOYzBNWfIVQEAe85BDQ:P1 (envelope-from ) for ; Thu, 14 Nov 2024 09:23:25 +0000 Received: from aspmx1.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2.migadu.com with LMTPS id WOulOYzBNWfIVQEAe85BDQ (envelope-from ) for ; Thu, 14 Nov 2024 10:23:25 +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=OaHz8dbR; dkim=fail ("headers rsa verify failed") header.d=ultrarare.space header.s=dkim header.b=wXxjmwde; dmarc=pass (policy=none) header.from=gnu.org; 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" ARC-Seal: i=1; s=key1; d=yhetil.org; t=1731576204; a=rsa-sha256; cv=none; b=Si3aC9oZgWkomlwqe/rre+o8PlHPAg3svpET6euKH2ArNT9GuLcSNGUkMfL+OHTbMJ9dpX j/BNRlRDqmP0VHWBr+uBn0Cvn1TfWNq2I0uFFqNbSOg4dnZ2Bq8TaAkiYAPQulWqA8YYI0 aF9XfqKR7YxKM4RJSQCehdz+sA59iWH44r1LWmVfb9wh39k1Ea3osGzLR8t9zyd3HGzDdh SeVc24x0VojcKiml+ZsfIaAR28EZ47k8axn8gCmBinTQJA4ullxmp92vHF68+9NOY5gYex lyxJY99zr6kYYH/FYecwAzgUsNvpWnEjIxIvaWVAebZFoEAucbjK76hmthhMYQ== 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=OaHz8dbR; dkim=fail ("headers rsa verify failed") header.d=ultrarare.space header.s=dkim header.b=wXxjmwde; dmarc=pass (policy=none) header.from=gnu.org; 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" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1731576204; 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=MK4kFKQSIf3aVm1+sUpwSJjHfDIQpTIvSPDoeXcAHcA=; b=o480QtYxGIZ1/uRA5clL2uAI6KS0qlCX2S+Cf5ChURn7Uchy2KJ9gq0OKUgUnCHbv5XKuM sIsz+cCMgqS0qicH7xg7PHobn/7IzAHj3+AsRKETsEPiEVS0MPau0I16bGr0fQ7TsEX2g0 rlVxn6pdsO3mxPjLzr6IxnG5kHYz0rR5iiy6EgH5ncL9SLfB5F1TsSjhDoGtRtcK5l07ZJ XjXiECg+wXY+l5bk6e4DUTHGvalD0GUjgARxqlDz6XbD6cdRz+y0kcZcnHAMMB8uBTLjvr aZG2LudB58jE+3lRJh+dUqcXnpv9mjWxXPnZhARoPkE+KoTSensN6l/EmQNzbw== 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 1A21B5A28 for ; Thu, 14 Nov 2024 10:23:23 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tBW49-0006vt-1N; Thu, 14 Nov 2024 04:23:05 -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 1tBW47-0006vk-GZ for bug-guix@gnu.org; Thu, 14 Nov 2024 04:23: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 1tBW47-0002Yj-7e for bug-guix@gnu.org; Thu, 14 Nov 2024 04:23: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=MK4kFKQSIf3aVm1+sUpwSJjHfDIQpTIvSPDoeXcAHcA=; b=OaHz8dbRSLf8M6h7aBNcId+ny8b2yvNe/xwn5OV1dPVgH2xtV44+rhS0O03rnivmLgWa4iA7XQnM22zl8QC3BzkxLCP/pZSYIWwAl55adNrTF9Ug2Ql+xc/j1BxTWQkdR1oM2ygJ846FR7jXdL/aFbOoYCtNVJGwKuFWYlcZYYPYJIsatPmx2lvFe/tOO3izGr+KYwYhOOGZq3X1C9rsNoLapYedudx2ckusJzZPtLWa4xG/1mnideUA2X0RSowzBIbZnHyLnGUrUxIwreAPuxn2TqlduwybOaNcxgV8N/MBwV7g/4vpQvaf08UKCTWMYRahOu7Q1RVOQuhmhnYudg==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tBW46-0003bY-8U; Thu, 14 Nov 2024 04:23: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: Thu, 14 Nov 2024 09:23:02 +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?= , =?UTF-8?Q?No=C3=A9?= Lopez , dan , Efraim Flashner , Ekaitz Zarraga Received: via spool by 74217-submit@debbugs.gnu.org id=B74217.173157616113813 (code B ref 74217); Thu, 14 Nov 2024 09:23:02 +0000 Received: (at 74217) by debbugs.gnu.org; 14 Nov 2024 09:22:41 +0000 Received: from localhost ([127.0.0.1]:45033 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tBW3k-0003ai-KG for submit@debbugs.gnu.org; Thu, 14 Nov 2024 04:22:40 -0500 Received: from mail.boiledscript.com ([144.168.59.46]:51566) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tBW3h-0003aR-Hr for 74217@debbugs.gnu.org; Thu, 14 Nov 2024 04:22:38 -0500 Date: Thu, 14 Nov 2024 17:22:17 +0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ultrarare.space; s=dkim; t=1731576150; 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=MK4kFKQSIf3aVm1+sUpwSJjHfDIQpTIvSPDoeXcAHcA=; b=wXxjmwdeNZ7QE5L5V4bLjTxRSv7REz7YBZ58BKr22Io1pXsSMmQhnDgUrrdPnOOh/ilqTe n8UNZAz38u/TCAYlNRsiJWPQX32L8T5S7Vp6NgojQoUWk6vdhw6dCHWjompocQkzLJz3y6 4VOzVayayCpoVHIPX4uIqz74dLJw3DyB8xN/2WteuFtasMawmUBmg8zvsFJ0TVZ/VIoRQF q2hMQne3AGcbun4ZaxRCiUPC2AsHFxF274cuY8lMoO2MxP5Vab/NRhw26wklLJ4qo14nnK aiCuL8shH8slH1+G01ptbpdeTpiaQpAE/50ct4LgyRkxWHeZKGOJRiF3I9cSVw== Message-ID: <87v7wqtbjq.wl-hako@ultrarare.space> In-Reply-To: <874j4auz7j.wl-hako@ultrarare.space> References: <87ldxngjy4.wl-hako@ultrarare.space> <878qtmvh2i.wl-hako@ultrarare.space> <877c96vd3u.wl-hako@ultrarare.space> <874j4auz7j.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-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Spam-Score: 0.59 X-Spam-Score: 0.59 X-Migadu-Queue-Id: 1A21B5A28 X-Migadu-Scanner: mx12.migadu.com X-TUID: XJvXKDuT7E5x On Thu, 14 Nov 2024 14:05:52 +0800, Hilton Chain wrote: > > Currently I'm 1. modifying each-lib-rpath option of 'zig build'. 2. passing > libc to linker. I'll write details on this when succeed. 1. Modification about each-lib-rpath. --8<---------------cut here---------------start------------->8--- -feach-lib-rpath Ensure adding rpath for each used dynamic library --8<---------------cut here---------------end--------------->8--- This option is on implicitly for native builds. This implicity is what our Zig currently solely relies on. I'm modifying it so that it's also on when CROSS_LIBRARY_PATH or LIBRARY_PATH is set. This approach is better than my previous one since it only adds needed libraries. 2. Pass libc to Zig's linker This was the behavior in 0.9, but changed due to issue on macOS[1]. (btw, our CPLUS_INCLUDE_PATH also has issue with macOS target[2]). RUNPATH for glibc was missing because of this, since it's the linker handling each-lib-rpath. Since we do not support macOS anyway, can we restore this behavior? I also have concern for Zig's relying on /usr/bin/env (Zig uses an ELF file to find dynamic linker, env is chosen for it's well-known). We have patched this reference, not sure if it will cause issue for cross-building Zig. Thanks --- [1]: https://github.com/ziglang/zig/issues/10765 [2]: https://github.com/ziglang/zig/issues/18063