Subject: bug#61359: mozjs captures perl reference in it binary

From: Maxim Cournoyer <[email-masked]>
Date: Tue, 07 Feb 2023 21:43:31 -0500

Hello Guix,

Mozjs appears to keep a refrence to perl (a build input) in its output:

--8<---------------cut here---------------start------------->8---
grep: /gnu/store/c4j4a6qc256dvgnzwjzvzwca0ffgic5x-mozjs-102.2.0/lib/libmozjs-102.so: binary file matches
grep: /gnu/store/c4j4a6qc256dvgnzwjzvzwca0ffgic5x-mozjs-102.2.0/lib/libjs_static.ajs: binary file matches
--8<---------------cut here---------------end--------------->8---

And:

--8<---------------cut here---------------start------------->8---
$ ./pre-inst-env guix size mozjs
store item                                                       total    self
/gnu/store/cbyf9yv9zkqzqb8arflnigccj10h9r12-mozjs-102.2.0          264.8    67.2  25.4%
/gnu/store/hy6abswwv4d89zp464fw52z65fkzr7h5-perl-5.34.0            147.7    58.6  22.1%
/gnu/store/b0xl3iqgc7fs68f2kfdyydsdxs77jqph-icu4c-71.1             112.5    39.8  15.0%
/gnu/store/5h2w4qi9hk1qzzgi1w83220ydslinr4s-glibc-2.33              38.3    36.6  13.8%
/gnu/store/094bbaq6glba86h1d4cj16xhdi6fk2jl-gcc-10.3.0-lib          71.7    33.4  12.6%
/gnu/store/vqdsrvs9jbn0ix2a58s99jwkh74124y5-coreutils-minimal-8.32    88.0    16.4   6.2%
/gnu/store/9rrnm5hdjw7cy96a2a9rfgh6y08wsbmf-ncurses-6.2.20210619    77.6     5.9   2.2%
/gnu/store/720rj90bch716isd8z7lcwrnvz28ap4y-bash-static-5.1.8        1.7     1.7   0.6%
/gnu/store/rrid5nx9cbrq0flkhc1rv4b5hk4w70ib-nspr-4.34              150.3     1.6   0.6%
/gnu/store/wcwls45278gzpjvwlvrrs1y7h30g44xh-readline-8.1.1          79.0     1.4   0.5%
/gnu/store/chfwin3a4qp1znnpsjbmydr2jbzk0d6y-bash-minimal-5.1.8      72.7     1.0   0.4%
/gnu/store/4y5m9lb8k3qkb1y9m02sw9w9a6hacd16-bash-minimal-5.1.8      39.3     1.0   0.4%
/gnu/store/8qv5kb2fgm4c3bf70zcg9l6hkf3qzpw9-zlib-1.2.11             71.9     0.2   0.1%
total: 264.8 MiB
--8<---------------cut here---------------end--------------->8---

It'd be nice to understand how to prevent this from happening.

-- 
Thanks,
Maxim