all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: ludo@gnu.org (Ludovic Courtès)
To: Ricardo Wurmus <ricardo.wurmus@mdc-berlin.de>
Cc: guix-devel@gnu.org
Subject: Re: Debugging Guix packages?
Date: Wed, 20 Jan 2016 23:26:14 +0100	[thread overview]
Message-ID: <874me7x4zd.fsf@gnu.org> (raw)
In-Reply-To: <idjio2pbp0v.fsf@bimsb-sys02.mdc-berlin.net> (Ricardo Wurmus's message of "Tue, 19 Jan 2016 15:52:00 +0100")

Ricardo Wurmus <ricardo.wurmus@mdc-berlin.de> skribis:

> Jookia <166291@gmail.com> writes:
>
>> It'd be a nice feature to have where I could step through the build process in
>> an environment close to the actual build and run build commands myself like
>> 'patch' or 'make' or 'configure', but builders can also include Guile code.
>
> We already have “guix environment --{pure,container} pkg” which spawns a
> shell where all declared inputs are available and all environment
> variables are set, but it does lack a method to run build phases.  It
> would be very nice if we had a tool to selectively run build phases as
> defined in the arguments field.

Yes, I agree that this would be nice.

>> Debugging the builder using Guile seems to be somewhat useful but I haven't
>> figured out how to do that as I'm not versed in Guile and this may not be the
>> right level of abstraction.
>
> I have been packaging many applications for Guix and have only felt the
> need for something more advanced than “guix environment” when building
> really large stuff like the icedtea or GCC packages.  These packages
> also have complicated build phases that patch the sources and set
> additional environment variables, and it would have been helpful to have
> a tool to run selected build phases in the current directory.

OTOH, for things like GCC, once you start fiddling with the build tree,
you quickly lose track of what state you’re in.

My workflow has been:

  guix build foo -K
  # build fails
  cd /tmp/guix-build*
  source environment-variables
  # Fiddle with the build tree to get additional info about the problem
  # and a possible fix.
  # Write a phase that hopefully fixes the issue.
  # Try again.

Since the ‘environment-variables’ file always contains the value of
environment variables at the time where the build failed (rather than
their initial value), it usually works quite well.

My 2¢,
Ludo’.

  parent reply	other threads:[~2016-01-20 22:26 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-19  2:42 Debugging Guix packages? Jookia
2016-01-19 14:52 ` Ricardo Wurmus
2016-01-19 15:56   ` Christopher Allan Webber
2016-01-20 22:26   ` Ludovic Courtès [this message]
2016-01-21  0:21     ` Jookia
2016-01-21  1:27       ` Leo Famulari
2016-01-21  1:59       ` Ben Woodcroft
2016-01-21 20:55       ` Ludovic Courtès
2016-01-22  4:13         ` Pjotr Prins
2016-01-22  4:53           ` Jookia
2016-01-22 17:05           ` Ludovic Courtès
2016-01-21 20:58       ` Ludovic Courtès
2016-01-21 22:10         ` Jookia
2016-01-21 22:28     ` Christopher Allan Webber

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=874me7x4zd.fsf@gnu.org \
    --to=ludo@gnu.org \
    --cc=guix-devel@gnu.org \
    --cc=ricardo.wurmus@mdc-berlin.de \
    /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.