guix-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Debugging Guix packages?


From: Ludovic Courtès
Subject: Re: Debugging Guix packages?
Date: Wed, 20 Jan 2016 23:26:14 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux)

Ricardo Wurmus <address@hidden> skribis:

> Jookia <address@hidden> 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’.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]