all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* help using guix size command w/ local file definition
@ 2024-03-30 21:16 chris
  2024-03-31 11:47 ` Tomas Volf
  0 siblings, 1 reply; 3+ messages in thread
From: chris @ 2024-03-30 21:16 UTC (permalink / raw)
  To: help-guix; +Cc: chris

How does one use `guix size` with a local file package definition?

I have copied the `vifm` package definition here to a local file https://git.savannah.gnu.org/cgit/guix.git/tree/gnu/packages/vim.scm?id=master#n916

Using `guix size --load-path` as described here fails https://guix.gnu.org/manual/en/html_node/Invoking-guix-size.html
```
$ guix size --load-path=$HOME/software/vifm-local/ vifm-local
guix size: error: no available substitute information for '/gnu/store/vx189rcgy4b8lw1acw14cki9lm4jz9jn-vifm-local-0.13'
$ guix size --substitute-urls="" --load-path=$HOME/software/vifm-local/ vifm-local
guix size: error: no available substitute information for '/gnu/store/vx189rcgy4b8lw1acw14cki9lm4jz9jn-vifm-local-0.13'
```

Another question, as guix's vifm input list includes `libx11`, shouldn't x11 appear in the size listing?
https://git.savannah.gnu.org/cgit/guix.git/tree/gnu/packages/vim.scm?id=master#n916
```
$ guix size vifm
store item                                total    self
/gnu/store/lj[...]f8-perl-5.36.0            152.2    59.4  34.9%
/gnu/store/gs[...]i3-glibc-2.35              40.6    38.8  22.8%
/gnu/store/93[...]yk-gcc-11.3.0-lib          75.3    34.7  20.4%
/gnu/store/a5[...]5c-coreutils-9.1           91.8    16.5   9.7%
/gnu/store/gr[...]hq-file-5.44               85.8     8.1   4.8%
/gnu/store/bc[...]gy-ncurses-6.2.20210619    81.2     5.9   3.5%
/gnu/store/gz[...]vg-vifm-0.13              170.3     2.7   1.6%
/gnu/store/zz[...]a7-bash-static-5.1.16       1.8     1.8   1.1%
/gnu/store/6k[...]wj-xz-5.2.8                77.7     1.4   0.8%
/gnu/store/ri[...]4k-bash-minimal-5.1.16     41.6     1.0   0.6%
total: 170.3 MiB
```

Thanks for any reply :)


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: help using guix size command w/ local file definition
  2024-03-30 21:16 help using guix size command w/ local file definition chris
@ 2024-03-31 11:47 ` Tomas Volf
  2024-04-02  4:32   ` chris
  0 siblings, 1 reply; 3+ messages in thread
From: Tomas Volf @ 2024-03-31 11:47 UTC (permalink / raw)
  To: chris; +Cc: help-guix

[-- Attachment #1: Type: text/plain, Size: 5218 bytes --]

Hello,

On 2024-03-30 14:16:47 -0700, chris wrote:
> How does one use `guix size` with a local file package definition?
>
> I have copied the `vifm` package definition here to a local file https://git.savannah.gnu.org/cgit/guix.git/tree/gnu/packages/vim.scm?id=master#n916
>
> Using `guix size --load-path` as described here fails https://guix.gnu.org/manual/en/html_node/Invoking-guix-size.html
> ```
> $ guix size --load-path=$HOME/software/vifm-local/ vifm-local
> guix size: error: no available substitute information for '/gnu/store/vx189rcgy4b8lw1acw14cki9lm4jz9jn-vifm-local-0.13'
> $ guix size --substitute-urls="" --load-path=$HOME/software/vifm-local/ vifm-local
> guix size: error: no available substitute information for '/gnu/store/vx189rcgy4b8lw1acw14cki9lm4jz9jn-vifm-local-0.13'
> ```

The package needs to be built first:

    /tmp/xxx $ guix size -L . vifm-local
    guix size: error: no available substitute information for '/gnu/store/rhvkgakmmf11lpz5jhpciyzramwd69vf-vifm-local-0.13'
    /tmp/xxx $ guix build --verbosity=0 -L . vifm-local
    /gnu/store/92xlmlc0m74flrj8jmwfjhx75xada8ad-vifm-local-0.13
    /tmp/xxx $ guix size -L . vifm-local
    store item                                                       total    self
    /gnu/store/lj75fc25zx2y9pqvfp95la84rdhlj4f8-perl-5.36.0            152.2    59.4  34.9%
    /gnu/store/gsjczqir1wbz8p770zndrpw4rnppmxi3-glibc-2.35              40.6    38.8  22.8%
    /gnu/store/930nwsiysdvy2x5zv1sf6v7ym75z8ayk-gcc-11.3.0-lib          75.3    34.7  20.4%
    /gnu/store/a5i8avx826brw5grn3n4qv40g514505c-coreutils-9.1           91.8    16.5   9.7%
    /gnu/store/gr0sy0m1mv36qv54idm6cn10l3mngshq-file-5.44               85.8     8.1   4.8%
    /gnu/store/bcc053jvsbspdjr17gnnd9dg85b3a0gy-ncurses-6.2.20210619    81.2     5.9   3.5%
    /gnu/store/rhvkgakmmf11lpz5jhpciyzramwd69vf-vifm-local-0.13        170.3     2.7   1.6%
    /gnu/store/zzyywykw7kriln18rxqd82f0k5kidla7-bash-static-5.1.16       1.8     1.8   1.1%
    /gnu/store/6k1yys9wqrfn4y41ic1win8gpnimncwj-xz-5.2.8                77.7     1.4   0.8%
    /gnu/store/rib9g2ig1xf3kclyl076w28parmncg4k-bash-minimal-5.1.16     41.6     1.0   0.6%
    total: 170.3 MiB

The error message might be a bit misleading, especially with the empty
substitute urls.

>
> Another question, as guix's vifm input list includes `libx11`, shouldn't x11 appear in the size listing?
> https://git.savannah.gnu.org/cgit/guix.git/tree/gnu/packages/vim.scm?id=master#n916
> ```
> $ guix size vifm
> store item                                total    self
> /gnu/store/lj[...]f8-perl-5.36.0            152.2    59.4  34.9%
> /gnu/store/gs[...]i3-glibc-2.35              40.6    38.8  22.8%
> /gnu/store/93[...]yk-gcc-11.3.0-lib          75.3    34.7  20.4%
> /gnu/store/a5[...]5c-coreutils-9.1           91.8    16.5   9.7%
> /gnu/store/gr[...]hq-file-5.44               85.8     8.1   4.8%
> /gnu/store/bc[...]gy-ncurses-6.2.20210619    81.2     5.9   3.5%
> /gnu/store/gz[...]vg-vifm-0.13              170.3     2.7   1.6%
> /gnu/store/zz[...]a7-bash-static-5.1.16       1.8     1.8   1.1%
> /gnu/store/6k[...]wj-xz-5.2.8                77.7     1.4   0.8%
> /gnu/store/ri[...]4k-bash-minimal-5.1.16     41.6     1.0   0.6%
> total: 170.3 MiB
> ```
>

The libx11 is present in the inputs, but since vifm defaults to dynamic loading
of it using dlopen, the store path is not present in the output binary and
therefore libx11 is not detected as dependency (I assume).

When you add "--with-dyn-X11=no" to #:configure-flags, the size output changes
to:

store item                                                       total    self
/gnu/store/lj75fc25zx2y9pqvfp95la84rdhlj4f8-perl-5.36.0            152.2    59.4  33.7%
/gnu/store/gsjczqir1wbz8p770zndrpw4rnppmxi3-glibc-2.35              40.6    38.8  22.0%
/gnu/store/930nwsiysdvy2x5zv1sf6v7ym75z8ayk-gcc-11.3.0-lib          75.3    34.7  19.7%
/gnu/store/a5i8avx826brw5grn3n4qv40g514505c-coreutils-9.1           91.8    16.5   9.4%
/gnu/store/gr0sy0m1mv36qv54idm6cn10l3mngshq-file-5.44               85.8     8.1   4.6%
/gnu/store/bcc053jvsbspdjr17gnnd9dg85b3a0gy-ncurses-6.2.20210619    81.2     5.9   3.4%
/gnu/store/7zgm9y6n8m4isq12iw7izyn5g6z5m5w7-libxcb-1.15             78.5     3.0   1.7%
/gnu/store/zyry5d5r6lf2vcffcjwspfnfzh04dil9-vifm-local-0.13        176.1     2.7   1.5%
/gnu/store/87rsx9bv801pmspv64hrnxzcjg1fahi5-libx11-1.8.7            81.2     2.7   1.5%
/gnu/store/zzyywykw7kriln18rxqd82f0k5kidla7-bash-static-5.1.16       1.8     1.8   1.0%
/gnu/store/6k1yys9wqrfn4y41ic1win8gpnimncwj-xz-5.2.8                77.7     1.4   0.8%
/gnu/store/rib9g2ig1xf3kclyl076w28parmncg4k-bash-minimal-5.1.16     41.6     1.0   0.6%
/gnu/store/qijsw76w8l0zz9k0j3vaal488ixy3w8f-libxdmcp-1.1.3          75.4     0.1   0.1%
/gnu/store/q6i6mc09sbklfnv3jbi22mnzbl0wilzx-libxau-1.0.10           75.3     0.0   0.0%
total: 176.1 MiB

Which seems to be what you expected.  I know nothing about this packages, but my
guess would be this is just a packaging error instead of intentional
optimization (~6MiB do not really matter IMO).

Hope this helps,
Tomas

--
There are only two hard things in Computer Science:
cache invalidation, naming things and off-by-one errors.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: help using guix size command w/ local file definition
  2024-03-31 11:47 ` Tomas Volf
@ 2024-04-02  4:32   ` chris
  0 siblings, 0 replies; 3+ messages in thread
From: chris @ 2024-04-02  4:32 UTC (permalink / raw)
  To: help-guix

thank you for this detailed response that answers my questions :)


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-04-04  6:00 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-03-30 21:16 help using guix size command w/ local file definition chris
2024-03-31 11:47 ` Tomas Volf
2024-04-02  4:32   ` chris

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.