* Why doesn't Guix build static libraries?
@ 2021-10-31 4:49 Tim Lee
2021-10-31 11:48 ` Tobias Geerinckx-Rice
0 siblings, 1 reply; 4+ messages in thread
From: Tim Lee @ 2021-10-31 4:49 UTC (permalink / raw)
To: help-guix
I noticed that many C and C++ libraries in Guix are built with the
--disable-static option. Why are static libraries excluded from Guix?
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Why doesn't Guix build static libraries?
2021-10-31 4:49 Why doesn't Guix build static libraries? Tim Lee
@ 2021-10-31 11:48 ` Tobias Geerinckx-Rice
2021-10-31 15:03 ` Denis 'GNUtoo' Carikli
0 siblings, 1 reply; 4+ messages in thread
From: Tobias Geerinckx-Rice @ 2021-10-31 11:48 UTC (permalink / raw)
To: Tim Lee; +Cc: help-guix
[-- Attachment #1: Type: text/plain, Size: 1035 bytes --]
Tim,
Tim Lee 写道:
> I noticed that many C and C++ libraries in Guix are built with
> the
> --disable-static option. Why are static libraries excluded from
> Guix?
I'll speak for myself: I remove static .a libraries whenever
they're not obviously required by other software in Guix. If
another package were to require them, I'd first try to fix it to
link dynamically.
Static linking provides no serious advantages and at least one
serious disadvantage: it's invisible to grafting. If A statically
links to B, grafting B will leave A untouched and vulnerable.
My worry is that leaving .a files around will cause some build
systems to silently prefer them to the .so and link statically. I
can't remember the name of the packages, but this does happen.
Static linking is useful in tightly-controlled environments where
space is at a premium, i.e., the Guix System initrd. That's why
Guix has packages like bcachefs-tools-static. It's just made very
explicit.
Kind regards,
T G-R
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 247 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Why doesn't Guix build static libraries?
2021-10-31 11:48 ` Tobias Geerinckx-Rice
@ 2021-10-31 15:03 ` Denis 'GNUtoo' Carikli
2021-10-31 16:13 ` Tobias Geerinckx-Rice
0 siblings, 1 reply; 4+ messages in thread
From: Denis 'GNUtoo' Carikli @ 2021-10-31 15:03 UTC (permalink / raw)
To: Tobias Geerinckx-Rice; +Cc: Tim Lee, help-guix
[-- Attachment #1: Type: text/plain, Size: 421 bytes --]
On Sun, 31 Oct 2021 12:48:19 +0100
Tobias Geerinckx-Rice <me@tobias.gr> wrote:
> My worry is that leaving .a files around will cause some build
> systems to silently prefer them to the .so and link statically. I
> can't remember the name of the packages, but this does happen.
Could it also do that when the static libraries are split in their
own package/derivation like openssl:static for instance?
Denis.
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Why doesn't Guix build static libraries?
2021-10-31 15:03 ` Denis 'GNUtoo' Carikli
@ 2021-10-31 16:13 ` Tobias Geerinckx-Rice
0 siblings, 0 replies; 4+ messages in thread
From: Tobias Geerinckx-Rice @ 2021-10-31 16:13 UTC (permalink / raw)
To: Denis 'GNUtoo' Carikli; +Cc: Tim Lee, help-guix
[-- Attachment #1: Type: text/plain, Size: 203 bytes --]
Denis 'GNUtoo' Carikli 写道:
> Could it also do that when the static libraries are split in
> their
> own package/derivation like openssl:static for instance?
Nope.
Kind regards,
T G-R
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 247 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2021-10-31 16:13 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-10-31 4:49 Why doesn't Guix build static libraries? Tim Lee
2021-10-31 11:48 ` Tobias Geerinckx-Rice
2021-10-31 15:03 ` Denis 'GNUtoo' Carikli
2021-10-31 16:13 ` Tobias Geerinckx-Rice
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).