From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id YKSNIkUs9F8JeAAA0tVLHw (envelope-from ) for ; Tue, 05 Jan 2021 09:07:17 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id oHleHkUs9F/9bAAAB5/wlQ (envelope-from ) for ; Tue, 05 Jan 2021 09:07:17 +0000 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 3FAEF940484 for ; Tue, 5 Jan 2021 09:07:16 +0000 (UTC) Received: from localhost ([::1]:52786 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kwiJ8-0004Lu-Rj for larch@yhetil.org; Tue, 05 Jan 2021 04:07:14 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:54664) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kwiIj-0004Lm-JX for guix-devel@gnu.org; Tue, 05 Jan 2021 04:06:49 -0500 Received: from mira.cbaines.net ([212.71.252.8]:59270) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kwiIh-0001kI-BV for guix-devel@gnu.org; Tue, 05 Jan 2021 04:06:49 -0500 Received: from localhost (188.28.108.198.threembb.co.uk [188.28.108.198]) by mira.cbaines.net (Postfix) with ESMTPSA id 3C38427BC0B; Tue, 5 Jan 2021 09:06:43 +0000 (GMT) Received: from capella (localhost [127.0.0.1]) by localhost (OpenSMTPD) with ESMTP id 9da4047a; Tue, 5 Jan 2021 09:06:39 +0000 (UTC) References: <87turwypuv.fsf@gmail.com> User-agent: mu4e 1.4.13; emacs 27.1 From: Christopher Baines To: Chris Marusich Subject: Re: guix build -d with a target causes many builds In-reply-to: <87turwypuv.fsf@gmail.com> Date: Tue, 05 Jan 2021 09:06:36 +0000 Message-ID: <87eeizkb1f.fsf@cbaines.net> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" Received-SPF: pass client-ip=212.71.252.8; envelope-from=mail@cbaines.net; helo=mira.cbaines.net X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: guix-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: guix-devel@gnu.org Errors-To: guix-devel-bounces+larch=yhetil.org@gnu.org Sender: "Guix-devel" X-Migadu-Flow: FLOW_IN X-Migadu-Spam-Score: -4.44 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of guix-devel-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-devel-bounces@gnu.org X-Migadu-Queue-Id: 3FAEF940484 X-Spam-Score: -4.44 X-Migadu-Scanner: scn0.migadu.com X-TUID: VIoloF6wm2dU --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Chris Marusich writes: > Hi, > > I've noticed that Guix builds many things when I ask it to instantiate a > derivation in the following way: > > [0] [env] marusich@garuda-lan:~/guix/repos/guix-worktrees/wip-ppc64 > $ guix build -d --target=3Dpowerpc64-linux-gnu -e '(@@ (gnu packages make= -bootstrap) %gcc-static)' > The following derivations will be built: > /gnu/store/i5wn3xl6p0zw1vglscgk0bs9dwc6hdh6-gcc-static-5.5.0.drv > /gnu/store/3h2sk37iim53fh7g9r3sd1q0xzhqwa51-gcc-cross-powerpc64-linux-= gnu-7.5.0.drv > /gnu/store/84k0j5jm316cwf7h66vrw1vmvkd4kbck-glibc-cross-powerpc64-linu= x-gnu-2.31.drv > /gnu/store/d36n7qy9xbgwpaw3nw8k9dj51hzmdnr4-gcc-cross-sans-libc-powerp= c64-linux-gnu-7.5.0.drv > /gnu/store/mqar9bnapfcfkna3rvy28awhlpd3q65q-binutils-cross-powerpc64-l= inux-gnu-2.34.drv > /gnu/store/pzp93dw3rr6sp2ybi3dzs6kd7gvigfsk-ld-wrapper-powerpc64-linux= -gnu-0.drv > /gnu/store/n7dhpsq41q4kdbqgniljbwrlawvmmlp6-linux-libre-headers-cross-= powerpc64-linux-gnu-5.4.20.drv > /gnu/store/9p5anrji5wgkf66k09jhbsr3fqwwi7cn-gcc-cross-powerpc64-linux-= gnu-7.5.0.drv > /gnu/store/r4ac80znwlrnh4jmj2sbczc4mn66mqdg-glibc-cross-powerpc64-linu= x-gnu-2.31.drv > /gnu/store/ap8ri9ddka13vyrsl72pzqslagi4v7vj-gmp-6.2.0.drv > /gnu/store/arxf2alzwf9rmz5hz8h11j4j12drxm3i-glibc-cross-powerpc64-linu= x-gnu-2.31.drv > /gnu/store/d127w5flv12s4bfmpf4nwrvg3sibvfya-linux-libre-headers-cross-= powerpc64-linux-gnu-5.4.20.drv > /gnu/store/j3d5kr7qlr6g3lq0dwc8z8jh6w814z9v-isl-0.18.drv > /gnu/store/j90wwahzd5ldw7ai11zf5lnp3kbbrmkh-mpfr-4.0.2.drv > /gnu/store/mz9fdir4avdda5cw1snyf8vhpq70c9na-libelf-0.8.13.drv > /gnu/store/q9x04y75mq2nfp2a6gwa0pvrgv60aah9-mpc-1.1.0.drv > /gnu/store/xk4yv7xj15qnl3zv2m8nnzrw0bdgjsx3-zlib-1.2.11.drv > 171.3 MB will be downloaded: > /gnu/store/ir3092v7657h6g4g2vlsw3zrli3rndb3-zlib-1.2.11.tar.gz > /gnu/store/amc0nizxsdcj212nk9a3ivr946hzhl6c-mpc-1.1.0 > /gnu/store/j4npmpn7dxmfknyfnhj4q4jmdwmk3klg-mpc-1.1.0.tar.gz > /gnu/store/0z3z3lhig0xyy817nv70p2hp1n1wqawa-libelf-0.8.13.tar.gz > /gnu/store/bkyiyc4hrjcd4ljx6jqf7z05hm4qxcwd-mpfr-4.0.2.tar.xz > /gnu/store/2jj3il6p5xrc4gkncj9303an81x2csc9-perl-5.30.2 > /gnu/store/n1yvkd7jk50qg1vv9cca6ywynkqvaqgq-ncurses-6.2 > /gnu/store/j709qpwy790bcra6w8kvyz1v5zcsw8df-texinfo-6.7 > /gnu/store/jk5k0sgqpj0sj4ymgq7m8g8617i0xji2-m4-1.4.18 > /gnu/store/57i37x74wz7ar703smykildzvhpdds1g-gmp-6.2.0 > /gnu/store/f2r1w8y7l3lpwh4i47nq2s1vqlqxq0jb-glibc-2.31 > /gnu/store/rgi1k6kx4v9m8449w00i6jfxvpgaz73g-glibc-2.31-static > /gnu/store/df1gdl0vwwbzv04snfha0g88rj02pni9-gcc-5.5.0 > /gnu/store/waz3iz17vlbpfc2fm9yiym6bgbsajghf-mpfr-4.0.2 > /gnu/store/hnsi8iaimgss3v81h7h1r8ck55c0968h-popt-1.18 > /gnu/store/vpy0bcjw0yzaj7j7qx8rfc88c7r357k3-rsync-3.1.3 > /gnu/store/0zcl1i3rbjc356138hx86b7yaz29g6fj-linux-libre-5.4.20-gnu.tar= .xz > /gnu/store/l788x07ska5vffayz0gayv4hsx5flxal-module-import-compiled > /gnu/store/lqz1pygx3x5dd6ad2l3n8ixm1vh6czj4-python-minimal-3.8.2 > /gnu/store/ba6s3g925nggb57b1gpj2jkhqsq24s4q-libstdc++-7.5.0 > /gnu/store/xaclbfx6rvnbsq5qmry0251r7y82rgnv-libstdc++-headers-7.5.0 > /gnu/store/j8b9i4czpzb298zwa15wpyr42471qfbm-module-import-compiled > > The Guix documentation ((guix) Additional Build Options) says the "-d" > option should just give me the derivation paths, not the output paths: > > =E2=80=98--derivations=E2=80=99 > =E2=80=98-d=E2=80=99 > Return the derivation paths, not the output paths, of the given > packages. > > So, I'm confused about why all these builds need to happen. Didn't I > only ask Guix to instantiate the derivation - not realize it? In other > words, I expected Guix to calculate the transitive closure of the > requested derivation's inputs (mainly other derivations, I think?) and > write them to the store, without actually executing any significant > builds. > > I suppose that Guix is building these things in order to do just that, > but I don't quite understand why this happens. Can someone explain it? Grafts. =E2=86=92 guix build --no-grafts -d --target=3Dpowerpc64-linux-gnu -e '(@@ = (gnu packages make-bootstrap) %gcc-static)' /gnu/store/i5wn3xl6p0zw1vglscgk0bs9dwc6hdh6-gcc-static-5.5.0.drv They're on by default, so when you use -d without --no-grafts, I believe you're actually getting the derivation that does the grafting, rather than the derivation for the package build. --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQKlBAEBCgCPFiEEPonu50WOcg2XVOCyXiijOwuE9XcFAl/0LBxfFIAAAAAALgAo aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldDNF ODlFRUU3NDU4RTcyMEQ5NzU0RTBCMjVFMjhBMzNCMEI4NEY1NzcRHG1haWxAY2Jh aW5lcy5uZXQACgkQXiijOwuE9Xe3Nw/9E/4CZ/gaDk2aROf/B6HJwjkb9oB5mMTY fu2/C7Jv4FMZiVd/jAxv+tKMB1LZ4EPQ7CVYMpJINMUT+0BvqPwPq5vYYtxzSvix w+yxFeN/Wx9XUI4T49q8+dr/t8Yxr9c7V3HdbjStrv0uuw5DfG0EcszbZqCHMQS9 cECTf/Ha642TtkX7MjvC+78cxjce+Q+7gsHFwjJr9dfZL+b1gfhZxolM5cUM9XEx h9s6ukftEPbWC2gbx638FBybduG5KnWSSzHPjfjufmLyv4foAV0Io/iRBbcHNV67 zre4mIwfib2u5xCtH18VFkRa087gT0p18aDwrasXoTdNKGkk8YnFgoq4MrlC30IY ug+PtBEq8ZH4tSZEVumbAjoqaX2vmA8c5q/PCOoRkBDGP+nvPHwNEj90B78EV5nl 5nKrdj/Oc+QaYIlh3YpqjoNzPH5mYLaOHEFAGVScvqiQ/XcXB7SWpweMOOaAN/eQ 0hF3GAJIimTJ5vpYAXYbzCsmdfuPQDLBW95/9G+AoTbmRLKVy0DEAMiovFs1tomC weXtVis+0IY3OXWWqwIUS39NJRV/k2zHpxaJyf5wpr3pc3RkIYsfHDVSRz2L0dJ4 4f7866g0lMB6hb1rUhwGPQ/9dA1AZGxf8N4/iOSdeFrqzt4RGn4aOJ4d791jt562 2qghmzZzbJc= =/jP+ -----END PGP SIGNATURE----- --=-=-=--