bug#71211: %guile-static-stripped crashes with a sigsegv (i.e. the guile used in the initrd (?))

2024-05-26 Thread Attila Lendvai
root symptom:
-

i think this is the guile binary that is used in initrd. it's been a while i 
noted this bug. but if it's so, then if error happens early in the boot, then 
it just dies with a sigsegv; i.e. it's a major hindrance to debuggability.


reproducer:
---

guix shell -e '(begin (use-modules (gnu packages make-bootstrap)) 
%guile-static-stripped)'

and then start guile. or alternatively:

guile -c '(use-modules (ice-9 readline))'


analysis:
-

make-guile-static-stripped calls (remove-store-references guile2) without 
checking the return code.

if i remove that call, then building fails with: "... is not allowed to refer 
to path `/gnu/store/3zl03prdg07ax4dny78hrzykillr6vcy-glibc-2.35'"
 
i.e. there's some reference in the binary to glibc, which is corrupted by 
remove-store-references.

i'm not sure this is the cause, but i suspect.

note that the `guile --version` test in make-guile-static-stripped runs fine; 
i.e. it's an insufficient test.

-- 
• attila lendvai
• PGP: 963F 5D5F 45C7 DFCD 0A39
--
“How much truth can a spirit bear, how much truth can a spirit dare? […] that 
became for me more and more the real measure of value.”
— Friedrich Nietzsche (1844–1900)






bug#70943: linux-libre is not reproducible (regression)

2024-05-26 Thread Maxim Cournoyer
Hi,

Maxim Cournoyer  writes:

> Hello,
>
> I've investigated non-determinism in our linux-libre package, which
> sadly appears to have regressed in that regard since I last looked into
> it 3 years ago (see commit 01ea70a29c5c1ded31c37ce8c43192bc1956b2ca
> ("gnu: linux-libre: Make build reproducible.")).
>
> I'm currently seeing these differing files:
>
> $ diff -ql 
> /gnu/store/6vx6vkranmggv690ggm79zhdhwvmbji9-linux-libre-6.8.9{,-check}
> Files /gnu/store/6vx6vkranmggv690ggm79zhdhwvmbji9-linux-libre-6.8.9/bzImage 
> and 
> /gnu/store/6vx6vkranmggv690ggm79zhdhwvmbji9-linux-libre-6.8.9-check/bzImage 
> differ
> Common subdirectories: 
> /gnu/store/6vx6vkranmggv690ggm79zhdhwvmbji9-linux-libre-6.8.9/lib and 
> /gnu/store/6vx6vkranmggv690ggm79zhdhwvmbji9-linux-libre-6.8.9-check/lib
> Common subdirectories: 
> /gnu/store/6vx6vkranmggv690ggm79zhdhwvmbji9-linux-libre-6.8.9/share and 
> /gnu/store/6vx6vkranmggv690ggm79zhdhwvmbji9-linux-libre-6.8.9-check/share
> Files 
> /gnu/store/6vx6vkranmggv690ggm79zhdhwvmbji9-linux-libre-6.8.9/System.map and 
> /gnu/store/6vx6vkranmggv690ggm79zhdhwvmbji9-linux-libre-6.8.9-check/System.map
>  differ
>
> I'll take a look at what Yocto does differently, if anything.

I didn't see anything special, although some BPF switches got turned on
in the kernel by default in newer 6.X releases, and BPF appears to
introduce non-determinism, accordingy to the Reproducible Builds website
which says this [0]:

   Several distributions noticed recent versions of the Linux Kernel are
   no longer reproducible because the BPF Type Format (BTF) metadata is
   not generated in a deterministic way. This was discussed on the
   #reproducible-builds IRC channel, but no solution appears to be in
   sight for now.

[0]  https://reproducible-builds.org/reports/2023-04/

So it seems there'll need to be some reproducibility work for that
feature in the kernel before it can be resolved (we could also disable
all BPF features, but that seems counter-current at this point in time).

-- 
Thanks,
Maxim





bug#71133: linux-libre-guix.tar.xz CI times out on aarch64-linux

2024-05-26 Thread Christopher Baines
Richard Sent  writes:

> On aarch64 platforms, the linux-libre-guix.tar.xz.drv build times out
> [1].
>
> This package is known to have a long build time [2].
>
> Users can work around this by running the build locally with a (very,
> very large) max-silent-time (~28800 seconds on my machine). Given the
> impact of this issue (unable to build linux-libre on 64-bit Arm without
> running a multi-hour build), I think it's worth revisiting if the
> substitute server timeout should be increased again.
>
> Alternatively, perhaps we could fetch the officially released
> Linux-libre tarballs instead of computing them ourselves [3].
>
> [1]: https://ci.guix.gnu.org/build/4711550/log/raw
> [2]: https://mail.gnu.org/archive/html/guix-devel/2021-08/msg00077.html
> [3]: http://linux-libre.fsfla.org/pub/linux-libre/releases/
>
> CC'ing Christopher Baines since this deals with substitutes.

This derivation seems to have been built fine by the bordeaux build
farm:

  
https://data.guix.gnu.org/gnu/store/ny56fdcig9cd9bd3pssmlraz2c1q10q8-linux-libre-6.8.10-guix.tar.xz.drv

This is the timeout configuration for the bordeaux ARM build machines:

  (max-silent-time (* 12 3600))
  (timeout (* 72 3600))

e.g. 
https://git.savannah.gnu.org/cgit/guix/maintenance.git/tree/hydra/hatysa.scm#n262

The ci.guix.gnu.org Honeycomb timeouts are different, but don't look too
short. Maybe this build happened on an Overdrive system though.


signature.asc
Description: PGP signature


bug#71133: linux-libre-guix.tar.xz CI times out on aarch64-linux

2024-05-26 Thread Richard Sent
Christopher Baines  writes:

> This derivation seems to have been built fine by the bordeaux build
> farm:
>
>   
> https://data.guix.gnu.org/gnu/store/ny56fdcig9cd9bd3pssmlraz2c1q10q8-linux-libre-6.8.10-guix.tar.xz.drv

You're right. It looks like the derivation itself built fine based on
that, but something seems off when the nar is sent. Assuming I
understand the following correctly:

--8<---cut here---start->8---
~/code/cloned/guix/guix $ guix build linux-libre --system=aarch64-linux
substitute: updating substitutes from 'http://10.1.2.2:80'... 100.0%
substitute: updating substitutes from 'https://bordeaux.guix.gnu.org'... 100.0%
substitute: updating substitutes from 'https://ci.guix.gnu.org'... 100.0%
The following derivations will be built:
  /gnu/store/v471590wpsw1fcnqrrr9bwh52skbb5rn-linux-libre-6.8.10.drv
  /gnu/store/1wi10rg7236ck8k5vdrdfap5l7a9s9z0-linux-libre-6.8.10-guix.tar.xz.drv
143.1 MB will be downloaded:
  /gnu/store/y813phs2n9xnb7zbcr07g0j9509bzbsb-linux-libre-6.8.10-guix.tar.xz
substituting 
/gnu/store/y813phs2n9xnb7zbcr07g0j9509bzbsb-linux-libre-6.8.10-guix.tar.xz...
downloading from 
https://bordeaux.guix.gnu.org/nar/none/y813phs2n9xnb7zbcr07g0j9509bzbsb-linux-libre-6.8.10-guix.tar.xz
 ...
 linux-libre-6.8.10-guix.tar.xz  136.5MiB   
   23.9MiB/s 00:06 ▕█▋▏  
98.0%guix substitute: error: corrupt input while restoring 
'/gnu/store/y813phs2n9xnb7zbcr07g0j9509bzbsb-linux-libre-6.8.10-guix.tar.xz' 
from #
substitution of 
/gnu/store/y813phs2n9xnb7zbcr07g0j9509bzbsb-linux-libre-6.8.10-guix.tar.xz 
failed
guix build: error: some substitutes for the outputs of derivation 
`/gnu/store/ny56fdcig9cd9bd3pssmlraz2c1q10q8-linux-libre-6.8.10-guix.tar.xz.drv'
 failed (usually happens due to networking issues); try `--fallback' to build 
derivation from source 
--8<---cut here---end--->8---

Even though the derivation was built, the substitution fails.

Just for fun, here's the output on a ARM64-native system:

--8<---cut here---start->8---
root@caustic ~# guix build linux-libre  
substitute: updating substitutes from 'http://10.1.2.2:80'... 100.0%
substitute: updating substitutes from 'https://bordeaux.guix.gnu.org'... 100.0%
substitute: updating substitutes from 'https://ci.guix.gnu.org'... 100.0%
The following derivations will be built:
  /gnu/store/v471590wpsw1fcnqrrr9bwh52skbb5rn-linux-libre-6.8.10.drv
  /gnu/store/1wi10rg7236ck8k5vdrdfap5l7a9s9z0-linux-libre-6.8.10-guix.tar.xz.drv
143.1 MB will be downloaded:
  /gnu/store/y813phs2n9xnb7zbcr07g0j9509bzbsb-linux-libre-6.8.10-guix.tar.xz
substituting 
/gnu/store/0jfsx4hljddyand45z7i77ynpvr0mhb5-module-import-compiled...
downloading from 
http://10.1.2.2/nar/zstd/0jfsx4hljddyand45z7i77ynpvr0mhb5-module-import-compiled
 ...
 module-import-compiled 
   4.2MiB/s 00:00 | 244KiB transferred

substituting /gnu/store/fwqy5d6xyar9x5yksny79r2d519s25cx-100gnu+freedo.patch...
downloading from 
http://10.1.2.2/nar/zstd/fwqy5d6xyar9x5yksny79r2d519s25cx-100gnu%2Bfreedo.patch 
...
 100gnu%2Bfreedo.patch  
1.8MiB/s 00:00 | 46KiB transferred

substituting 
/gnu/store/y813phs2n9xnb7zbcr07g0j9509bzbsb-linux-libre-6.8.10-guix.tar.xz...
downloading from 
https://bordeaux.guix.gnu.org/nar/none/y813phs2n9xnb7zbcr07g0j9509bzbsb-linux-libre-6.8.10-guix.tar.xz
 ...
 linux-libre-6.8.10-guix.tar.xz  136.5MiB   
1.7MiB/s 01:21 ▕█▉▏  
99.9%guix substitute: error: corrupt input while restoring 
'/gnu/store/y813phs2n9xnb7zbcr07g0j9509bzbsb-linux-libre-6.8.10-guix.tar.xz' 
from #
substitution of 
/gnu/store/y813phs2n9xnb7zbcr07g0j9509bzbsb-linux-libre-6.8.10-guix.tar.xz 
failed
guix build: error: corrupt input while restoring archive from #
--8<---cut here---end--->8---

-- 
Take it easy,
Richard Sent
Making my computer weirder one commit at a time.





bug#71133: linux-libre-guix.tar.xz CI times out on aarch64-linux

2024-05-26 Thread Christopher Baines
Richard Sent  writes:

> Christopher Baines  writes:
>
>> This derivation seems to have been built fine by the bordeaux build
>> farm:
>>
>>   
>> https://data.guix.gnu.org/gnu/store/ny56fdcig9cd9bd3pssmlraz2c1q10q8-linux-libre-6.8.10-guix.tar.xz.drv
>
> You're right. It looks like the derivation itself built fine based on
> that, but something seems off when the nar is sent. Assuming I
> understand the following correctly:
>
> --8<---cut here---start->8---
> ~/code/cloned/guix/guix $ guix build linux-libre --system=aarch64-linux
> substitute: updating substitutes from 'http://10.1.2.2:80'... 100.0%
> substitute: updating substitutes from 'https://bordeaux.guix.gnu.org'... 
> 100.0%
> substitute: updating substitutes from 'https://ci.guix.gnu.org'... 100.0%
> The following derivations will be built:
>   /gnu/store/v471590wpsw1fcnqrrr9bwh52skbb5rn-linux-libre-6.8.10.drv
>   
> /gnu/store/1wi10rg7236ck8k5vdrdfap5l7a9s9z0-linux-libre-6.8.10-guix.tar.xz.drv
> 143.1 MB will be downloaded:
>   /gnu/store/y813phs2n9xnb7zbcr07g0j9509bzbsb-linux-libre-6.8.10-guix.tar.xz
> substituting 
> /gnu/store/y813phs2n9xnb7zbcr07g0j9509bzbsb-linux-libre-6.8.10-guix.tar.xz...
> downloading from 
> https://bordeaux.guix.gnu.org/nar/none/y813phs2n9xnb7zbcr07g0j9509bzbsb-linux-libre-6.8.10-guix.tar.xz
>  ...
>  linux-libre-6.8.10-guix.tar.xz  136.5MiB 
>  23.9MiB/s 00:06 ▕█▋▏  
> 98.0%guix substitute: error: corrupt input while restoring 
> '/gnu/store/y813phs2n9xnb7zbcr07g0j9509bzbsb-linux-libre-6.8.10-guix.tar.xz' 
> from #
> substitution of 
> /gnu/store/y813phs2n9xnb7zbcr07g0j9509bzbsb-linux-libre-6.8.10-guix.tar.xz 
> failed
> guix build: error: some substitutes for the outputs of derivation 
> `/gnu/store/ny56fdcig9cd9bd3pssmlraz2c1q10q8-linux-libre-6.8.10-guix.tar.xz.drv'
>  failed (usually happens due to networking issues); try `--fallback' to build 
> derivation from source 
> --8<---cut here---end--->8---
>
> Even though the derivation was built, the substitution fails.

Yeah, something's up here specifically with the bordeaux build farm,
feel free to open a new issue.

You can tell something is wrong just by looking at the narinfo:

  https://bordeaux.guix.gnu.org/y813phs2n9xnb7zbcr07g0j9509bzbsb.narinfo

Given there's no compression here, the file size should be the same as
the nar size, but it's not, it's missing a few bytes.


signature.asc
Description: PGP signature


bug#71214: bordeaux linux-libre-6.8.10-guix.tar.gz corrupt nar

2024-05-26 Thread Richard Sent
Hi Guix!

The nar for
/gnu/store/y813phs2n9xnb7zbcr07g0j9509bzbsb-linux-libre-6.8.10-guix.tar.xz
on Bordeaux seems to have been corrupted by some mechanism. The URL in
question is

> URL: nar/none/y813phs2n9xnb7zbcr07g0j9509bzbsb-linux-libre-6.8.10-guix.tar.xz

>From comments by cbaines on an earlier issue [1] that had misdiagnosed
the problem:

> Yeah, something's up here specifically with the bordeaux build farm,
> feel free to open a new issue.
> 
> You can tell something is wrong just by looking at the narinfo:
> 
>   https://bordeaux.guix.gnu.org/y813phs2n9xnb7zbcr07g0j9509bzbsb.narinfo
> 
> Given there's no compression here, the file size should be the same as
> the nar size, but it's not, it's missing a few bytes.

For reference:

> NarSize: 143081664
> Compression: none
> FileSize: 143081472

On a related note, whatever issue is going on here seems to cause [2].
The actual issues are distinct.

[1]: https://issues.guix.gnu.org/71133
[2]: https://issues.guix.gnu.org/71160
-- 
Take it easy,
Richard Sent
Making my computer weirder one commit at a time.





bug#71133: linux-libre-guix.tar.xz CI times out on aarch64-linux

2024-05-26 Thread Richard Sent
New issue opened at https://issues.guix.gnu.org/71214. I'l close this
one. Thanks!

-- 
Take it easy,
Richard Sent
Making my computer weirder one commit at a time.





bug#71217: gnu: home: dotfiles: Files not excluded when they should

2024-05-26 Thread Nicolas Odermatt-Lemay
Hello,

While attempting to setup home-dotfiles-service, I noticed that some files
were being symlinked even though they were in the variable
`%home-dotfiles-excluded', such as all the files of the .git directory.

This patch seems to fix the problem :

diff --git a/gnu/home/services/dotfiles.scm b/gnu/home/services/dotfiles.scm
index 823bdb03fb..38f7ff83d0 100644
--- a/gnu/home/services/dotfiles.scm
+++ b/gnu/home/services/dotfiles.scm
@@ -45,7 +45,7 @@ (define-module (gnu home services dotfiles)
 (define %home-dotfiles-excluded
   '(".*~"
 ".*\\.swp"
-"\\.git"
+"\\.git/.*"
 "\\.gitignore"))

 (define %home-dotfiles-layouts
@@ -138,8 +138,7 @@ (define* (directory-contents directory #:key (packages
#f))
 (define (filter-files directory)
   (find-files directory
   (lambda (file stat)
-(not (regexp-exec exclusion-rx
-  (basename file))
+(not (regexp-exec exclusion-rx file)
 (if (and stow? packages (maybe-value-set? packages))
 (append-map filter-files
 (map (lambda (pkg)


bug#64734: Recursive hackage import fails

2024-05-26 Thread Saku Laesvuori via Bug reports for GNU Guix
> Hi,
> 
> > $ guix import hackage linear-generics --recursive
> 
> have you ever figured out what caused this?

Yes, I fixed it in https://issues.guix.gnu.org/67564 so this issue can
now be closed.

- Saku


signature.asc
Description: PGP signature


bug#64734: Recursive hackage import fails

2024-05-26 Thread Saku Laesvuori via Bug reports for GNU Guix
close 64734
thanks


signature.asc
Description: PGP signature


bug#70349: Clang fails to communicate RUNPATH?

2024-05-26 Thread Liliana Marie Prikler
Hi Ludo,

Am Samstag, dem 25.05.2024 um 11:26 +0200 schrieb Ludovic Courtès:
> Could this be an issue specific to ‘meson-build-system’?
> 
> For instance, this works fine (both mpfr and mpc use
> ‘gnu-build-system’):
> 
>   guix build mpc --with-c-toolchain=mpfr=clang-toolchain
> 
> If we add this to the example you posted:
> 
>    (arguments
>     (list #:phases #~(modify-phases %standard-phases
>    (add-after 'unpack 'debug-ld-wrapper
>  (lambda _
>    (setenv "GUIX_LD_WRAPPER_DEBUG"
> "yes"))
> 
> … we see:
> 
> --8<---cut here---start->8---
> ld-wrapper: library search path:
> ("/gnu/store/l684qgqlrqkbsh8jffp9d8ag6vrpcwgs-gcc-11.3.0-
> lib/lib/gcc/x86_64-unknown-linux-gnu/11.3.0"
> "/gnu/store/gsjczqir1wbz8p770zndrpw4rnppmxi3-glibc-2.35/lib"
> "/gnu/store/l684qgqlrqkbsh8jffp9d8ag6vrpcwgs-gcc-11.3.0-
> lib/lib/gcc/x86_64-unknown-linux-gnu/11.3.0/../../.."
> "/gnu/store/inpy5mz35fwvclynpag5gsp6d1hflfsz-meson-1.1.0/lib"
> "/gnu/store/qhz8n6mxzalifcrml6fwsvnxw92bk7n0-fmt-9.1.0/lib"
> "/gnu/store/j8wlfmlmfvpbza6is9wv9xsd8psrxn00-bzip2-1.0.8/lib"
> "/gnu/store/gr0sy0m1mv36qv54idm6cn10l3mngshq-file-5.44/lib"
> "/gnu/store/hc05d76f1j3iz3v2bs5jz4fpljl1r4dj-gawk-5.2.1/lib"
> "/gnu/store/6k1yys9wqrfn4y41ic1win8gpnimncwj-xz-5.2.8/lib"
> "/gnu/store/visfdda934gvivwihwhlm63fdqhhcc8a-glibc-utf8-locales-
> 2.35/lib" "/gnu/store/0irvg0gvvfwagdjckigvr4g8xap94y1j-clang-
> toolchain-18.1.5/lib")
> ld-wrapper: libraries linked:
> ("/gnu/store/qhz8n6mxzalifcrml6fwsvnxw92bk7n0-fmt-
> 9.1.0/lib/libfmt.so" "/gnu/store/l684qgqlrqkbsh8jffp9d8ag6vrpcwgs-
> gcc-11.3.0-lib/lib/gcc/x86_64-unknown-linux-
> gnu/11.3.0/../../../libstdc++.so"
> "/gnu/store/gsjczqir1wbz8p770zndrpw4rnppmxi3-glibc-2.35/lib/libm.so"
> "/gnu/store/l684qgqlrqkbsh8jffp9d8ag6vrpcwgs-gcc-11.3.0-
> lib/lib/gcc/x86_64-unknown-linux-gnu/11.3.0/../../../libgcc_s.so"
> "/gnu/store/gsjczqir1wbz8p770zndrpw4rnppmxi3-glibc-2.35/lib/libc.so"
> "/gnu/store/l684qgqlrqkbsh8jffp9d8ag6vrpcwgs-gcc-11.3.0-
> lib/lib/gcc/x86_64-unknown-linux-gnu/11.3.0/../../../libgcc_s.so")
> ld-wrapper: invoking `/gnu/store/zh4x65snfis7svs6906gj1z8i7dx2j3m-
> binutils-2.38/bin/ld' with ("--eh-frame-hdr" "-m" "elf_x86_64" "-pie"
> "-dynamic-linker" "//gnu/store/gsjczqir1wbz8p770zndrpw4rnppmxi3-
> glibc-2.35/lib/ld-linux-x86-64.so.2" "-o" "hello"
> "/gnu/store/gsjczqir1wbz8p770zndrpw4rnppmxi3-glibc-2.35/lib/Scrt1.o"
> "/gnu/store/gsjczqir1wbz8p770zndrpw4rnppmxi3-glibc-2.35/lib/crti.o"
> "/gnu/store/l684qgqlrqkbsh8jffp9d8ag6vrpcwgs-gcc-11.3.0-
> lib/lib/gcc/x86_64-unknown-linux-gnu/11.3.0/crtbeginS.o" "-
> L/gnu/store/l684qgqlrqkbsh8jffp9d8ag6vrpcwgs-gcc-11.3.0-
> lib/lib/gcc/x86_64-unknown-linux-gnu/11.3.0" "-
> L/gnu/store/gsjczqir1wbz8p770zndrpw4rnppmxi3-glibc-2.35/lib" "-
> L/gnu/store/l684qgqlrqkbsh8jffp9d8ag6vrpcwgs-gcc-11.3.0-
> lib/lib/gcc/x86_64-unknown-linux-gnu/11.3.0/../../.." "-
> L/gnu/store/inpy5mz35fwvclynpag5gsp6d1hflfsz-meson-1.1.0/lib" "-
> L/gnu/store/qhz8n6mxzalifcrml6fwsvnxw92bk7n0-fmt-9.1.0/lib" "-
> L/gnu/store/j8wlfmlmfvpbza6is9wv9xsd8psrxn00-bzip2-1.0.8/lib" "-
> L/gnu/store/gr0sy0m1mv36qv54idm6cn10l3mngshq-file-5.44/lib" "-
> L/gnu/store/hc05d76f1j3iz3v2bs5jz4fpljl1r4dj-gawk-5.2.1/lib" "-
> L/gnu/store/6k1yys9wqrfn4y41ic1win8gpnimncwj-xz-5.2.8/lib" "-
> L/gnu/store/visfdda934gvivwihwhlm63fdqhhcc8a-glibc-utf8-locales-
> 2.35/lib" "-L/gnu/store/0irvg0gvvfwagdjckigvr4g8xap94y1j-clang-
> toolchain-18.1.5/lib" "hello.p/hello.cpp.o" "--as-needed" "--no-
> undefined" "-rpath=/gnu/store/g9wxj9a27jhnxa40zafh0ff33dd8906y-why-
> hello-0/lib" "-rpath" "/gnu/store/qhz8n6mxzalifcrml6fwsvnxw92bk7n0-
> fmt-9.1.0/lib" "-rpath-link"
> "/gnu/store/qhz8n6mxzalifcrml6fwsvnxw92bk7n0-fmt-9.1.0/lib" "--start-
> group" "/gnu/store/qhz8n6mxzalifcrml6fwsvnxw92bk7n0-fmt-
> 9.1.0/lib/libfmt.so" "--end-group" "-lstdc++" "-lm" "-lgcc_s" "-lgcc"
> "-lc" "-lgcc_s" "-lgcc" "/gnu/store/l684qgqlrqkbsh8jffp9d8ag6vrpcwgs-
> gcc-11.3.0-lib/lib/gcc/x86_64-unknown-linux-gnu/11.3.0/crtendS.o"
> "/gnu/store/gsjczqir1wbz8p770zndrpw4rnppmxi3-glibc-2.35/lib/crtn.o"
> "-rpath" "/gnu/store/qhz8n6mxzalifcrml6fwsvnxw92bk7n0-fmt-9.1.0/lib"
> "-rpath" "/gnu/store/l684qgqlrqkbsh8jffp9d8ag6vrpcwgs-gcc-11.3.0-
> lib/lib/gcc/x86_64-unknown-linux-gnu/11.3.0/../../.." "-rpath"
> "/gnu/store/gsjczqir1wbz8p770zndrpw4rnppmxi3-glibc-2.35/lib" "-rpath"
> "/gnu/store/l684qgqlrqkbsh8jffp9d8ag6vrpcwgs-gcc-11.3.0-
> lib/lib/gcc/x86_64-unknown-linux-gnu/11.3.0/../../.." "-rpath"
> "/gnu/store/gsjczqir1wbz8p770zndrpw4rnppmxi3-glibc-2.35/lib" "-rpath"
> "/gnu/store/l684qgqlrqkbsh8jffp9d8ag6vrpcwgs-gcc-11.3.0-
> lib/lib/gcc/x86_64-unknown-linux-gnu/11.3.0/../../..")
> 
> […]
> 
> starting phase `shrink-runpath'
> /gnu/store/g9wxj9a27jhnxa40zafh0ff33dd8906y-why-hello-0/bin/hello:
> stripping RUNPATH to ("/gnu/store/gsjczqir1wbz8p770zndrpw4rnppmxi3-
> glibc-2.35/lib") (removed
> ("/gnu/store/g9wxj9a27jhnxa40zafh0ff33dd8906y-why-hello-0

bug#62890: Likely cause found, excess library grafting

2024-05-26 Thread Richard Sent
Hi Guix!

Once again I sunk more time into this issue when I should have been
sleeping. Here's what I found:

Building a grafted stumpwm directly creates one stumpwm:lib output.
Building it /indirectly/ as a dependency of, say, sbcl-stumpwm-cpu,
creates another, distinct stumpwm:lib output. This difference in
stumpwm:lib outputs is reflected in 50-stumpwm.conf being incoherent.

Packages that depend on say, A:lib graft their own copies of A:lib that
is distinct from grafting A:out and A:lib together. This behavior
confuses asdf-build-system and leads to breakage.

Here's a link to an issue discussing excess library grafts:
https://issues.guix.gnu.org/47115#23

The simplest way to resolve this I feel is to either:

1. Remove stumpwm:lib entirely and just have stumpwm:out
   1. Realistically is anyone out there using stumpwm:lib but NOT
   stumpwm:out? What would the point of that be?
2. Add stumpwm as an input to to any package that just uses stumpwm:lib.

Between the two, I strongly prefer 1.

Below is a bunch of debug output to show how I reached the conclusion
that I did.

--8<---cut here---start->8---
richard@gibraltar ~/code/cloned/guix [env]$ ./pre-inst-env guix build stumpwm 
--check
The following graft will be made:
/gnu/store/bsxspzrhfwsl4qp0n01mgcaqcp1934dj-stumpwm-22.11.drv
applying 9 grafts for stumpwm-22.11 ...
grafting '/gnu/store/j73w1n1sf3gqgx8qx3cx9csbrndddq0b-stumpwm-22.11-lib' -> 
'/gnu/store/r4sc5ylh2g30zgr10q35phd80cb3llqy-stumpwm-22.11-lib'...
grafting '/gnu/store/2rd3r0m8q11icwhhbwfl20ali3w5mwf4-stumpwm-22.11' -> 
'/gnu/store/azj1nchh8b9h9bssyzs15qbpd9p1zf7h-stumpwm-22.11'...
successfully built /gnu/store/bsxspzrhfwsl4qp0n01mgcaqcp1934dj-stumpwm-22.11.drv
successfully built /gnu/store/bsxspzrhfwsl4qp0n01mgcaqcp1934dj-stumpwm-22.11.drv
successfully built /gnu/store/bsxspzrhfwsl4qp0n01mgcaqcp1934dj-stumpwm-22.11.drv
/gnu/store/r4sc5ylh2g30zgr10q35phd80cb3llqy-stumpwm-22.11-lib
/gnu/store/azj1nchh8b9h9bssyzs15qbpd9p1zf7h-stumpwm-22.11

# ^ here 50-stumpwm.conf refers to r4sc5ylh..., as it should
# whereas
# below 50-stumpwm.conf refers to y8fd8yirq. Notice how stumpwm is
# grafted differently

richard@gibraltar ~/code/cloned/guix [env]$ ./pre-inst-env guix build 
sbcl-stumpwm-cpu
The following grafts will be made:
/gnu/store/w8fbnjz3a8rzigldazhqn75v1ncrwnmr-sbcl-stumpwm-cpu-0.0.1-5.4613a95.drv
/gnu/store/w5027r2xlf88pfafw9dsx38cya01la83-stumpwm-22.11.drv
applying 5 grafts for stumpwm-22.11 ...
grafting '/gnu/store/j73w1n1sf3gqgx8qx3cx9csbrndddq0b-stumpwm-22.11-lib' -> 
'/gnu/store/y8fd8yirq8n87sl7pv2wliwihrrbv820-stumpwm-22.11-lib'...
successfully built /gnu/store/w5027r2xlf88pfafw9dsx38cya01la83-stumpwm-22.11.drv
applying 2 grafts for sbcl-stumpwm-cpu-0.0.1-5.4613a95 ...
grafting 
'/gnu/store/r3l0dxxlcdh73092q9fmjj629klayxhq-sbcl-stumpwm-cpu-0.0.1-5.4613a95' 
-> 
'/gnu/store/nvp9y9qgpv4w22dqbjmdyc0l41gymims-sbcl-stumpwm-cpu-0.0.1-5.4613a95'...
successfully built 
/gnu/store/w8fbnjz3a8rzigldazhqn75v1ncrwnmr-sbcl-stumpwm-cpu-0.0.1-5.4613a95.drv
/gnu/store/nvp9y9qgpv4w22dqbjmdyc0l41gymims-sbcl-stumpwm-cpu-0.0.1-5.4613a95
--8<---cut here---end--->8---

Now that there are two distinct derivations for two distinct stumpwm:lib
outputs, we can look at the builders.

--8<---cut here---start->8---
;; guix build stumpwm, stumpwm graft builder
(begin (use-modules (guix build graft) (guix build utils) (ice-9 match))
   (define %outputs (list (cons "lib" ((@ (guile) getenv) "lib")) (cons 
"out" ((@ (guile) getenv) "out"
   (begin (setenv "GUIX_LOCPATH" 
"/gnu/store/visfdda934gvivwihwhlm63fdqhhcc8a-glibc-utf8-locales-2.35/lib/locale")
  (setlocale LC_ALL "en_US.utf8"))
   (let* ((old-outputs (quote (("lib" . 
"/gnu/store/j73w1n1sf3gqgx8qx3cx9csbrndddq0b-stumpwm-22.11-lib")
   ("out" . 
"/gnu/store/2rd3r0m8q11icwhhbwfl20ali3w5mwf4-stumpwm-22.11"
  (mapping (append (quote 
(("/gnu/store/hqxzgbbbnxl8l9q8bcsvzvmyw1mjws4r-zstd-1.5.2-lib" . 
"/gnu/store/x35wy730jwwmwwypvzy2nmqvcb3hc3ba-zstd-1.5.2-lib")
   
("/gnu/store/930nwsiysdvy2x5zv1sf6v7ym75z8ayk-gcc-11.3.0-lib" . 
"/gnu/store/6ncav55lbk5kqvwwflrzcr41hp5jbq0c-gcc-11.3.0-lib")
   
("/gnu/store/gsjczqir1wbz8p770zndrpw4rnppmxi3-glibc-2.35" . 
"/gnu/store/ln6hxqjvz6m9gdd9s97pivlqck7hzs99-glibc-2.35")
   
("/gnu/store/hbzlh3zjss4w80jscwfkivpyqc2sqbm3-sbcl-alexandria-1.4-0.009b7e5" . 
"/gnu/store/p8iagp15zzj5ivh3j8443jjpq6wmmzpw-sbcl-alexandria-1.4-0.009b7e5")
   
("/gnu/store/jd34ay8cyyl2dag62n94m15gg1b4s1sw-sbcl-2.4.0" . 
"/gnu/store/vj5jdgz6dajq25f6arjw976h6awwblgh-sbcl-2.4.0")
   
("/gnu/store/rib9g2ig1xf3kclyl076w28parmncg4k-bash-minimal-5.1.16" . 
"/gnu/store/v9p25q9l5nnaixkhpap5rnymmwbhf9rp-bas

bug#47115: Another occurence in the wild

2024-05-26 Thread Richard Sent
Hi Guix!

I believe I found another instance of this bug coming back to haunt
unfortunate, wayward souls. (including me! 😭).

https://issues.guix.gnu.org/62890

-- 
Take it easy,
Richard Sent
Making my computer weirder one commit at a time.