PostgreSQL retains references to ld-wrapper and coreutils

DoneSubmitted by Ludovic Courtès.
Details
3 participants
  • Ludovic Courtès
  • Marius Bakke
  • zimoun
Owner
unassigned
Severity
normal
L
L
Ludovic Courtès wrote on 25 Jan 2017 09:57
(address . bug-guix@gnu.org)
874m0n4iv3.fsf@gnu.org
As of 04fa4cdf95a004bda4d63b6578b53e154a4d4679:

Toggle snippet (33 lines)
$ guix size postgresql
store item total self
/gnu/store/awmx27f02la7sc4s63jxsdczclsf63gj-postgresql-9.5.5 200.5 20.0 10.0%
/gnu/store/c7lm5innppxm53bf5w7i99d59kjdyx27-ld-wrapper-0 152.8 0.0 0.0%
/gnu/store/6slzn4ixcjlhy3av3biglqfli9pwxcn9-guile-2.0.12 103.4 12.7 6.3%
/gnu/store/4xxd00drj8gjcr84xdfna44qak2vhwmf-binutils-2.27 87.6 49.3 24.6%
/gnu/store/9xfn6q7cxqxaxsv6kgiic9iygl2iv2ci-coreutils-8.25 78.8 14.4 7.2%
/gnu/store/9l52vcmb1ambc3ypf7nxn38ac0976yyf-tar-1.29 76.0 2.6 1.3%
/gnu/store/iz6rbi4r00jhwzbccnsbq1bbrbdi6h3d-readline-7.0 68.0 1.3 0.6%
/gnu/store/k0x973sjylvi746ib2xn4v1hjp855qq1-readline-7.0 68.0 1.3 0.6%
/gnu/store/yi8a0206zpqf6qijkn70938jj8l6s87b-ncurses-6.0 66.7 5.7 2.9%
/gnu/store/xydfiifs9slq0wv6n8j6p26icn2ihn88-ncurses-6.0 66.7 5.7 2.9%
/gnu/store/qj5sazmlzqbn2nlm7vxj6wjns0mm5x79-libunistring-0.9.6 65.4 4.5 2.2%
/gnu/store/frxwbfah0l9fr0j398vg3avsrmdfajnj-gmp-6.1.1 63.6 2.6 1.3%
/gnu/store/ykdzlcdyjjfhivids91d1xs36hmzrrp6-gmp-6.1.1 63.6 2.6 1.3%
/gnu/store/janggjcj3c1a2wf5p6zrgxk50jdy0ibx-libgc-7.4.2 62.7 1.1 0.6%
/gnu/store/dp61fnsknp4mi58vnq8jy0wyp0nl2id3-pkg-config-0.29 62.3 1.3 0.6%
/gnu/store/xw9jv7krgy86f5pvnrc77zph25562n1n-acl-2.2.52 61.7 0.4 0.2%
/gnu/store/27ygdlznld2s6bk8mw2hmbhbh517ahaq-libcap-2.24 61.4 0.1 0.1%
/gnu/store/a64w9dq219a8d9k4mfz76mnzph9wsvfj-zlib-1.2.8 61.3 0.4 0.2%
/gnu/store/hgg7bzyq84ny3b1j17c4hkdpx5xmvnw0-attr-2.4.47 61.2 0.2 0.1%
/gnu/store/p153bawa5szcv4z6br9jrbwv3zq6qv5m-libffi-3.2.1 61.1 0.1 0.1%
/gnu/store/lb6z629zg8p5raip9m9k2sris87qsgdn-libltdl-2.4.6 61.1 0.1 0.1%
/gnu/store/cdi08kw7r6r684w8mk0xq0dkgpjhfpmd-gcc-4.9.4-lib 61.0 22.7 11.3%
/gnu/store/qkw4zrwfybxww8f56nkb6hggxambk89b-bash-4.4.0 50.7 5.4 2.7%
/gnu/store/bm0gfw4jkw8gd0vpnnzrb6z0xncrbx3p-readline-7.0 45.3 1.3 0.6%
/gnu/store/hdrli1v7q3107w842s7di8rid82xlfvl-ncurses-6.0 44.0 5.7 2.8%
/gnu/store/iwgi9001dmmihrjg4rqhd6pa6788prjw-glibc-2.24 38.3 36.8 18.4%
/gnu/store/rvgmixpmsq5lqr9qflhkm70kg7a4rys2-bash-static-4.4.0 1.4 1.4 0.7%
/gnu/store/idcrs9pr86mw3f5ya87ijhczn6zywxs6-libatomic-ops-7.4.2 0.6 0.6 0.3%
total: 200.5 MiB

We should at least remove the dependency on ld-wrapper, which is
probably not justified.

Ludo’.
Z
Z
zimoun wrote on 22 Oct 2020 00:13
(name . Ludovic Courtès)(address . ludo@gnu.org)(address . 25527@debbugs.gnu.org)
86ft672pod.fsf@gmail.com
Dear,

On Wed, 25 Jan 2017 at 09:57, ludo@gnu.org (Ludovic Courtès) wrote:

Toggle quote (2 lines)
> As of 04fa4cdf95a004bda4d63b6578b53e154a4d4679:

Comparing with 58af4c9621af02cc4e2bb5692d4b377084b0fcc6.

Toggle quote (9 lines)
> $ guix size postgresql
> store item total self
> /gnu/store/4xxd00drj8gjcr84xdfna44qak2vhwmf-binutils-2.27 87.6 49.3 24.6%
> /gnu/store/iwgi9001dmmihrjg4rqhd6pa6788prjw-glibc-2.24 38.3 36.8 18.4%
> /gnu/store/cdi08kw7r6r684w8mk0xq0dkgpjhfpmd-gcc-4.9.4-lib 61.0 22.7 11.3%
> /gnu/store/awmx27f02la7sc4s63jxsdczclsf63gj-postgresql-9.5.5 200.5 20.0 10.0%
> /gnu/store/9xfn6q7cxqxaxsv6kgiic9iygl2iv2ci-coreutils-8.25 78.8 14.4 7.2%
> /gnu/store/6slzn4ixcjlhy3av3biglqfli9pwxcn9-guile-2.0.12 103.4 12.7 6.3%

[...]

Toggle quote (3 lines)
> /gnu/store/c7lm5innppxm53bf5w7i99d59kjdyx27-ld-wrapper-0 152.8 0.0 0.0%
> total: 200.5 MiB

Toggle snippet (17 lines)
$ guix size postgresql
store item total self
/gnu/store/m1z7cdbqsqyp9xnjw5cvlb4a7gkcg3m4-binutils-2.34 93.0 54.6 21.4%
/gnu/store/0m0vd873jp61lcm4xa3ljdgx381qa782-guile-3.0.2 132.8 53.2 20.9%
/gnu/store/fa6wj5bxkj5ll1d7292a70knmyl7a0cr-glibc-2.31 38.4 36.7 14.4%
/gnu/store/01b4w3m6mp55y531kyi1g8shh722kwqm-gcc-7.5.0-lib 71.0 32.6 12.8%
/gnu/store/2w144h8kp0pzngi5zziay3pz0hxqii6i-postgresql-11.6 254.6 24.2 9.5%
/gnu/store/57xj5gcy1jbl9ai2lnrqnpr0dald9i65-coreutils-8.32 88.0 17.0 6.7%
/gnu/store/a45p39mgqvfd8kjwibyr0q42k1mw7gmf-util-linux-2.35.1-lib 80.0 9.0 3.5%
/gnu/store/dkzivzn17qilmqdfpyps62b395wxhshh-openssl-1.1.1f 77.4 6.4 2.5%

[...]

/gnu/store/mpa04aq8lblbcviyxywxcsb1zbi0mf39-ld-wrapper-0 187.5 0.1 0.0%
total: 254.6 MiB

Toggle quote (3 lines)
> We should at least remove the dependency on ld-wrapper, which is
> probably not justified.

The command “guix graph postgresql -t bag | dot -Tpdf > /tmp/psql.pdf”
shows that this ’ld-wrapper-0“ comes from ‘util-linux’. Therefore, is
it affordable to remove this dependency?


All the best,
simon
L
L
Ludovic Courtès wrote on 23 Oct 2020 12:05
(name . zimoun)(address . zimon.toutoune@gmail.com)(address . 25527@debbugs.gnu.org)
873625s1eb.fsf@gnu.org
Hi,

zimoun <zimon.toutoune@gmail.com> skribis:

Toggle quote (4 lines)
> The command “guix graph postgresql -t bag | dot -Tpdf > /tmp/psql.pdf”
> shows that this ’ld-wrapper-0“ comes from ‘util-linux’. Therefore, is
> it affordable to remove this dependency?

I think you’re mistaken: :-)

Toggle snippet (7 lines)
$ guix graph -t references --path postgresql ld-wrapper
/gnu/store/2w144h8kp0pzngi5zziay3pz0hxqii6i-postgresql-11.6
/gnu/store/mpa04aq8lblbcviyxywxcsb1zbi0mf39-ld-wrapper-0
$ guix graph -t references --path $(guix build util-linux | grep '[0-9]$') ld-wrapper
guix graph: error: no path from '/gnu/store/j3vz21b9xgf244z1ivllj61i8975qx6r-util-linux-2.35.1' to '/gnu/store/mpa04aq8lblbcviyxywxcsb1zbi0mf39-ld-wrapper-0'

Ludo’.
Z
Z
zimoun wrote on 23 Oct 2020 13:15
(name . Ludovic Courtès)(address . ludo@gnu.org)(address . 25527@debbugs.gnu.org)
87eelp6vnu.fsf@gmail.com
Hi,

On Fri, 23 Oct 2020 at 12:05, Ludovic Courtès <ludo@gnu.org> wrote:

Toggle quote (2 lines)
> I think you’re mistaken: :-)

Indeed! Thank you for the explanation.

The manual says (emphasis by me):

References are a subset of the inputs of the derivation; this
subset is AUTOMATICALLY COMPUTED by the build daemon by scanning
all the files in the outputs.

Therefore, how is it computed? Or what is the entry point to understand
how the build daemon does?

The output is the folder $(guix build postgresql)/, right? So it means
one (or more) file refers to ld-wrapper and coreutils. How can I find
which one? Other said, what are the tools I could use?


All the best,
simon
L
L
Ludovic Courtès wrote on 7 Dec 2020 22:05
(name . zimoun)(address . zimon.toutoune@gmail.com)(address . 25527@debbugs.gnu.org)
87h7oxz5rk.fsf@gnu.org
Hi,

Sorry for the multi-month delay…

zimoun <zimon.toutoune@gmail.com> skribis:

Toggle quote (9 lines)
> The manual says (emphasis by me):
>
> References are a subset of the inputs of the derivation; this
> subset is AUTOMATICALLY COMPUTED by the build daemon by scanning
> all the files in the outputs.
>
> Therefore, how is it computed? Or what is the entry point to understand
> how the build daemon does?

The daemon scans build results, nothing fancy. See ‘scanForReferences’
in the C++ code.

Toggle quote (4 lines)
> The output is the folder $(guix build postgresql)/, right? So it means
> one (or more) file refers to ld-wrapper and coreutils. How can I find
> which one? Other said, what are the tools I could use?

I’d do like this:

Toggle snippet (4 lines)
$ grep -r $(guix build ld-wrapper) $(guix build postgresql)
/gnu/store/lrll3ibqags97g2hmjv4az9g1xif42g4-postgresql-11.6/lib/pgxs/src/Makefile.global:LD = /gnu/store/mpa04aq8lblbcviyxywxcsb1zbi0mf39-ld-wrapper-0/bin/ld

HTH! :-)

Ludo’.
M
M
Marius Bakke wrote on 20 Dec 2020 18:57
87wnxc7433.fsf@gnu.org
ludo@gnu.org (Ludovic Courtès) skriver:

Toggle quote (39 lines)
> As of 04fa4cdf95a004bda4d63b6578b53e154a4d4679:
>
> --8<---------------cut here---------------start------------->8---
> $ guix size postgresql
> store item total self
> /gnu/store/awmx27f02la7sc4s63jxsdczclsf63gj-postgresql-9.5.5 200.5 20.0 10.0%
> /gnu/store/c7lm5innppxm53bf5w7i99d59kjdyx27-ld-wrapper-0 152.8 0.0 0.0%
> /gnu/store/6slzn4ixcjlhy3av3biglqfli9pwxcn9-guile-2.0.12 103.4 12.7 6.3%
> /gnu/store/4xxd00drj8gjcr84xdfna44qak2vhwmf-binutils-2.27 87.6 49.3 24.6%
> /gnu/store/9xfn6q7cxqxaxsv6kgiic9iygl2iv2ci-coreutils-8.25 78.8 14.4 7.2%
> /gnu/store/9l52vcmb1ambc3ypf7nxn38ac0976yyf-tar-1.29 76.0 2.6 1.3%
> /gnu/store/iz6rbi4r00jhwzbccnsbq1bbrbdi6h3d-readline-7.0 68.0 1.3 0.6%
> /gnu/store/k0x973sjylvi746ib2xn4v1hjp855qq1-readline-7.0 68.0 1.3 0.6%
> /gnu/store/yi8a0206zpqf6qijkn70938jj8l6s87b-ncurses-6.0 66.7 5.7 2.9%
> /gnu/store/xydfiifs9slq0wv6n8j6p26icn2ihn88-ncurses-6.0 66.7 5.7 2.9%
> /gnu/store/qj5sazmlzqbn2nlm7vxj6wjns0mm5x79-libunistring-0.9.6 65.4 4.5 2.2%
> /gnu/store/frxwbfah0l9fr0j398vg3avsrmdfajnj-gmp-6.1.1 63.6 2.6 1.3%
> /gnu/store/ykdzlcdyjjfhivids91d1xs36hmzrrp6-gmp-6.1.1 63.6 2.6 1.3%
> /gnu/store/janggjcj3c1a2wf5p6zrgxk50jdy0ibx-libgc-7.4.2 62.7 1.1 0.6%
> /gnu/store/dp61fnsknp4mi58vnq8jy0wyp0nl2id3-pkg-config-0.29 62.3 1.3 0.6%
> /gnu/store/xw9jv7krgy86f5pvnrc77zph25562n1n-acl-2.2.52 61.7 0.4 0.2%
> /gnu/store/27ygdlznld2s6bk8mw2hmbhbh517ahaq-libcap-2.24 61.4 0.1 0.1%
> /gnu/store/a64w9dq219a8d9k4mfz76mnzph9wsvfj-zlib-1.2.8 61.3 0.4 0.2%
> /gnu/store/hgg7bzyq84ny3b1j17c4hkdpx5xmvnw0-attr-2.4.47 61.2 0.2 0.1%
> /gnu/store/p153bawa5szcv4z6br9jrbwv3zq6qv5m-libffi-3.2.1 61.1 0.1 0.1%
> /gnu/store/lb6z629zg8p5raip9m9k2sris87qsgdn-libltdl-2.4.6 61.1 0.1 0.1%
> /gnu/store/cdi08kw7r6r684w8mk0xq0dkgpjhfpmd-gcc-4.9.4-lib 61.0 22.7 11.3%
> /gnu/store/qkw4zrwfybxww8f56nkb6hggxambk89b-bash-4.4.0 50.7 5.4 2.7%
> /gnu/store/bm0gfw4jkw8gd0vpnnzrb6z0xncrbx3p-readline-7.0 45.3 1.3 0.6%
> /gnu/store/hdrli1v7q3107w842s7di8rid82xlfvl-ncurses-6.0 44.0 5.7 2.8%
> /gnu/store/iwgi9001dmmihrjg4rqhd6pa6788prjw-glibc-2.24 38.3 36.8 18.4%
> /gnu/store/rvgmixpmsq5lqr9qflhkm70kg7a4rys2-bash-static-4.4.0 1.4 1.4 0.7%
> /gnu/store/idcrs9pr86mw3f5ya87ijhczn6zywxs6-libatomic-ops-7.4.2 0.6 0.6 0.3%
> total: 200.5 MiB
> --8<---------------cut here---------------end--------------->8---
>
> We should at least remove the dependency on ld-wrapper, which is
> probably not justified.

This is because PostgreSQL installs its Makefile(!), which contain
absolute references to various build tools.

I pushed a fix to 'staging' in
e693617f559f49d1d2606dd5ad997e444b9ad1b5 that adjusts the Makefile to
use relative references.

(not sure whether it should be installed at all, but that is for a
future bug report)

The size of postgresql@13 decreased from 256.3 MiB to 137.9 MiB(!!).

Thanks!
-----BEGIN PGP SIGNATURE-----

iQFDBAEBCgAtFiEEu7At3yzq9qgNHeZDoqBt8qM6VPoFAl/fkJEPHG1hcml1c0Bn
bnUub3JnAAoJEKKgbfKjOlT60R0H/2TEU9McdG/JHztwdzw4gfSB3kWGFVr1+luQ
Y4OLLmAwiROXr5kGgsM+zcpng031/l8jFu0wxpsb72YIhfVUCf5oygcW9r51EjFA
23QPxNDdkTKBENAE8dyT4fRf1H7BeZCrMfqr1O2pD4RokI4TsnprUmfRmi9gtVNh
GFhJKrPvwRPQnKQTHldNDCRKCXwSqMqFOTBQWa/UzXbry6T/6Xjsj4AuVF2xV6JK
y69E3XpwhQ4E6ma+VaOQpxndjWotC1vWkwDpH022qQDW8wcQqkf2awsBCEkV6wW2
wZ3hVQad07bkgaAP+Cw9WTy/F/GX1rwk7Xa+VQCyHuLjXAbCkEE=
=kS2U
-----END PGP SIGNATURE-----

Closed
?
Your comment

This issue is archived.

To comment on this conversation send email to 25527@debbugs.gnu.org