From mboxrd@z Thu Jan 1 00:00:00 1970 From: Maxim Cournoyer Subject: bug#32050: invoke (guix build utils) error reporting lacking Date: Mon, 09 Jul 2018 22:42:08 -0400 Message-ID: <87wou3izgf.fsf@gmail.com> 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> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:60678) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fcicM-0003tf-QR for bug-guix@gnu.org; Mon, 09 Jul 2018 22:43:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fcicI-0007i3-PT for bug-guix@gnu.org; Mon, 09 Jul 2018 22:43:06 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:45024) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fcicI-0007hy-KT for bug-guix@gnu.org; Mon, 09 Jul 2018 22:43:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1fcicI-0001GO-AY for bug-guix@gnu.org; Mon, 09 Jul 2018 22:43:02 -0400 Sender: "Debbugs-submit" Resent-Message-ID: In-Reply-To: <87h8l9k9b6.fsf@gmail.com> (Maxim Cournoyer's message of "Sun, 08 Jul 2018 11:59:25 -0400") List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+gcggb-bug-guix=m.gmane.org@gnu.org Sender: "bug-Guix" To: Mark H Weaver Cc: 32050@debbugs.gnu.org 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