* Bug in strip phase of gnu-build-system?
@ 2022-07-03 5:17 elaexuotee
2022-07-03 11:28 ` Mark H Weaver
2022-07-04 13:18 ` Ludovic Courtès
0 siblings, 2 replies; 5+ messages in thread
From: elaexuotee @ 2022-07-03 5:17 UTC (permalink / raw)
To: guix-devel; +Cc: mhw
Hello,
Sanity check, please.
When `strip-binaries?` is `#f` and a "debug" output is defined, said output
remains empty. Instead, I expect "debug" to get populated with separated debug
files.
The logic for creating debug files exists in (guix build gnu-build-system)
under the definition of `strip`. In particular `strip-dir` extracts the debug
info into "debug" if and only fi that output exists.
Note, that (guix build-system gnu) already removes "debug" from the outputs
when strip-binaries? is true.
However, for some reason the actual `strip-dir1 invocation is wrapped in a (if
strip-binaries? ...) check, meaning that the entire phase becomes a no-op.
Shouldn't that if check be removed?
I have CC'ed Mark Weaver, since it looks like he is the author of this
particular if block.
Cheers,
B. Wilson
P.S.
If the above is correct, then would it make sense for --with-debug-info to also
inject a "debug" output as needed? It looks like this would be pretty easy
under guix/transformations.scm:transforma-package-with-debug-info.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Bug in strip phase of gnu-build-system?
2022-07-03 5:17 Bug in strip phase of gnu-build-system? elaexuotee
@ 2022-07-03 11:28 ` Mark H Weaver
2022-07-04 11:15 ` elaexuotee
2022-07-04 13:18 ` Ludovic Courtès
1 sibling, 1 reply; 5+ messages in thread
From: Mark H Weaver @ 2022-07-03 11:28 UTC (permalink / raw)
To: elaexuotee, guix-devel; +Cc: Ludovic Courtès
Hi,
elaexuotee@wilsonb.com writes:
> Hello,
>
> Sanity check, please.
>
> When `strip-binaries?` is `#f` and a "debug" output is defined, said output
> remains empty. Instead, I expect "debug" to get populated with separated debug
> files.
>
> The logic for creating debug files exists in (guix build gnu-build-system)
> under the definition of `strip`. In particular `strip-dir` extracts the debug
> info into "debug" if and only fi that output exists.
>
> Note, that (guix build-system gnu) already removes "debug" from the outputs
> when strip-binaries? is true.
>
> However, for some reason the actual `strip-dir1 invocation is wrapped in a (if
> strip-binaries? ...) check, meaning that the entire phase becomes a no-op.
> Shouldn't that if check be removed?
>
> I have CC'ed Mark Weaver, since it looks like he is the author of this
> particular if block.
The conditional was originally introduced by Ludovic, here:
https://git.sv.gnu.org/cgit/guix.git/commit/?id=877217b85ac318a0a702578f183dd638c9704112
My role was merely to reformulate the conditional as a 'when' instead of
an 'or', while making an unrelated change in a later commit, here:
https://git.sv.gnu.org/cgit/guix.git/commit/?id=9a87649c863e1ff8b073b356875eb05eecedbcf7
I've never studied this corner of Guix, and I don't have time to do so,
but perhaps Ludovic can respond further.
Regards,
Mark
--
Disinformation flourishes because many people care deeply about injustice
but very few check the facts. Ask me about <https://stallmansupport.org>.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Bug in strip phase of gnu-build-system?
2022-07-03 11:28 ` Mark H Weaver
@ 2022-07-04 11:15 ` elaexuotee
0 siblings, 0 replies; 5+ messages in thread
From: elaexuotee @ 2022-07-04 11:15 UTC (permalink / raw)
To: Mark H Weaver; +Cc: guix-devel, Ludovic Courtès
Mark H Weaver <mhw@netris.org> wrote:
> The conditional was originally introduced by Ludovic, here:
>
> https://git.sv.gnu.org/cgit/guix.git/commit/?id=877217b85ac318a0a702578f183dd638c9704112
>
> My role was merely to reformulate the conditional as a 'when' instead of
> an 'or', while making an unrelated change in a later commit, here:
>
> https://git.sv.gnu.org/cgit/guix.git/commit/?id=9a87649c863e1ff8b073b356875eb05eecedbcf7
>
> I've never studied this corner of Guix, and I don't have time to do so,
> but perhaps Ludovic can respond further.
Whoops. Thank you for the correction.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Bug in strip phase of gnu-build-system?
2022-07-03 5:17 Bug in strip phase of gnu-build-system? elaexuotee
2022-07-03 11:28 ` Mark H Weaver
@ 2022-07-04 13:18 ` Ludovic Courtès
2022-07-04 15:14 ` elaexuotee
1 sibling, 1 reply; 5+ messages in thread
From: Ludovic Courtès @ 2022-07-04 13:18 UTC (permalink / raw)
To: elaexuotee; +Cc: guix-devel, mhw
Hi,
elaexuotee@wilsonb.com skribis:
> When `strip-binaries?` is `#f` and a "debug" output is defined, said output
> remains empty. Instead, I expect "debug" to get populated with separated debug
> files.
Hmm I see. The logic was different: #:strip-binaries? #f disables
stripping, but it doesn’t populate the “debug” output either.
If you want to populate the “debug” output, you need to declare a
“debug” output in the package and keep #:strip-binaries? #t.
(I can see arguments for and against both interpretations, but that’s
how it is currently.)
[...]
> If the above is correct, then would it make sense for --with-debug-info to also
> inject a "debug" output as needed? It looks like this would be pretty easy
> under guix/transformations.scm:transforma-package-with-debug-info.
‘--with-debug-info’ is meant to be used when you want to keep debug info
(and there’s no “debug” output). It seemed to me there’s no point in
having that debug info separate in that case, especially since you
wouldn’t be able to refer to it.
HTH!
Ludo’.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Bug in strip phase of gnu-build-system?
2022-07-04 13:18 ` Ludovic Courtès
@ 2022-07-04 15:14 ` elaexuotee
0 siblings, 0 replies; 5+ messages in thread
From: elaexuotee @ 2022-07-04 15:14 UTC (permalink / raw)
To: Ludovic Courtès; +Cc: guix-devel, mhw
Ludovic Courtès <ludo@gnu.org> wrote:
> Hi,
>
> elaexuotee@wilsonb.com skribis:
>
> > When `strip-binaries?` is `#f` and a "debug" output is defined, said output
> > remains empty. Instead, I expect "debug" to get populated with separated debug
> > files.
>
> Hmm I see. The logic was different: #:strip-binaries? #f disables
> stripping, but it doesn’t populate the “debug” output either.
>
> If you want to populate the “debug” output, you need to declare a
> “debug” output in the package and keep #:strip-binaries? #t.
>
> (I can see arguments for and against both interpretations, but that’s
> how it is currently.)
Oh. Blah. It was something obivous. Hehe. Thank you for cleaing up my
confusion.
I apparently misread `lower` from (guix build-system gnu), thinking it stripped
the "debug" output if #:strip-binaries? is true.
> [...]
>
> > If the above is correct, then would it make sense for --with-debug-info to also
> > inject a "debug" output as needed? It looks like this would be pretty easy
> > under guix/transformations.scm:transforma-package-with-debug-info.
>
> ‘--with-debug-info’ is meant to be used when you want to keep debug info
> (and there’s no “debug” output). It seemed to me there’s no point in
> having that debug info separate in that case, especially since you
> wouldn’t be able to refer to it.
>
> HTH!
Very! Much obliged.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2022-07-04 15:15 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-07-03 5:17 Bug in strip phase of gnu-build-system? elaexuotee
2022-07-03 11:28 ` Mark H Weaver
2022-07-04 11:15 ` elaexuotee
2022-07-04 13:18 ` Ludovic Courtès
2022-07-04 15:14 ` elaexuotee
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.