From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id wLv0L93Bcl8nZAAA0tVLHw (envelope-from ) for ; Tue, 29 Sep 2020 05:10:53 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id yGjpK93Bcl8eMQAA1q6Kng (envelope-from ) for ; Tue, 29 Sep 2020 05:10:53 +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 463CF9402B1 for ; Tue, 29 Sep 2020 05:10:53 +0000 (UTC) Received: from localhost ([::1]:55936 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kN7ue-00010o-4l for larch@yhetil.org; Tue, 29 Sep 2020 01:10:52 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:53004) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kN7uV-00010e-Bo for guix-devel@gnu.org; Tue, 29 Sep 2020 01:10:43 -0400 Received: from flashner.co.il ([178.62.234.194]:41912) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kN7uP-0007dt-G3 for guix-devel@gnu.org; Tue, 29 Sep 2020 01:10:43 -0400 Received: from localhost (unknown [31.210.181.177]) by flashner.co.il (Postfix) with ESMTPSA id E6765403D2; Tue, 29 Sep 2020 05:10:03 +0000 (UTC) Date: Tue, 29 Sep 2020 08:09:31 +0300 From: Efraim Flashner To: Greg Hogan Subject: Re: Building a library as both static and dynamic Message-ID: <20200929050931.GE1386@E5400> References: <5F6328DA-112E-45F9-B6F0-2132E43A6BB0@greghogan.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="T6xhMxlHU34Bk0ad" Content-Disposition: inline In-Reply-To: <5F6328DA-112E-45F9-B6F0-2132E43A6BB0@greghogan.com> X-PGP-Key-ID: 0x41AAE7DCCA3D8351 X-PGP-Key: https://flashner.co.il/~efraim/efraim_flashner.asc X-PGP-Fingerprint: A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351 Received-SPF: pass client-ip=178.62.234.194; envelope-from=efraim@flashner.co.il; helo=flashner.co.il X-detected-operating-system: by eggs.gnu.org: First seen = 2020/09/29 01:10:04 X-ACL-Warn: Detected OS = ??? X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: guix-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: guix-devel@gnu.org Errors-To: guix-devel-bounces+larch=yhetil.org@gnu.org Sender: "Guix-devel" X-Scanner: scn0 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of guix-devel-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-devel-bounces@gnu.org X-Spam-Score: 0.69 X-TUID: eTmjf0U7eP6+ --T6xhMxlHU34Bk0ad Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, Sep 27, 2020 at 07:57:19AM -0400, Greg Hogan wrote: > Is there a best practice or example for building a library twice, both st= atic and dynamic? I submitted patch #43620, and in working on another libra= ry have the same issue. These are cmake builds with a parameter declaration= for either a static or dynamic build, not both. I would like to create a s= ingle package with both =E2=80=9Cout=E2=80=9D and =E2=80=9Cstatic=E2=80=9D = outputs, which looks to be standard across Guix. >=20 > One idea is to run the configure / make / make install phases twice. modi= fy-phases does not currently support copying phases (though add-after could= work with the right function reference from cmake-build) and #:configure-f= lags would need to be set differently. >=20 > Another option would be to patch the source build files, but this problem= feels solvable in Guix without duplicating the code from cmake-build=E2=80= =99s configure. >=20 > Thanks, > Greg x265 is a package that uses cmake and is built multiple times with different options and with a separate static output. --=20 Efraim Flashner =D7=90=D7=A4=D7=A8=D7=99=D7=9D = =D7=A4=D7=9C=D7=A9=D7=A0=D7=A8 GPG key =3D A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351 Confidentiality cannot be guaranteed on emails sent or received unencrypted --T6xhMxlHU34Bk0ad Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEoov0DD5VE3JmLRT3Qarn3Mo9g1EFAl9ywYcACgkQQarn3Mo9 g1Hg3hAAqDOnq+YO0t+hwKIm6G+p/YZCQYFOu3eSSD9yPpwY8xNJioAKeaqDk0z7 +wHW1SW/Oncm0CoaChJJrJIXDH69NLRLZkvmbA6t68mIVtA9nOHJ+XzT06A+OVgf 4qD5n5ZMnj+89BKKC9OHZ6SswmRfJrc0bj/eNs0k4bSO2Sq5OOm1QCP1+z8n54q0 ZGax+RcmnIFYEq2PHDPh78F0kZgfH6SNLarxpb5vbSISEqf1O+AGARgEXgMmvykf +/3GQcvEqO9rdB8xo4QG0AS9CU/xu+hMOz3hUxkz7BwHxuITtkjPW1jYF4C8ZWt9 15EPvgZPF69eYeVAMtX8vn9N28CmmO3RTGXVboPCJEKEmuSH6q6nKCZMkdZt7eVs /3mS6gIsC5O8T25yU3Y3+zxo6J/dy5rYQhRw+DOJj1DCjP4XYgC/RTXVg0B8GKmX CljJ8f1oZPZehN+8SWxfg3ZnEQAuqmVMn9OYOvhGoT2sI0BIrn9mowFv3ysLVB8M OW2QpN1ZSqAVXv5BS1AVxpG074v24Vi6rPsRNsd+Zxa/xm6m/Lrn6KRSNMnQ/82K A5PrINzmJvpIpBTpuHuCiCkca/vJIRKMgdTZE6K3zrZaYlCAboBLMbh9dAzsOHUd Qb9PN9nz0jyuZkRVqggIccl3xSGEmxH5LTRSRWJ9OYMTstwHIvE= =C44T -----END PGP SIGNATURE----- --T6xhMxlHU34Bk0ad--