Re: initrd: why do we need static linking?

2020-05-06 Thread Ludovic Courtès
Hi,

raingloom  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’.



Re: initrd: why do we need static linking?

2020-05-05 Thread raingloom
On Tue, 05 May 2020 11:33:17 +0200
Ludovic Courtès  wrote:

> Hi,
> 
> Ricardo Wurmus  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.



Re: initrd: why do we need static linking?

2020-05-05 Thread Ludovic Courtès
Hi,

Ricardo Wurmus  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’.



initrd: why do we need static linking?

2020-05-04 Thread Ricardo Wurmus
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