From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id eORfDC2HfmGoJwAAgWs5BA (envelope-from ) for ; Sun, 31 Oct 2021 13:08:13 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id UK/9By2HfmHPDQAAB5/wlQ (envelope-from ) for ; Sun, 31 Oct 2021 12:08:13 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 61F6729BE8 for ; Sun, 31 Oct 2021 13:08:12 +0100 (CET) Received: from localhost ([::1]:41180 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mh9dB-0000id-TA for larch@yhetil.org; Sun, 31 Oct 2021 08:08:09 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:41702) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mh9bY-0006jd-6E for help-guix@gnu.org; Sun, 31 Oct 2021 08:06:29 -0400 Received: from tobias.gr ([2a02:c205:2020:6054::1]:35444) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mh9bV-0006H1-Ui for help-guix@gnu.org; Sun, 31 Oct 2021 08:06:27 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; s=2018; bh=ACeqj+vV0iHbH /0FKWbfrRPZu0wZ5SwGIud6OJ6ZuEQ=; h=in-reply-to:date:subject:cc:to: from:references; d=tobias.gr; b=P671sJC5cmr8Wu7m4xxjCeoLbgNHIfeRoSKtDB oUAeqYS2C9mIlb3x4qJcoPuum/m887Xdk2fuONVZcoW0D2U7WGeL7QHkekS5lgcPuU36gy 3ctwX0PDmM7QDEwVEZhHw0L0QlDMcz6UuDOWY7CFugzWo1ADEobeYc7sWskfEXpgYrbspP FVFM8EIHFzY2IsR9oSXJJIc513YffH+yPT40/h77szmqzQocemgpiOFPuLFEmGdIhDFLEF kPh1+T4t/kgOHUqWKWUJNuokLLzmheGlfUwMT2Voq3VLdgXczcLwDQL0dzH4hyOaTt26g0 LBzQ6mvj6jkmkblMTFqHsNHw== Received: by submission.tobias.gr (OpenSMTPD) with ESMTPSA id 4ca929cc (TLSv1.3:AEAD-AES256-GCM-SHA384:256:NO); Sun, 31 Oct 2021 12:06:16 +0000 (UTC) References: <20211031044920.qbhhohp5onuyke5n@localhost> From: Tobias Geerinckx-Rice To: Tim Lee Cc: help-guix@gnu.org Subject: Re: Why doesn't Guix build static libraries? Date: Sun, 31 Oct 2021 12:48:19 +0100 In-reply-to: <20211031044920.qbhhohp5onuyke5n@localhost> BIMI-Selector: v=BIMI1; s=default; Message-ID: <87fssh2ybn.fsf@nckx> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" Received-SPF: pass client-ip=2a02:c205:2020:6054::1; envelope-from=me@tobias.gr; helo=tobias.gr X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-guix@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-guix-bounces+larch=yhetil.org@gnu.org Sender: "Help-Guix" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1635682092; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=ACeqj+vV0iHbH/0FKWbfrRPZu0wZ5SwGIud6OJ6ZuEQ=; b=CStzraru6jh8kdjZ8a4LmbcTKcIlS6CIEtmRYi1w/PLifHlByIMRm112DzM/qqMjGYZZww Lytk/pb/GYmvb929PnpS+XlkhxyvNgEtdq1/ghBgwoo3q+wWt7jXAdqJNp3xDmkZs/3CSV LR259z0Z5yFcHZbirwQaV8Nsa9etbAnjVTbH5/Lg4n1tOmiXB7BWw6d9o1xi2muIHwaXrw RKqTiyc8dTTUSB8tS4IqBb12TYPufzsf+ye4Z3EeaNsiX9ymch15YYhiHtV76iXw3BIRVz TMaSjdyEl5iR3KM6Y581F8SMnRUjlx1Q4tkWArpz35mPodHvvhB1DfhE42bqow== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1635682092; a=rsa-sha256; cv=none; b=ZnT8bzH4/3PFX1eG7WeLvzg/vGuDPLpYOJ+XONtsYzij6EdIkE3/tCdSgyyKuRDCfNZkvW u7Yx5hunwvctToyyHiuEwHNQSghzfzzHSvK6tBkGdbCxtiDAQ/DB5FGDb2rxWhEFpBZ+Wr OZcIXjJJVt/ThyzwpTorpZ2APxOWpQKEtFmEjUsG7pSqABdOsYekU6uW7lYkycOtLf25Ez 8qcjOuVH5TjIlScgncuHBcfY4gxfSF/apTlElexvczB6M36rKiWGqXiMinbOtQUZXG+A2A OgDKlvzurJOyec9csQePsbPDzjPSwiVd0DynoCPf8UL++BDpNn2bQ/Ey3x55eg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=tobias.gr header.s=2018 header.b=P671sJC5; spf=pass (aspmx1.migadu.com: domain of help-guix-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=help-guix-bounces@gnu.org X-Migadu-Spam-Score: -2.22 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=tobias.gr header.s=2018 header.b=P671sJC5; dmarc=pass (policy=reject) header.from=tobias.gr; spf=pass (aspmx1.migadu.com: domain of help-guix-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=help-guix-bounces@gnu.org X-Migadu-Queue-Id: 61F6729BE8 X-Spam-Score: -2.22 X-Migadu-Scanner: scn0.migadu.com X-TUID: 0mI4ukNArOeI --=-=-= Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable Tim, Tim Lee =E5=86=99=E9=81=93=EF=BC=9A > I noticed that many C and C++ libraries in Guix are built with=20 > the > --disable-static option. Why are static libraries excluded from=20 > Guix? I'll speak for myself: I remove static .a libraries whenever=20 they're not obviously required by other software in Guix. If=20 another package were to require them, I'd first try to fix it to=20 link dynamically. Static linking provides no serious advantages and at least one=20 serious disadvantage: it's invisible to grafting. If A statically=20 links to B, grafting B will leave A untouched and vulnerable. My worry is that leaving .a files around will cause some build=20 systems to silently prefer them to the .so and link statically. I=20 can't remember the name of the packages, but this does happen. Static linking is useful in tightly-controlled environments where=20 space is at a premium, i.e., the Guix System initrd. That's why=20 Guix has packages like bcachefs-tools-static. It's just made very=20 explicit. Kind regards, T G-R --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iIMEARYKACsWIQT12iAyS4c9C3o4dnINsP+IT1VteQUCYX6GvA0cbWVAdG9iaWFz LmdyAAoJEA2w/4hPVW154zkA/1ZOUyEnl7UdwgkXJt/A+H6B5+ZZQGyHCzrPUn8X 8PMsAP0WfG7vx3NrLiWZTW1nafVylOr4AhdScwSgHeFwkv0oDg== =pXcM -----END PGP SIGNATURE----- --=-=-=--