Mark H Weaver <m...@netris.org> writes:
> ng0 <n...@n0.is> writes:
>> did we ever talk about that there's too little information on how to get
>> the current log file of a failed build? I need this right now (the full log)
>> and I can't remember how, and making use of the log folder in var/log/guix/
>> help either.
> Why won't /var/log/guix help? To see the most recent build logs for a
> given package, say 'icecat', I do this:
> ls -ltr /var/log/guix/drvs/*/*-icecat* | tail
I should also mention a few other ways to find a specific log file:
Most importantly, the file names in /var/log/guix/drvs can be easily
derived from the corresponding derivation (.drv) file name. The first
two characters of hash become the directory name, and the rest becomes
the file name, with ".bz2" added (unless you disabled log compression in
the daemon). Here's an example .drv file and its corresponding log
Note that the .drv file names are printed after "The following
derivations will be built". If you lost the log where that message was
printed, you could run "guix build --dry-run" again, assuming that you
haven't updated Guix since the relevant build attempt.
In typical cases, you might be able to use "guix build --log-file" to
get the log file name, possibly also with "--no-grafts". You can pass
it either a raw store item /gnu/store/... or a package specification.
While I'm at it, here are some other tricks for finding logs of
If you find that the log file contains only a single line of the form:
grafting '/gnu/store/…-foo' -> _
Then it corresponds to a grafted derivation, and you need to find the
original ungrafted derivation. In most cases this can be done by
running "guix build --log-file /gnu/store/…-foo", passing the first file
name from the "grafting" message.
Alternatively, you could look in the .drv file of the grafting
derivation, which will include the file name of the original ungrafted
derivation among its input derivations.