* how to get the path of the logfile after an unsuccesful build?
@ 2018-03-09 9:15 ng0
2018-03-09 13:52 ` Ricardo Wurmus
` (2 more replies)
0 siblings, 3 replies; 17+ messages in thread
From: ng0 @ 2018-03-09 9:15 UTC (permalink / raw)
To: guix-devel
Hi,
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/ won't
help either.
--
A88C8ADD129828D7EAC02E52E22F9BBFEE348588
https://n0.is/~ng0
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: how to get the path of the logfile after an unsuccesful build?
2018-03-09 9:15 how to get the path of the logfile after an unsuccesful build? ng0
@ 2018-03-09 13:52 ` Ricardo Wurmus
2018-03-09 14:06 ` ng0
2018-03-09 21:49 ` Mark H Weaver
2018-03-11 6:28 ` Catonano
2 siblings, 1 reply; 17+ messages in thread
From: Ricardo Wurmus @ 2018-03-09 13:52 UTC (permalink / raw)
To: ng0; +Cc: guix-devel
ng0 <ng0@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/ won't
> help either.
The daemon doesn’t keep logs for failed builds.
--
Ricardo
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: how to get the path of the logfile after an unsuccesful build?
2018-03-09 13:52 ` Ricardo Wurmus
@ 2018-03-09 14:06 ` ng0
2018-03-09 14:28 ` Clément Lassieur
2018-03-09 14:44 ` Hartmut Goebel
0 siblings, 2 replies; 17+ messages in thread
From: ng0 @ 2018-03-09 14:06 UTC (permalink / raw)
To: Ricardo Wurmus; +Cc: guix-devel, ng0
Ricardo Wurmus transcribed 358 bytes:
>
> ng0 <ng0@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/ won't
> > help either.
>
> The daemon doesn’t keep logs for failed builds.
>
> --
> Ricardo
So how are we supposed to figure out failures then that happen outside of the length of
the terminal scrollback? Of course I could run it in tmux, but having log files to
share of the failed build comes in handy when debugging builds with upstream/downstream
projects.
--
A88C8ADD129828D7EAC02E52E22F9BBFEE348588
https://n0.is/~ng0
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: how to get the path of the logfile after an unsuccesful build?
2018-03-09 14:06 ` ng0
@ 2018-03-09 14:28 ` Clément Lassieur
2018-03-09 14:39 ` ng0
2018-03-09 14:44 ` Hartmut Goebel
1 sibling, 1 reply; 17+ messages in thread
From: Clément Lassieur @ 2018-03-09 14:28 UTC (permalink / raw)
To: ng0; +Cc: guix-devel
ng0 <ng0@n0.is> writes:
> Ricardo Wurmus transcribed 358 bytes:
>>
>> ng0 <ng0@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/ won't
>> > help either.
>>
>> The daemon doesn’t keep logs for failed builds.
>>
>> --
>> Ricardo
>
> So how are we supposed to figure out failures then that happen outside of the length of
> the terminal scrollback? Of course I could run it in tmux, but having log files to
> share of the failed build comes in handy when debugging builds with upstream/downstream
> projects.
Can't you redirect the output to a file?
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: how to get the path of the logfile after an unsuccesful build?
2018-03-09 14:28 ` Clément Lassieur
@ 2018-03-09 14:39 ` ng0
0 siblings, 0 replies; 17+ messages in thread
From: ng0 @ 2018-03-09 14:39 UTC (permalink / raw)
To: Clément Lassieur; +Cc: guix-devel, ng0
Clément Lassieur transcribed 766 bytes:
> ng0 <ng0@n0.is> writes:
>
> > Ricardo Wurmus transcribed 358 bytes:
> >>
> >> ng0 <ng0@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/ won't
> >> > help either.
> >>
> >> The daemon doesn’t keep logs for failed builds.
> >>
> >> --
> >> Ricardo
> >
> > So how are we supposed to figure out failures then that happen outside of the length of
> > the terminal scrollback? Of course I could run it in tmux, but having log files to
> > share of the failed build comes in handy when debugging builds with upstream/downstream
> > projects.
>
> Can't you redirect the output to a file?
guix build hello 2>&1 | tee output.txt
would work of course, but why throw away the logs when we could just save them?
It seems not very developer friendly to me. This way I will just write another
script that wraps around guix build and saves all my build logs to a location.
I think guix should handle this by default unless there are good reasons not to
do it.
--
A88C8ADD129828D7EAC02E52E22F9BBFEE348588
https://n0.is/~ng0
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: how to get the path of the logfile after an unsuccesful build?
2018-03-09 14:06 ` ng0
2018-03-09 14:28 ` Clément Lassieur
@ 2018-03-09 14:44 ` Hartmut Goebel
2018-03-09 14:49 ` ng0
` (2 more replies)
1 sibling, 3 replies; 17+ messages in thread
From: Hartmut Goebel @ 2018-03-09 14:44 UTC (permalink / raw)
To: guix-devel
Am 09.03.2018 um 15:06 schrieb ng0:
> The daemon doesn’t keep logs for failed builds.
I asked this a few month ago and was told this is a bug.
--
Regards
Hartmut Goebel
| Hartmut Goebel | h.goebel@crazy-compilers.com |
| www.crazy-compilers.com | compilers which you thought are impossible |
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: how to get the path of the logfile after an unsuccesful build?
2018-03-09 9:15 how to get the path of the logfile after an unsuccesful build? ng0
2018-03-09 13:52 ` Ricardo Wurmus
@ 2018-03-09 21:49 ` Mark H Weaver
2018-03-12 0:55 ` Mark H Weaver
2018-03-11 6:28 ` Catonano
2 siblings, 1 reply; 17+ messages in thread
From: Mark H Weaver @ 2018-03-09 21:49 UTC (permalink / raw)
To: guix-devel
ng0 <ng0@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/ won't
> 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
This might not work for offloaded builds, though.
Mark
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: how to get the path of the logfile after an unsuccesful build?
2018-03-09 21:49 ` Mark H Weaver
@ 2018-03-12 0:55 ` Mark H Weaver
2018-03-23 4:54 ` Chris Marusich
0 siblings, 1 reply; 17+ messages in thread
From: Mark H Weaver @ 2018-03-12 0:55 UTC (permalink / raw)
To: guix-devel
Mark H Weaver <mhw@netris.org> writes:
> ng0 <ng0@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/ won't
>> 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
file:
_________/gnu/store/8110245r80b1rqpjlf3x33k96h1f8gms-linux-libre-4.15.8.drv
/var/log/guix/drvs/81/10245r80b1rqpjlf3x33k96h1f8gms-linux-libre-4.15.8.drv.bz2
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
_successful_ builds:
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.
Mark
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: how to get the path of the logfile after an unsuccesful build?
2018-03-12 0:55 ` Mark H Weaver
@ 2018-03-23 4:54 ` Chris Marusich
0 siblings, 0 replies; 17+ messages in thread
From: Chris Marusich @ 2018-03-23 4:54 UTC (permalink / raw)
To: Mark H Weaver; +Cc: guix-devel
[-- Attachment #1: Type: text/plain, Size: 1234 bytes --]
ludo@gnu.org (Ludovic Courtès) writes:
> Hartmut Goebel <h.goebel@crazy-compilers.com> skribis:
>
>> Am 09.03.2018 um 15:06 schrieb ng0:
>>> The daemon doesn’t keep logs for failed builds.
>>
>> I asked this a few month ago and was told this is a bug.
>
> It does keep build logs even for aborted and failed builds. If you have
> evidence that it doesn’t, then please report it. :-)
Can these be readily accessed via "guix build --log-file", or does one
have to go spelunking in one's file system to find them?
Mark H Weaver <mhw@netris.org> writes:
> 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.
In this case, you can actually just add --no-grafts to the invocation,
as in:
guix build --no-grafts --log-file guile
This will show you the log of the build, before applying any grafts.
--
Chris
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: how to get the path of the logfile after an unsuccesful build?
2018-03-09 9:15 how to get the path of the logfile after an unsuccesful build? ng0
2018-03-09 13:52 ` Ricardo Wurmus
2018-03-09 21:49 ` Mark H Weaver
@ 2018-03-11 6:28 ` Catonano
2018-03-11 6:46 ` Catonano
2018-03-11 8:11 ` ng0
2 siblings, 2 replies; 17+ messages in thread
From: Catonano @ 2018-03-11 6:28 UTC (permalink / raw)
To: guix-devel
[-- Attachment #1: Type: text/plain, Size: 539 bytes --]
2018-03-09 10:15 GMT+01:00 ng0 <ng0@n0.is>:
> Hi,
>
> 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/ won't
> help either.
last time I needed to see a build log, I think it was the "-K" option
passed to guix build
If the build fails, you'll see a line at the end, in the terminal,
reminding you that the build log is reachable at a certain location
[-- Attachment #2: Type: text/html, Size: 912 bytes --]
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: how to get the path of the logfile after an unsuccesful build?
2018-03-11 6:28 ` Catonano
@ 2018-03-11 6:46 ` Catonano
2018-03-11 11:12 ` Ricardo Wurmus
2018-03-11 8:11 ` ng0
1 sibling, 1 reply; 17+ messages in thread
From: Catonano @ 2018-03-11 6:46 UTC (permalink / raw)
To: guix-devel
[-- Attachment #1: Type: text/plain, Size: 816 bytes --]
2018-03-11 7:28 GMT+01:00 Catonano <catonano@gmail.com>:
>
>
> 2018-03-09 10:15 GMT+01:00 ng0 <ng0@n0.is>:
>
>> Hi,
>>
>> 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/ won't
>> help either.
>
>
> last time I needed to see a build log, I think it was the "-K" option
> passed to guix build
>
> If the build fails, you'll see a line at the end, in the terminal,
> reminding you that the build log is reachable at a certain location
>
>
>
Look, there's a manual page about that !
https://www.gnu.org/software/guix/manual/html_node/Debugging-Build-Failures.html#Debugging-Build-Failures
Are we talking about the same thing ?
[-- Attachment #2: Type: text/html, Size: 1671 bytes --]
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: how to get the path of the logfile after an unsuccesful build?
2018-03-11 6:28 ` Catonano
2018-03-11 6:46 ` Catonano
@ 2018-03-11 8:11 ` ng0
1 sibling, 0 replies; 17+ messages in thread
From: ng0 @ 2018-03-11 8:11 UTC (permalink / raw)
To: Catonano; +Cc: guix-devel
Catonano transcribed 1.7K bytes:
> 2018-03-09 10:15 GMT+01:00 ng0 <ng0@n0.is>:
>
> > Hi,
> >
> > 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/ won't
> > help either.
>
>
> last time I needed to see a build log, I think it was the "-K" option
> passed to guix build
>
> If the build fails, you'll see a line at the end, in the terminal,
> reminding you that the build log is reachable at a certain location
Yes, I know. Which is why I got confused, it wasn't there as many times
as I repeated the build. I see if I can reproduce this and open a bug.
--
A88C8ADD129828D7EAC02E52E22F9BBFEE348588
https://n0.is/~ng0
^ permalink raw reply [flat|nested] 17+ messages in thread
end of thread, other threads:[~2018-03-23 4:54 UTC | newest]
Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-03-09 9:15 how to get the path of the logfile after an unsuccesful build? ng0
2018-03-09 13:52 ` Ricardo Wurmus
2018-03-09 14:06 ` ng0
2018-03-09 14:28 ` Clément Lassieur
2018-03-09 14:39 ` ng0
2018-03-09 14:44 ` Hartmut Goebel
2018-03-09 14:49 ` ng0
2018-03-09 15:28 ` Clément Lassieur
2018-03-10 15:31 ` Ludovic Courtès
2018-03-10 22:29 ` Ricardo Wurmus
2018-03-09 21:49 ` Mark H Weaver
2018-03-12 0:55 ` Mark H Weaver
2018-03-23 4:54 ` Chris Marusich
2018-03-11 6:28 ` Catonano
2018-03-11 6:46 ` Catonano
2018-03-11 11:12 ` Ricardo Wurmus
2018-03-11 8:11 ` ng0
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).