unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
* initrd: why do we need static linking?
@ 2020-05-04  6:34 Ricardo Wurmus
  2020-05-05  9:33 ` Ludovic Courtès
  0 siblings, 1 reply; 4+ messages in thread
From: Ricardo Wurmus @ 2020-05-04  6:34 UTC (permalink / raw)
  To: guix-devel

Hi Guix,

why do we need to link packages statically to include them in the
initrd?  Can’t we just copy the package closure into the initrd?

-- 
Ricardo


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

* Re: initrd: why do we need static linking?
  2020-05-04  6:34 initrd: why do we need static linking? Ricardo Wurmus
@ 2020-05-05  9:33 ` Ludovic Courtès
  2020-05-05 19:59   ` raingloom
  0 siblings, 1 reply; 4+ messages in thread
From: Ludovic Courtès @ 2020-05-05  9:33 UTC (permalink / raw)
  To: Ricardo Wurmus; +Cc: guix-devel

Hi,

Ricardo Wurmus <rekado@elephly.net> skribis:

> why do we need to link packages statically to include them in the
> initrd?  Can’t we just copy the package closure into the initrd?

You can refer to any package in the initrd gexp and its whole closure is
automatically included in the initrd.

However, to minimize the size of the initrd (it must fit in memory,
uncompressed), we typically use stripped statically-linked packages.

HTH!

Ludo’.


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

* Re: initrd: why do we need static linking?
  2020-05-05  9:33 ` Ludovic Courtès
@ 2020-05-05 19:59   ` raingloom
  2020-05-06 14:13     ` Ludovic Courtès
  0 siblings, 1 reply; 4+ messages in thread
From: raingloom @ 2020-05-05 19:59 UTC (permalink / raw)
  To: guix-devel

On Tue, 05 May 2020 11:33:17 +0200
Ludovic Courtès <ludo@gnu.org> wrote:

> Hi,
> 
> Ricardo Wurmus <rekado@elephly.net> skribis:
> 
> > why do we need to link packages statically to include them in the
> > initrd?  Can’t we just copy the package closure into the initrd?  
> 
> You can refer to any package in the initrd gexp and its whole closure
> is automatically included in the initrd.
> 
> However, to minimize the size of the initrd (it must fit in memory,
> uncompressed), we typically use stripped statically-linked packages.
> 
> HTH!
> 
> Ludo’.
> 

It'd actually be nice if static linking could be used in places other
than the initrd. I'm experimenting with some old resource constrained
machines, and it made me realize just how much space even a basic `guix
pull` can take up.


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

* Re: initrd: why do we need static linking?
  2020-05-05 19:59   ` raingloom
@ 2020-05-06 14:13     ` Ludovic Courtès
  0 siblings, 0 replies; 4+ messages in thread
From: Ludovic Courtès @ 2020-05-06 14:13 UTC (permalink / raw)
  To: raingloom; +Cc: guix-devel

Hi,

raingloom <raingloom@riseup.net> skribis:

> It'd actually be nice if static linking could be used in places other
> than the initrd. I'm experimenting with some old resource constrained
> machines, and it made me realize just how much space even a basic `guix
> pull` can take up.

That’s an issue in Guile’s compiler that Andy has been working on
recently.  Static linking won’t help you.

More generally, shared libraries (dynamic linking) are a way to save
memory: those libraries are shared, meaning they can be loaded only once
in memory even if there are many processes using them.

Ludo’.


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

end of thread, other threads:[~2020-05-06 14:13 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-04  6:34 initrd: why do we need static linking? Ricardo Wurmus
2020-05-05  9:33 ` Ludovic Courtès
2020-05-05 19:59   ` raingloom
2020-05-06 14:13     ` Ludovic Courtès

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).