From: ludo@gnu.org (Ludovic Courtès)
To: Hartmut Goebel <h.goebel@crazy-compilers.com>
Cc: help-guix <help-guix@gnu.org>
Subject: Re: Hwo to debug and teacking builds?
Date: Tue, 28 Mar 2017 11:52:16 +0200 [thread overview]
Message-ID: <8737dx7mpb.fsf@gnu.org> (raw)
In-Reply-To: <58DA29EC.30008@crazy-compilers.com> (Hartmut Goebel's message of "Tue, 28 Mar 2017 11:16:28 +0200")
Howdy!
Hartmut Goebel <h.goebel@crazy-compilers.com> skribis:
> when defining a new package, I often find myself spending *a lot* of
> time debugging and tweaking the build. E.g. the if the Makefile needs to
> be modified, or some test-cases adjusted.
>
> How do I "get into" the build container, so I can debug, modify files,
> rebuild and run tests there - in a closed environment (nearly) like the
> build-daemon has?
Most of the time, you don’t need to get into a container. In those
cases, it’s enough to do:
guix build -K foo
# build fails…
cd /tmp/guix-build-foo.drv-0
source ./environment-variables
cd foo-1.2
…
In some cases (for example when you have tests that fail in the build
environment but succeed once you’ve followed the steps above), you
really need a container similar to that created by guix-daemon. In that
case, do:
guix build -K foo
# build fails…
cd /tmp/guix-build-foo.drv-0
guix environment -C foo --ad-hoc strace gdb
rm /bin/sh # to be really like in the guix-daemon environment
source ./environment-variables
cd foo-1.2
$GUIX_ENVIRONMENT/bin/strace -f -o log make check
…
That would probably make a good “Debugging Build Failures” section.
Thoughts?
Ludo’.
next prev parent reply other threads:[~2017-03-28 9:52 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-28 9:16 Hwo to debug and teacking builds? Hartmut Goebel
2017-03-28 9:52 ` Ludovic Courtès [this message]
2017-03-28 13:45 ` Catonano
2017-03-28 16:07 ` ng0
2017-03-28 18:11 ` Catonano
2017-03-28 18:24 ` ng0
2017-04-10 6:39 ` Ricardo Wurmus
2017-04-10 7:19 ` Catonano
2017-03-29 6:10 ` Chris Marusich
2017-03-29 10:36 ` Catonano
2017-04-11 14:15 ` myglc2
2017-04-11 15:40 ` Chris Marusich
2017-04-11 16:36 ` Hartmut Goebel
2017-04-11 19:01 ` myglc2
2017-04-13 1:32 ` Chris Marusich
2017-03-28 15:58 ` Hartmut Goebel
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=8737dx7mpb.fsf@gnu.org \
--to=ludo@gnu.org \
--cc=h.goebel@crazy-compilers.com \
--cc=help-guix@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.