From unknown Mon Aug 18 14:15:40 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#32050 <32050@debbugs.gnu.org> To: bug#32050 <32050@debbugs.gnu.org> Subject: Status: invoke (guix build utils) error reporting lacking Reply-To: bug#32050 <32050@debbugs.gnu.org> Date: Mon, 18 Aug 2025 21:15:40 +0000 retitle 32050 invoke (guix build utils) error reporting lacking reassign 32050 guix submitter 32050 Maxim Cournoyer severity 32050 normal thanks From debbugs-submit-bounces@debbugs.gnu.org Wed Jul 04 08:51:10 2018 Received: (at submit) by debbugs.gnu.org; 4 Jul 2018 12:51:10 +0000 Received: from localhost ([127.0.0.1]:45996 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fahFV-0004eB-Ps for submit@debbugs.gnu.org; Wed, 04 Jul 2018 08:51:10 -0400 Received: from eggs.gnu.org ([208.118.235.92]:55592) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fahFU-0004dx-22 for submit@debbugs.gnu.org; Wed, 04 Jul 2018 08:51:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fahFN-0000z5-Qg for submit@debbugs.gnu.org; Wed, 04 Jul 2018 08:51:02 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,FREEMAIL_FROM, T_DKIM_INVALID autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:48055) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1fahFN-0000yy-Mo for submit@debbugs.gnu.org; Wed, 04 Jul 2018 08:51:01 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:46560) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fahFM-0000Iz-Cg for bug-guix@gnu.org; Wed, 04 Jul 2018 08:51:01 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fahFJ-0000y6-A0 for bug-guix@gnu.org; Wed, 04 Jul 2018 08:51:00 -0400 Received: from mail-io0-x22b.google.com ([2607:f8b0:4001:c06::22b]:44513) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fahFJ-0000xu-4F for bug-guix@gnu.org; Wed, 04 Jul 2018 08:50:57 -0400 Received: by mail-io0-x22b.google.com with SMTP id q19-v6so4784012ioh.11 for ; Wed, 04 Jul 2018 05:50:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:mime-version; bh=Q9OMtv7CJgWBRB10SkioHavbikF4JISfuhiKYcC3zSM=; b=Q7ufrb2HBbt9+nxf71ysQrafbugrI3LXCs1TAj7TQyQThj+r4hRCwnHwQj5gUHCFbH kjhZRtcTe4TyaK2akfnOU4HYPDYFALZUccnlPaEtQ41WKyZs0MHvyHuQVm5VvORIGUYy yA8OsiV8zmVvpLoSz0+Cdi7yraCxHWl/l3MNPOjPkOY55nliRxLhqeSlaEY7TXy+VwhD eYTQFefKkjTuCUgyJJZpTJY0Al+1z5oXGtjsGqxLgjOFBDU2WwgCL9QOwNtkZRAYmma9 q907gJAAwyWFyof2G1xjnjPDlDA6u/CJzb9b8W1ErivPNeJAP7rn27mqZbZGXY0x4bJq Z7Sw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:mime-version; bh=Q9OMtv7CJgWBRB10SkioHavbikF4JISfuhiKYcC3zSM=; b=cAiwQ6l8GfkN3dx/wuvrSJkkao1Gg2plB6isgGivJMZVnVPtch8jaCEqdlSJRp17a0 6swmU3L/s/Wy27l7MvTvA+iLXsPryfg7xp8RwlPfeNApYCaE9jb41uKEufHwnp1StEnD Rb3OhXJTJFzqgDDNitFkQJA6rC+OMk3EryTwq+ks4WaWKoIrYENVf4dsLUYS3/UPoObu 9182Gpjh5QNGxbOG3sEi1JBlfDYoTE4ngMHsCrSWkdS0cCOT1DHqn1iTvf+RJEk1HRqe fEA+QRnEC9YYEJMtQjmf7bAo5MWgxqnaNe/fHmFauwoppWklYMRH1mfsc9Q/cBswIr7F sYQg== X-Gm-Message-State: AOUpUlEykSBTgmDzqUriWg5AjQXhw9oE+mVWuMF8AKWtFVYWC+nE4iO+ sR335boG786TRsrQYUjLhbTTVQ== X-Google-Smtp-Source: AAOMgpcLP96ecp+S9Hof5L9yGID1MBkEFPMuJXWZKIeVoGCLWbo/RHT+UFHQLDZl8Ghk3cKVekR0Jg== X-Received: by 2002:a6b:3442:: with SMTP id b63-v6mr1375928ioa.272.1530708656012; Wed, 04 Jul 2018 05:50:56 -0700 (PDT) Received: from apteryx ([45.72.169.37]) by smtp.gmail.com with ESMTPSA id z140-v6sm3079886ioz.81.2018.07.04.05.50.55 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 04 Jul 2018 05:50:55 -0700 (PDT) From: Maxim Cournoyer X-Google-Original-From: Maxim Cournoyer To: bug-guix Subject: invoke (guix build utils) error reporting lacking Date: Wed, 04 Jul 2018 08:50:50 -0400 Message-ID: <87fu0zkvv9.fsf@apteryx.i-did-not-set--mail-host-address--so-tickle-me> MIME-Version: 1.0 Content-Type: text/plain X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.0 (----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) The error reported by `invoke' isn't accurate, and mutes important output from the program invoked. Example of a failed tar extraction: --8<---------------cut here---------------start------------->8--- /gnu/store/xlj36j9dw581iah51iyjgi75iikrj55h-module-import/guix/build/utils.scm:616:6: In procedure invoke: Throw to key `srfi-34' with args `(#)'. --8<---------------cut here---------------end--------------->8--- While reproducing the same error in an containerized environment, calling the command directly yields: --8<---------------cut here---------------start------------->8--- tar xf yanfzfi7rdyf5scf5h65xbkn7xg0nnbn-docbook-dsssl-doc-1.79.tar.bz2 --strip-components=1 -C $PWD docbook-dssl-1.79/doc tar: docbook-dssl-1.79/doc: Not found in archive tar: Exiting with failure status due to previous errors maxim@apteryx /tmp/docbook-dsssl-doc [env]# echo $? 2 --8<---------------cut here---------------end--------------->8--- Two observations: 1. invoke's reported exit status was wrong (127 rather than 2) 2. The useful error message "docbook-dssl-1.79/doc: Not found in archive" was masked. From debbugs-submit-bounces@debbugs.gnu.org Wed Jul 04 09:13:08 2018 Received: (at 32050) by debbugs.gnu.org; 4 Jul 2018 13:13:08 +0000 Received: from localhost ([127.0.0.1]:46014 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fahak-0005E4-En for submit@debbugs.gnu.org; Wed, 04 Jul 2018 09:13:07 -0400 Received: from mail-it0-f49.google.com ([209.85.214.49]:55426) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fahai-0005DY-4N for 32050@debbugs.gnu.org; Wed, 04 Jul 2018 09:13:04 -0400 Received: by mail-it0-f49.google.com with SMTP id 16-v6so7747511itl.5 for <32050@debbugs.gnu.org>; Wed, 04 Jul 2018 06:13:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:references:date:in-reply-to:message-id:user-agent :mime-version; bh=pcdy58o7UbS3Htj29WLk70ppCi6NemlnA3V75mKmRXk=; b=n8IohvyEcGXqgCMxtKy88WbOMNzRtl9DUikfZyTBsenJNofUmrmbcnyz5j0niPhEgx UU2WMfOSgjvDLxfoI/YJEd+5kPFvF22UeWtTX3/ViVgcNmGRWqYMrbX/wQIcHmScFAIR QR0ZjCMsAsnvy3CXA7p0nr/JZxo8ukNun8FK3v2Nlrf6LlYxFq/yJ6YRBh+T0RJQqtgr eppNnqQIfuTE8mmE31fAZmB1JIkXzTb/4ivEVG369II3CH95ZnxfmOFb+EflI5iVBvOz hxMC9Dio9gtwflNJj6Lrpd+uEF4rtyyQd8/a/NmenMxnDH9HHENo3WnTGtx9TBP6G6QR DAKg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=pcdy58o7UbS3Htj29WLk70ppCi6NemlnA3V75mKmRXk=; b=Gf5M5GoLXzKEAzoRI1a4fwkFoeh7OtWVvxj6Gy1PEGbjbWFFeyKYp5VIaV/2lDoN2h 3/lshQKbXTE7VUWDqajbtNtsLAH0sdTjuhRCU9GztGMMcYHo3x7eTHNz/EFgba3c6hmU 2nzlyKuWa1Y00W+ZaeUJiHUMP7dr85Vlvs4Nan84082ucxAYMr+NX0NbaRHk8Lr1H2ws hn2trP9FHFep1QRhDzVPquFPZVjyjyVQgJ0qKxEJHmtzItaiwsp4wqCzc1E/MhfYODSQ sG83fLFdFX70NDnA0jKngXO1WDgVW5QBkyhimk5ma7v8+lp9UqXYqE3LRoafXRVmtgy0 ogGg== X-Gm-Message-State: APt69E0BA8Mp+biMNkAfOi2dWBPxO6aQ2GNSf5UdPc984QwKqHMHXf2N yqq/eNh30rLCYMhA4iV355Ww+A== X-Google-Smtp-Source: AAOMgpead1+PVUd9mRh59nan8NdIWdToB4eKeWCK04m+gXLPK0zycl3HXE95glWnssXqyj0l3Ig5Gw== X-Received: by 2002:a24:f6c1:: with SMTP id u184-v6mr1737625ith.14.1530709978333; Wed, 04 Jul 2018 06:12:58 -0700 (PDT) Received: from apteryx ([45.72.169.37]) by smtp.gmail.com with ESMTPSA id x67-v6sm1943126ita.11.2018.07.04.06.12.57 for <32050@debbugs.gnu.org> (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 04 Jul 2018 06:12:57 -0700 (PDT) From: Maxim Cournoyer To: 32050@debbugs.gnu.org Subject: Re: bug#32050: invoke (guix build utils) error reporting lacking References: <87fu0zkvv9.fsf@apteryx.i-did-not-set--mail-host-address--so-tickle-me> Date: Wed, 04 Jul 2018 09:12:56 -0400 In-Reply-To: (GNU bug Tracking System's message of "Wed, 04 Jul 2018 12:52:02 +0000") Message-ID: <878t6rkuuf.fsf_-_@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 32050 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) More problematic even, it seems "invoke" can't do everything that "system*" can? For example, the following package builds fine: --8<---------------cut here---------------start------------->8--- (define-public docbook-dsssl-doc (package (name "docbook-dsssl-doc") (version "1.79") (source (origin (method url-fetch) (uri (string-append "mirror://sourceforge/docbook/" name "/" version "/" name "-" version ".tar.bz2")) (sha256 (base32 "1plp5ngc96pbna4rwglp9glcadnirbm3hlcjb4gjvq1f8biic9lz")))) (build-system trivial-build-system) (arguments `(#:modules ((guix build utils)) #:builder (begin (use-modules (guix build utils)) (let ((source (assoc-ref %build-inputs "source")) (out (assoc-ref %outputs "out"))) (mkdir-p out) ;; Extract the "doc" subdirectory. (system* "tar" "xf" source "--strip-components=1" "--no-same-owner" "-C" out (string-append "docbook-dsssl-" ,version "/doc")))))) (native-inputs `(("bzip2", bzip2) ("tar" ,tar))) (home-page "https://docbook.org/") (synopsis "DocBook DSSSL style sheets documentation") (description "Documentation for the DocBook DSSSL style sheets.") (license non-copyleft))) --8<---------------cut here---------------end--------------->8--- ,run-in-store (build-package docbook-dsssl-doc #:use-substitutes? #t #:dry-run? #f) /gnu/store/ljr8xn3qbr3lahr29zc0lbki9x33zls6-docbook-dsssl-doc-1.79 $4 = #t But changing just "system*" to "invoke", I get: --8<---------------cut here---------------start------------->8--- @ build-remote /gnu/store/fdcg5nazw2jvpb7k4mq7q0750gq22zh7-docbook-dsssl-doc-1.79.drv 192.168.1.105 Backtrace: 2 (primitive-load "/gnu/store/06zszks9mwp52gih8j0mj5bahfi?") In ice-9/eval.scm: 191:35 1 (_ #f) In /gnu/store/xlj36j9dw581iah51iyjgi75iikrj55h-module-import/guix/build/utils.scm: 616:6 0 (invoke _ . _) /gnu/store/xlj36j9dw581iah51iyjgi75iikrj55h-module-import/guix/build/utils.scm:616:6: In procedure invoke: Throw to key `srfi-34' with args `(#)'. builder for `/gnu/store/fdcg5nazw2jvpb7k4mq7q0750gq22zh7-docbook-dsssl-doc-1.79.drv' failed with exit code 1 derivation '/gnu/store/fdcg5nazw2jvpb7k4mq7q0750gq22zh7-docbook-dsssl-doc-1.79.drv' offloaded to '192.168.1.105' failed: build of `/gnu/store/fdcg5nazw2jvpb7k4mq7q0750gq22zh7-docbook-dsssl-doc-1.79.drv' failed While executing meta-command: Throw to key `srfi-34' with args `(#)'. --8<---------------cut here---------------end--------------->8--- Thanks, Maxim From debbugs-submit-bounces@debbugs.gnu.org Wed Jul 04 13:47:00 2018 Received: (at 32050) by debbugs.gnu.org; 4 Jul 2018 17:47:00 +0000 Received: from localhost ([127.0.0.1]:46944 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1falrn-0005VJ-UN for submit@debbugs.gnu.org; Wed, 04 Jul 2018 13:47:00 -0400 Received: from world.peace.net ([64.112.178.59]:55816) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1falrm-0005Uz-Gd for 32050@debbugs.gnu.org; Wed, 04 Jul 2018 13:46:59 -0400 Received: from mhw by world.peace.net with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1falrg-0007r1-D2; Wed, 04 Jul 2018 13:46:52 -0400 From: Mark H Weaver To: Maxim Cournoyer Subject: Re: bug#32050: invoke (guix build utils) error reporting lacking References: <87fu0zkvv9.fsf@apteryx.i-did-not-set--mail-host-address--so-tickle-me> <878t6rkuuf.fsf_-_@gmail.com> Date: Wed, 04 Jul 2018 13:45:32 -0400 In-Reply-To: <878t6rkuuf.fsf_-_@gmail.com> (Maxim Cournoyer's message of "Wed, 04 Jul 2018 09:12:56 -0400") Message-ID: <87efginbcz.fsf@netris.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 32050 Cc: 32050@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Hi Maxim, Maxim Cournoyer writes: > More problematic even, it seems "invoke" can't do everything that > "system*" can? > > For example, the following package builds fine: > > (define-public docbook-dsssl-doc > (package > (name "docbook-dsssl-doc") > (version "1.79") > (source (origin > (method url-fetch) > (uri (string-append "mirror://sourceforge/docbook/" > name "/" version "/" > name "-" version ".tar.bz2")) > (sha256 > (base32 > "1plp5ngc96pbna4rwglp9glcadnirbm3hlcjb4gjvq1f8biic9lz")))) > (build-system trivial-build-system) > (arguments > `(#:modules ((guix build utils)) > #:builder > (begin > (use-modules (guix build utils)) > (let ((source (assoc-ref %build-inputs "source")) > (out (assoc-ref %outputs "out"))) > (mkdir-p out) > ;; Extract the "doc" subdirectory. > (system* "tar" "xf" source "--strip-components=1" > "--no-same-owner" "-C" out > (string-append "docbook-dsssl-" ,version "/doc")))))) > (native-inputs > `(("bzip2", bzip2) > ("tar" ,tar))) > (home-page "https://docbook.org/") > (synopsis "DocBook DSSSL style sheets documentation") > (description "Documentation for the DocBook DSSSL style sheets.") > (license non-copyleft))) > > > ,run-in-store (build-package docbook-dsssl-doc #:use-substitutes? #t #:dry-run? #f) > /gnu/store/ljr8xn3qbr3lahr29zc0lbki9x33zls6-docbook-dsssl-doc-1.79 > $4 = #t Did you check to see if the extraction actually succeeded? In this case, I don't see how it could have. When using 'tar' from within 'trivial-build-system', you need to add 'bzip2' to PATH, or else 'tar' will fail because it can't find 'bzip2'. There are many examples of setting PATH in (gnu packages fonts). Because of the way you are using 'system*' here without the usual 'zero?' wrapped around it, the numeric result code is returned as the result of the builder, and all numbers (even 0) are considered true in Scheme. So, this build will always succeed, ignoring errors from 'tar'. > But changing just "system*" to "invoke", I get: > > @ build-remote /gnu/store/fdcg5nazw2jvpb7k4mq7q0750gq22zh7-docbook-dsssl-doc-1.79.drv 192.168.1.105 > Backtrace: > 2 (primitive-load "/gnu/store/06zszks9mwp52gih8j0mj5bahfi?") > In ice-9/eval.scm: > 191:35 1 (_ #f) > In /gnu/store/xlj36j9dw581iah51iyjgi75iikrj55h-module-import/guix/build/utils.scm: > 616:6 0 (invoke _ . _) > > /gnu/store/xlj36j9dw581iah51iyjgi75iikrj55h-module-import/guix/build/utils.scm:616:6: In procedure invoke: > Throw to key `srfi-34' with args `(#)'. > builder for `/gnu/store/fdcg5nazw2jvpb7k4mq7q0750gq22zh7-docbook-dsssl-doc-1.79.drv' failed with exit code 1 > derivation '/gnu/store/fdcg5nazw2jvpb7k4mq7q0750gq22zh7-docbook-dsssl-doc-1.79.drv' offloaded to '192.168.1.105' failed: build of `/gnu/store/fdcg5nazw2jvpb7k4mq7q0750gq22zh7-docbook-dsssl-doc-1.79.drv' failed > While executing meta-command: > Throw to key `srfi-34' with args `(#)'. Changing 'system*' to 'invoke' allowed you to see that something went wrong. > The error reported by `invoke' isn't accurate, and mutes important > output from the program invoked. > > Example of a failed tar extraction: > > /gnu/store/xlj36j9dw581iah51iyjgi75iikrj55h-module-import/guix/build/utils.scm:616:6: In procedure invoke: > Throw to key `srfi-34' with args `(#)'. > > > While reproducing the same error in an containerized environment, > calling the command directly yields: > > tar xf yanfzfi7rdyf5scf5h65xbkn7xg0nnbn-docbook-dsssl-doc-1.79.tar.bz2 --strip-components=1 -C $PWD docbook-dssl-1.79/doc > tar: docbook-dssl-1.79/doc: Not found in archive > tar: Exiting with failure status due to previous errors > maxim@apteryx /tmp/docbook-dsssl-doc [env]# echo $? > 2 > > Two observations: > > 1. invoke's reported exit status was wrong (127 rather than 2) > 2. The useful error message "docbook-dssl-1.79/doc: Not found in > archive" was masked. I think what happened is that 'tar' actually failed in two different ways. In the first case, where the result code was 127, it failed because 'bzip2' was not found in PATH. In the second case, it failed because "docbook-dssl-1.79/doc" was not found in the archive. Or at least that's my guess. Regards, Mark From debbugs-submit-bounces@debbugs.gnu.org Sun Jul 08 11:59:35 2018 Received: (at 32050) by debbugs.gnu.org; 8 Jul 2018 15:59:35 +0000 Received: from localhost ([127.0.0.1]:51269 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fcC62-0001gv-PU for submit@debbugs.gnu.org; Sun, 08 Jul 2018 11:59:35 -0400 Received: from mail-io0-f174.google.com ([209.85.223.174]:36655) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fcC61-0001gg-4J for 32050@debbugs.gnu.org; Sun, 08 Jul 2018 11:59:33 -0400 Received: by mail-io0-f174.google.com with SMTP id k3-v6so14938731iog.3 for <32050@debbugs.gnu.org>; Sun, 08 Jul 2018 08:59:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=h4tx/x4eHJOZa5hlndKr4VmruylmR0XjaViPJc2Ua+8=; b=uQfChYlkGC1IHFEEztkkNoiz1zQWYUkOdMQH8OXFaBWmS7BsqC+t4STFHA+zjOhq6H 41yiArRTXjpn2Djp9e7V1WYNygUea1m1b84PXb8S0X70nIa+HzvFAfBTDvqcvZSKGQbJ RYRsPcDbqdBB32eh/B/mdeURA8/OVBl0bhBwv6AHvLTSKJwTgd5sCpuH7DWDj+X+JfXv Fhombn6O4PEUJVPdb8AiFwB759V39i9Iz59gaXS7dTyXQ5HFv7RvdU+8iCGqNV5SLgDS WjSqAYcQlYBOvyUO0h8Fj3LE6poYVlt1/WDMQZDe3JzPOEQfp2HHDuXYJ8ue6POTrjCe 6eAA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=h4tx/x4eHJOZa5hlndKr4VmruylmR0XjaViPJc2Ua+8=; b=saA2zNB/DcTbtVxxZkh/T4HXZS1psy8PVXjG1hW/u+rWkd9JR1ljHVVxII6s7iTwSr q+7LTMIQhG+UsC0LwaCQuZ4PtI9goXHna1w7PNTg9Li6CasTj64lXfm7KXsNA51AQR/D 0I1qr6NEUiPVYAoSULYNHqfASmwm7ELTAYISDjVXEa7P8sifbBhIyq/CPdFfUrplFyVt 5teNSb5f8ihozr48damTdng+P7j7krWsJ4qKhHl5wYWno8VhWf8RDzsFVpMaO4nvXLDr TmHXxj7vlvKYyXu7nM46tzSN3QgcmPkyrHxJ5R/pIFMVuaeCL1l4OuFoSD1X5kD9Ca+F tkyA== X-Gm-Message-State: APt69E39ZrR13MB1YpZ9UrOK+ZhafggOcLPPTjrS6s/eX3MP910qSCAl T1fjiA6rCpAD1H3os6MSZfO36g== X-Google-Smtp-Source: AAOMgpf4EyUb0TBnftX4+Y/soTsIicjLFxU8sWR7qY1CDh5TMk60DXTXe2K0099iyGNfdKhPe60Chg== X-Received: by 2002:a5e:950d:: with SMTP id r13-v6mr13728763ioj.224.1531065567246; Sun, 08 Jul 2018 08:59:27 -0700 (PDT) Received: from apteryx ([45.72.169.37]) by smtp.gmail.com with ESMTPSA id y63-v6sm7028727ita.24.2018.07.08.08.59.26 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sun, 08 Jul 2018 08:59:26 -0700 (PDT) From: Maxim Cournoyer To: Mark H Weaver Subject: Re: bug#32050: invoke (guix build utils) error reporting lacking References: <87fu0zkvv9.fsf@apteryx.i-did-not-set--mail-host-address--so-tickle-me> <878t6rkuuf.fsf_-_@gmail.com> <87efginbcz.fsf@netris.org> Date: Sun, 08 Jul 2018 11:59:25 -0400 In-Reply-To: <87efginbcz.fsf@netris.org> (Mark H. Weaver's message of "Wed, 04 Jul 2018 13:45:32 -0400") Message-ID: <87h8l9k9b6.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 32050 Cc: 32050@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Hi Mark, Mark H Weaver writes: [...] > Did you check to see if the extraction actually succeeded? > > In this case, I don't see how it could have. When using 'tar' from > within 'trivial-build-system', you need to add 'bzip2' to PATH, or else > 'tar' will fail because it can't find 'bzip2'. There are many examples > of setting PATH in (gnu packages fonts). OK. I now understand that the trivial-build-system does exactly nothing for us, so it doesn't even sets the "PATH" environment variable. This wasn't obvious to me, thank for pointing it out! > Changing 'system*' to 'invoke' allowed you to see that something went > wrong. Right, my confusion stemmed from the unset PATH variable; tar itself would return exit code 127 (command not found) in the trivial-build-system, but I couldn't reproduce directly in a containerized guix environment because there is a profile generation hook there which does set the PATH. >> The error reported by `invoke' isn't accurate, and mutes important >> output from the program invoked. >> >> Example of a failed tar extraction: >> >> /gnu/store/xlj36j9dw581iah51iyjgi75iikrj55h-module-import/guix/build/utils.scm:616:6: In procedure invoke: >> Throw to key `srfi-34' with args `(#> [program: "tar" arguments: ("xf" >> "/gnu/store/yanfzfi7rdyf5scf5h65xbkn7xg0nnbn-docbook-dsssl-doc-1.79.tar.bz2" >> "--strip-components=1" "-C" >> "/gnu/store/rw7yzjk1wffza65z6l6rnn25qg97jvh1-docbook-dsssl-doc-1.79" >> "docbook-dssl-1.79/doc") exit-status: 127 term-signal: #f >> stop-signal: #f] 68fc80>)'. It seems that the "system" and "system*" commands of Guile as well as our "invoke" do preserve the stdout/stderr, as when testing it manually I can see the useful "sh: tar: command not found" message: --8<---------------cut here---------------start------------->8--- scheme@(guile-user)> ,use (guix build utils) scheme@(guile-user)> (system "tar xf yanfzfi7rdyf5scf5h65xbkn7xg0nnbn-docbook-dsssl-doc-1.79.tar.bz2") sh: tar: command not found $1 = 32512 scheme@(guile-user)> (invoke "tar" "xf" "yanfzfi7rdyf5scf5h65xbkn7xg0nnbn-docbook-dsssl-doc-1.79.tar.bz2") In execvp of tar: No such file or directory guix/build/utils.scm:616:6: In procedure invoke: Throw to key `srfi-34' with args `(#)'. Entering a new prompt. Type `,bt' for a backtrace or `,q' to continue. --8<---------------cut here---------------end--------------->8--- Unfortunately, when called from the builder side of Guix, this information seems to be lost: --8<---------------cut here---------------start------------->8--- ./pre-inst-env guix build --no-build-hook --check docbook-dsssl-doc @ build-started /gnu/store/4ra70nwni8mcjyd2wfx7fqvsl4fpfs5m-docbook-dsssl-doc-1.79.drv - x86_64-linux /var/log/guix/drvs/4r//a70nwni8mcjyd2wfx7fqvsl4fpfs5m-docbook-dsssl-doc-1.79.drv.bz2 Backtrace: 2 (primitive-load "/gnu/store/kj0nr8i617gjwypalfs065jllhm?") In ice-9/eval.scm: 191:35 1 (_ #f) In /gnu/store/xlj36j9dw581iah51iyjgi75iikrj55h-module-import/guix/build/utils.scm: 616:6 0 (invoke _ . _) /gnu/store/xlj36j9dw581iah51iyjgi75iikrj55h-module-import/guix/build/utils.scm:616:6: In procedure invoke: Throw to key `srfi-34' with args `(#)'. builder for `/gnu/store/4ra70nwni8mcjyd2wfx7fqvsl4fpfs5m-docbook-dsssl-doc-1.79.drv' failed with exit code 1 @ build-failed /gnu/store/4ra70nwni8mcjyd2wfx7fqvsl4fpfs5m-docbook-dsssl-doc-1.79.drv - 1 builder for `/gnu/store/4ra70nwni8mcjyd2wfx7fqvsl4fpfs5m-docbook-dsssl-doc-1.79.drv' failed with exit code 1 guix build: error: build failed: build of `/gnu/store/4ra70nwni8mcjyd2wfx7fqvsl4fpfs5m-docbook-dsssl-doc-1.79.drv' failed --8<---------------cut here---------------end--------------->8--- Could it be preserved? It'd be very useful when debugging :) Maxim From debbugs-submit-bounces@debbugs.gnu.org Mon Jul 09 22:42:17 2018 Received: (at 32050) by debbugs.gnu.org; 10 Jul 2018 02:42:17 +0000 Received: from localhost ([127.0.0.1]:52921 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fcibZ-0001FS-AA for submit@debbugs.gnu.org; Mon, 09 Jul 2018 22:42:17 -0400 Received: from mail-it0-f50.google.com ([209.85.214.50]:56013) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fcibX-0001FG-Q9 for 32050@debbugs.gnu.org; Mon, 09 Jul 2018 22:42:16 -0400 Received: by mail-it0-f50.google.com with SMTP id 16-v6so28304066itl.5 for <32050@debbugs.gnu.org>; Mon, 09 Jul 2018 19:42:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=UVWsBlaPCBjmObrgrLoMQib9WH4IC5Nd342G7WYWogU=; b=rO5vTW55xICJ9qzkHADSbg1Ijzj0V7k9r3FLcT/IyXuAK/w1bFFFLEiG7VctyrHJtg s5rFwI+W7c3jftHebdoH2UoJA9kFNVf8k4+au5E2lJZm04LUEVQONkGFodh4YuuNJBn5 QZY1qZc25qYKRLVYn3vDeTXtqTMZ49ERUdJTq0Ukk63TP7Vv1KmIzsRCr9T/aoE3t622 N6/6r6oRrzdcqfeNiqYs+xEGPscl5AT6702QeZopVVkT0puaKFQQ2BSmhDM433eO0sZv kaYzBqVJTuDnDZjzjmH6iNi61Y+zvEyGr7MhmhUu74Zp/dQxZ/11w2P4b0x+09MY9+9A TA2g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=UVWsBlaPCBjmObrgrLoMQib9WH4IC5Nd342G7WYWogU=; b=ZowWQ25YVkgvJWPxD2jc1Ky0xRBfrP72GLTmSqTaznDCjZbpoMAxNyiH1BtcuoK8l6 6oITsaYIk33cXRukZOBTkuMC6yfRbwb37Y440zFwdL4fFCxlH6Hj0wy3ZSAroS06A5tR 51X4DtwaxUt5+kr8iCQi2Wz14xJLBlb1b/8Z/m9Z2J2voaE5ziHglX+w74dXBo0zV8Za qN4azjEbF/6FQbhkqh4IqbmBG9c66FyloWshSLqXsOK5Tp1y1rKKu4AalMMUaYIPz7Tj PohjuAcckDWQ9R0tsBMHJ2rr5nfRAeAdsTKHZDGEsfVtAypsGTtG20A4l1CSc4v55Wkw Nl2Q== X-Gm-Message-State: APt69E3D0MrTow4gHtZdscP0EjSM3X0K93W0EaUOri9tCOO1lFEBmCM/ e4U08pC0MmY4EISaKaGqD24d/w== X-Google-Smtp-Source: AAOMgpdWq/iu2gLhPNBDPCdrLBU7fOP5v1/BcVUKW1GgfSVQkc4aUSDKrL27YDUcikcfbrGNTJk8jg== X-Received: by 2002:a24:dc07:: with SMTP id q7-v6mr10460883itg.147.1531190530099; Mon, 09 Jul 2018 19:42:10 -0700 (PDT) Received: from apteryx ([45.72.169.37]) by smtp.gmail.com with ESMTPSA id 16-v6sm8597730itk.17.2018.07.09.19.42.08 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 09 Jul 2018 19:42:09 -0700 (PDT) From: Maxim Cournoyer To: Mark H Weaver Subject: Re: bug#32050: invoke (guix build utils) error reporting lacking References: <87fu0zkvv9.fsf@apteryx.i-did-not-set--mail-host-address--so-tickle-me> <878t6rkuuf.fsf_-_@gmail.com> <87efginbcz.fsf@netris.org> <87h8l9k9b6.fsf@gmail.com> Date: Mon, 09 Jul 2018 22:42:08 -0400 In-Reply-To: <87h8l9k9b6.fsf@gmail.com> (Maxim Cournoyer's message of "Sun, 08 Jul 2018 11:59:25 -0400") Message-ID: <87wou3izgf.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 32050 Cc: 32050@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Maxim Cournoyer writes: [...] > It seems that the "system" and "system*" commands of Guile as well as > our "invoke" do preserve the stdout/stderr, as when testing it manually > I can see the useful "sh: tar: command not found" message: > > scheme@(guile-user)> ,use (guix build utils) > scheme@(guile-user)> (system "tar xf yanfzfi7rdyf5scf5h65xbkn7xg0nnbn-docbook-dsssl-doc-1.79.tar.bz2") > sh: tar: command not found > $1 = 32512 > scheme@(guile-user)> (invoke "tar" "xf" "yanfzfi7rdyf5scf5h65xbkn7xg0nnbn-docbook-dsssl-doc-1.79.tar.bz2") > In execvp of tar: No such file or directory > guix/build/utils.scm:616:6: In procedure invoke: > Throw to key `srfi-34' with args `(#)'. > > Entering a new prompt. Type `,bt' for a backtrace or `,q' to continue. > > > Unfortunately, when called from the builder side of Guix, this > information seems to be lost: > > ./pre-inst-env guix build --no-build-hook --check docbook-dsssl-doc > @ build-started /gnu/store/4ra70nwni8mcjyd2wfx7fqvsl4fpfs5m-docbook-dsssl-doc-1.79.drv - x86_64-linux /var/log/guix/drvs/4r//a70nwni8mcjyd2wfx7fqvsl4fpfs5m-docbook-dsssl-doc-1.79.drv.bz2 > Backtrace: > 2 (primitive-load "/gnu/store/kj0nr8i617gjwypalfs065jllhm?") > In ice-9/eval.scm: > 191:35 1 (_ #f) > In /gnu/store/xlj36j9dw581iah51iyjgi75iikrj55h-module-import/guix/build/utils.scm: > 616:6 0 (invoke _ . _) > > /gnu/store/xlj36j9dw581iah51iyjgi75iikrj55h-module-import/guix/build/utils.scm:616:6: In procedure invoke: > Throw to key `srfi-34' with args `(#)'. > builder for `/gnu/store/4ra70nwni8mcjyd2wfx7fqvsl4fpfs5m-docbook-dsssl-doc-1.79.drv' failed with exit code 1 > @ build-failed /gnu/store/4ra70nwni8mcjyd2wfx7fqvsl4fpfs5m-docbook-dsssl-doc-1.79.drv - 1 builder for `/gnu/store/4ra70nwni8mcjyd2wfx7fqvsl4fpfs5m-docbook-dsssl-doc-1.79.drv' failed with exit code 1 > guix build: error: build failed: build of > `/gnu/store/4ra70nwni8mcjyd2wfx7fqvsl4fpfs5m-docbook-dsssl-doc-1.79.drv' > failed > > Could it be preserved? It'd be very useful when debugging :) I've investigated a bit, and as far as I can see by reading guix sources, the build log output would be displayed and any error reported by the `process-stderr' procedure in (guix store). This procedure behavior seems to depend closely on that of the guix daemon (server), so the problem could lie on the daemon side as well, so that's where I'll try digging next. Maxim From debbugs-submit-bounces@debbugs.gnu.org Thu May 28 00:42:36 2020 Received: (at 32050-done) by debbugs.gnu.org; 28 May 2020 04:42:36 +0000 Received: from localhost ([127.0.0.1]:50623 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jeANI-0008BK-Ke for submit@debbugs.gnu.org; Thu, 28 May 2020 00:42:36 -0400 Received: from mail-qv1-f48.google.com ([209.85.219.48]:43477) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jeANH-0008B6-JN for 32050-done@debbugs.gnu.org; Thu, 28 May 2020 00:42:35 -0400 Received: by mail-qv1-f48.google.com with SMTP id dp10so756886qvb.10 for <32050-done@debbugs.gnu.org>; Wed, 27 May 2020 21:42:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=1AQrUhpXislEW0w6rcY55dDiyXsogoE5TvUp5UwXpLg=; b=mmhXKVomzy/6tgv26eFcqKxgmB6dgqZQ+VeMfKE6RGF1/z0zUoFIisS+hJr5/WPKbW G3sSyADmzsujxQrXVZ0X7JTwGeF5kSrGWW1QL3Prmu8g/boc3jMC6J94rUYxHvLtxsmG yWHkh825Ia4ixuLNfukeiOwt2JWFuoKo8Jjyr/1dusR4Dn7xo4KO+STC2QmJt1SZ8JKY ZUyttErsmebkPexdV/gnHWXr6GzEQtM6vw4jmpvul0ctNTwPfSt2J07903rEItdT3nni EY+y5T2GhbDA08aRCxpDJsAe3JFFs/2qS/A/BDHo5nBlGE06b/fu8lv41KwGFi7k82yf DISA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=1AQrUhpXislEW0w6rcY55dDiyXsogoE5TvUp5UwXpLg=; b=FfiuEZgCagOI/guyVkEDri66wU6Zqtiucg6I8X1zYCnuR1v0Avt9tDUdIFIZqI0HrL 5ehPIiYE42ZE+5a+cFKhRef/4zi2NLueeg8l1QvkB2AEgofkBw4r4IU10dOcQSKB6uJf 7L8AOLJl+LEY5Oo0paO6uElY+X5C8IGB6Gy5q9of2cN2UTEl3Jmk1i/3/OP7p8FcWj1X 2fq9DhPKjwruEsRmhavhXwFI2pHnUE3vuZvyfFIcHXbIxhelKYX7V8gk6GMyr8M+2P0N uqEJX30hxut3S3lUk/mXoeaVpwp9Wk66YHF6e7vGA0K4rkOzNVPc+lkKTTFWKsww4xBS TWEw== X-Gm-Message-State: AOAM533+27aP+gPc49Un+kFl0gB8pe/EAWJbGUUabLZE5+HFvfOR21oA SRJVXfvQpg0P4pB09lqm+GYTytaJlD/Acg== X-Google-Smtp-Source: ABdhPJyVdeFDwLOYTVRLtwua/CCNsHFdu5tkM/1l6z3qzsg5QlWM29Fh8En4/RqLebujlf5jzqZEew== X-Received: by 2002:a0c:fde4:: with SMTP id m4mr1285174qvu.207.1590640949755; Wed, 27 May 2020 21:42:29 -0700 (PDT) Received: from hurd (dsl-10-130-200.b2b2c.ca. [72.10.130.200]) by smtp.gmail.com with ESMTPSA id m10sm4283772qtg.94.2020.05.27.21.42.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 May 2020 21:42:29 -0700 (PDT) From: Maxim Cournoyer To: Mark H Weaver Subject: Re: bug#32050: invoke (guix build utils) error reporting lacking References: <87fu0zkvv9.fsf@apteryx.i-did-not-set--mail-host-address--so-tickle-me> <878t6rkuuf.fsf_-_@gmail.com> <87efginbcz.fsf@netris.org> <87h8l9k9b6.fsf@gmail.com> <87wou3izgf.fsf@gmail.com> Date: Thu, 28 May 2020 00:42:28 -0400 In-Reply-To: <87wou3izgf.fsf@gmail.com> (Maxim Cournoyer's message of "Mon, 09 Jul 2018 22:42:08 -0400") Message-ID: <87h7w0656z.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 32050-done Cc: 32050-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Hello, I think my original observations must have occured in Emacs while using Geiser. It has to do with what (current-output-port) is bound to in the REPL (see: https://github.com/jaor/geiser/issues/83). I'm closing, as I haven't seen this issue in almost 2 years when using Guix from the command line. Maxim From unknown Mon Aug 18 14:15:40 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Thu, 25 Jun 2020 11:24:06 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator