From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id 8N8FJZqPcF/jLwAA0tVLHw (envelope-from ) for ; Sun, 27 Sep 2020 13:11:54 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id jKjaIJqPcF//bwAAB5/wlQ (envelope-from ) for ; Sun, 27 Sep 2020 13:11:54 +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 F03F39404C5 for ; Sun, 27 Sep 2020 13:11:53 +0000 (UTC) Received: from localhost ([::1]:42436 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kMWT2-00075q-Rl for larch@yhetil.org; Sun, 27 Sep 2020 09:11:52 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:48994) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kMVIy-0000Ch-52 for guix-devel@gnu.org; Sun, 27 Sep 2020 07:57:24 -0400 Received: from mail-qt1-x830.google.com ([2607:f8b0:4864:20::830]:33955) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kMVIw-0004Hn-Dr for guix-devel@gnu.org; Sun, 27 Sep 2020 07:57:23 -0400 Received: by mail-qt1-x830.google.com with SMTP id 19so6109917qtp.1 for ; Sun, 27 Sep 2020 04:57:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=greghogan-com.20150623.gappssmtp.com; s=20150623; h=from:content-transfer-encoding:mime-version:subject:message-id:date :to; bh=8vR9wL1UEYOeUoC5iSH11oRlWA9o8S1W/ZMwm5RHKqY=; b=zwOFDFxMmKN+Q6HHMuGV3JEBy3cLkLu1E817tMd8qecbosDTANC9IBFhOGqkV3lh18 YZ8ViX6JH1npZKKX2S2eglTC6NhvTEoCywDCKhwFruKJNiLUsK/kKK+4TAwj6LIXpo7W Jpsr55Piz1seezAokbq8W/ogDxAjOciPgZFswWv33eZ4F9eWUVPKwNtbd5NcEKL72VSo sLT81Q7q00z45oiCGivvaT6uOn0qvEK4aA6ff1mFKnBUDGDCcuCKMuHjuIx9u7iXO1av CYIUszjbawlRfb+5Cg61L/v1ST6sx1yLVY4PmCW9ylju4lQ49Mnho/CPzN52tO8OJieA wrPQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:content-transfer-encoding:mime-version :subject:message-id:date:to; bh=8vR9wL1UEYOeUoC5iSH11oRlWA9o8S1W/ZMwm5RHKqY=; b=GSc+4sx8KQ6ZHNyjdSK/QkJYC3Gv4QrALd8LR4rMWtIS9IVQlfuj4Ov94owAToMsmV DTK6T5UXFPT1Y0Glu8NwycCqw2wldyXXeZCYhbM6OFhVNbU7+3KBpH3/l1moaptqpI9G 1d6S3p/lAEy1R+xCKfz2zQGazUYCJUBwrukD7zcTTkWsYdGgKWo7B0pXzZXD+SRrjdqJ AHF0P10niVSLIgMhtJj2lXt7AjQlBt9oVvUkTk0ihWly/ZCyWoK6gA6676VHmo5Kkr3Q jGZuZxJ9piGW+4rtE63BYFk7z46vH4FWhmYhVzubEhXVZPP6gI7+nDdrHPiAxx56gr6q hEmw== X-Gm-Message-State: AOAM530fS/wgLPStLxKfAKna/HY2l6n7SbiRZmwwS4MlebTEVaFIv3zy ac2HQOYUs68LuVNO5uiDDTXa9L/tTEGbMYNt X-Google-Smtp-Source: ABdhPJw1wHsTyDMUNnX9xDRCB/g9VTK/h9xCrRoS3M6H4UrIQgYxEqHDMQL1wZhEsW5XgLA9KpZfmw== X-Received: by 2002:ac8:33ec:: with SMTP id d41mr8128547qtb.390.1601207840896; Sun, 27 Sep 2020 04:57:20 -0700 (PDT) Received: from [10.0.0.25] (pool-173-69-176-48.bltmmd.fios.verizon.net. [173.69.176.48]) by smtp.gmail.com with ESMTPSA id m10sm6859447qti.46.2020.09.27.04.57.19 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sun, 27 Sep 2020 04:57:20 -0700 (PDT) From: Greg Hogan Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Mac OS X Mail 13.4 \(3608.120.23.2.4\)) Subject: Building a library as both static and dynamic Message-Id: <5F6328DA-112E-45F9-B6F0-2132E43A6BB0@greghogan.com> Date: Sun, 27 Sep 2020 07:57:19 -0400 To: guix-devel@gnu.org X-Mailer: Apple Mail (2.3608.120.23.2.4) Received-SPF: none client-ip=2607:f8b0:4864:20::830; envelope-from=code@greghogan.com; helo=mail-qt1-x830.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. 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, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_NONE=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Sun, 27 Sep 2020 09:11:42 -0400 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: , Errors-To: guix-devel-bounces+larch=yhetil.org@gnu.org Sender: "Guix-devel" X-Scanner: scn0 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=greghogan-com.20150623.gappssmtp.com header.s=20150623 header.b=zwOFDFxM; 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.71 X-TUID: x9XUzpWUZneJ Is there a best practice or example for building a library twice, both = static and dynamic? I submitted patch #43620, and in working on another = library 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 single package with both =E2=80=9Cout=E2=80=9D and = =E2=80=9Cstatic=E2=80=9D outputs, which looks to be standard across = Guix. One idea is to run the configure / make / make install phases twice. = modify-phases does not currently support copying phases (though = add-after could work with the right function reference from cmake-build) = and #:configure-flags would need to be set differently. 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. Thanks, Greg=