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 ms0.migadu.com with LMTPS id 8DVYDlBiw2H6bgEAgWs5BA (envelope-from ) for ; Wed, 22 Dec 2021 18:37:20 +0100 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 EAoxClBiw2GKRAAAB5/wlQ (envelope-from ) for ; Wed, 22 Dec 2021 17:37:20 +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 C13E54052 for ; Wed, 22 Dec 2021 18:37:19 +0100 (CET) Received: from localhost ([::1]:47572 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1n05YE-0005R7-Ry for larch@yhetil.org; Wed, 22 Dec 2021 12:37:18 -0500 Received: from eggs.gnu.org ([209.51.188.92]:51352) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n05Y1-0005OK-8g for bug-guix@gnu.org; Wed, 22 Dec 2021 12:37:05 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:48128) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1n05Xy-0001uy-4c for bug-guix@gnu.org; Wed, 22 Dec 2021 12:37:03 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1n05Xx-0003Ei-Uu for bug-guix@gnu.org; Wed, 22 Dec 2021 12:37:01 -0500 X-Loop: help-debbugs@gnu.org Subject: bug#52684: [BUG] Multiple Packages Failing to Build Resent-From: Maxime Devos Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Wed, 22 Dec 2021 17:37:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 52684 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: Christopher Rodriguez , 52684@debbugs.gnu.org Received: via spool by 52684-submit@debbugs.gnu.org id=B52684.164019457812387 (code B ref 52684); Wed, 22 Dec 2021 17:37:01 +0000 Received: (at 52684) by debbugs.gnu.org; 22 Dec 2021 17:36:18 +0000 Received: from localhost ([127.0.0.1]:59674 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1n05XG-0003Dj-3H for submit@debbugs.gnu.org; Wed, 22 Dec 2021 12:36:18 -0500 Received: from michel.telenet-ops.be ([195.130.137.88]:40388) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1n05XE-0003DZ-6S for 52684@debbugs.gnu.org; Wed, 22 Dec 2021 12:36:17 -0500 Received: from ptr-bvsjgyhxw7psv60dyze.18120a2.ip6.access.telenet.be ([IPv6:2a02:1811:8c09:9d00:3c5f:2eff:feb0:ba5a]) by michel.telenet-ops.be with bizsmtp id ZVcE260084UW6Th06VcEyl; Wed, 22 Dec 2021 18:36:14 +0100 Message-ID: From: Maxime Devos Date: Wed, 22 Dec 2021 17:36:14 +0000 In-Reply-To: References: <7ee7ed76-4676-6c86-87f0-8d7ab886fc50@gmail.com> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.38.3-1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r21; t=1640194574; bh=V25RoDHy7/1vpir5YyUNACXKaLHECfnhlBd1tOOLh6k=; h=Subject:From:To:Date:In-Reply-To:References; b=Rzy4AxHJaVI4+MXkG+H80fLLgTdrBnKmmHJ+w3nVaNYyz9XLTX5mF5AqcWPHZ1Zlg aZKAzG+dm+So45IVAnQXRu7xGFc8z9GO+yClWEI/8qKMK+h8fCtyp66wQGLKKjQXXj y8mhFBFg2L682YulF5UJ+leVEFB7B8Y2mJOXU2KX/aOydOajg/Y2KwUcFpB4dum1KQ 31N005z6TEoAr34iRn0mif5YSbw+QWQO9Z8nFzgD3nL13W2fOOU9UV/C0dOfOo+UYT tqjnX3n7wupInXDlLGEgVTKhwNbjYzinsu+TsSqqZEmgW9F3oXavKdI3YyVai5cde/ cOMLAISIijNHQ== X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-guix@gnu.org List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+larch=yhetil.org@gnu.org Sender: "bug-Guix" X-Migadu-Flow: FLOW_IN X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1640194639; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=V25RoDHy7/1vpir5YyUNACXKaLHECfnhlBd1tOOLh6k=; b=b7pVH97Yo0wncmWjcWtFaUmGpd/GYZiqynMZy2OqoIb6iS414XQtr/LlOiuTpipTYOWTDA 4YXLJLu2nDjE8o8lc1EMX0x59ZKO+YFxB9+uSd/RWQpOe2b9ADyu3oKhkgwhjzcd1iXPJG LNryHiUD7GFSczFdUL+6ivScBBjjXmpDSDcqi6iOhzb2g+Nh6+1PFtEwcwhm+r3/J/02S+ vaTjEoG0pvR2C23dw0HL5Q9k75YlOeuXlGZt3cT/2DPHzh/7hqjFr3ZjrUBfDe0RZgOJw+ Uj8y0EKUieVgmppJOq34snoOq0RjZh8ZZotEBDtcd7Blp9cd5PTLuFzM0M6Jow== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1640194639; a=rsa-sha256; cv=none; b=DZBKXcMoY9TLi050hwa/uYMaWRoISGiAK8EjkY7PhquR/jj3HDvYGLQdB2L/9H4OIXrvbp JYvTpk4r/+qJSvjjh3mHau4THpHuy9Fd1bInYSChWCRF4VnmeGP3KlcPmtrHiODEtSW6jx 75AyD+6h2rxIVhykun3Jcl+rcSbBoRioGGSfnGqYhwhqsxOYPH/4G10HnEWVOl27IqnygV sB55fImiPvf+VF7QQefBCupVbP/wf2VhFtk3+2Pc3Zwg0cjpH8bmwFfmDvPZWpFde7VV9+ +tAkkH1W2Ma1+8fmMfr8h4wjBvhFZZgrBD6xjpiCGZ2hzW2yvr8FxgNRKSgZ2A== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=telenet.be header.s=r21 header.b=Rzy4AxHJ; dmarc=fail reason="SPF not aligned (relaxed)" header.from=telenet.be (policy=none); spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -3.24 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=telenet.be header.s=r21 header.b=Rzy4AxHJ; dmarc=fail reason="SPF not aligned (relaxed)" header.from=telenet.be (policy=none); spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: C13E54052 X-Spam-Score: -3.24 X-Migadu-Scanner: scn0.migadu.com X-TUID: a2fr2ZQnqwQM Hi, Christopher Rodriguez schreef op wo 22-12-2021 om 12:07 [-0500]: > So, I took some time to do some digging this morning, and I now have a > few results and a few more questions. > > First, I tried `guix shell --pure python beets beets-bandcamp` to ensure > that the plugin would be detected once `GUIX_PYTHONPATH` was set as You > had mentioned. That did work, though the environment did not have > `python-isodate`, which the plugin complained was missing. If this is > the case, should python-isodate then be a progagated input, since it is > apparently required at runtime? > Yes, but not for that reason. If it's required at runtime, it needs to be in 'inputs' or 'propagated-inputs'. Ideally, 'inputs' would be sufficient, but python doesn't have RUNPATH so we have to do with propagation. It's probably possible to modify the plugins to adjust the load path when the plugin is loaded, avoiding the need of propagation, though that might be fragile and complicated. (I don't have any examples of packages currently doing this.) > Or is there a difference w/r/t the > `--pure` environment that won't be present on an actual install? The --pure just makes sure you don't reuse old environment variables, which is useful to make sure there aren't any missing propagated-inputs (or anything that needs to be substitute*-ed, but no substitution appears to be required in beets). It is largely equivalent to removing all packages in your user profile and system profile (including things like 'bash' and 'coreutils'!) and then installing python, beets and beets-bandcamp, except that "guix shell --pure" is way more convenient. > Second, I ran `cat $(which beet)` on my currently installed `beets` > package for the `PYTHON_PATH` that is currently being set. It has a lot > of entries, all like the following: > `/gnu/store/8df74df68i14lfjsny07x7cq6ffn0fs5-beets-1.5.0/lib/python3.8/site-packages:/gnu/store/nc3rprg62sigx8s9ps02wb8zbaz8qzl3-python-flask-1.1.2/lib/python3.8/site-packages`. > I'm currently diving each of these packages to see how I might add code > to set `beets-bandcamp` to add to this list, though I wonder if that is > actually possible, since the plugin will usually be installed after the > root program. Is this path pulled from a global location, or is it > determined at install time? You cannot retroactively modify store items. I.e., the build code of 'beets-bandcamp' cannot modify the 'beet' binary. If that were possible, it would open a can of reproducibility and security worms (think e.g. of multi-user systems -- they are rare, but they do exist). The path in a wrapper of a package P is determined when the package P is built. > Third, I did try pulling > > ```scheme > (native-search-paths >    (list (guix-pythonpath-search-path))) > ``` > > into the `beets` definition, but that brought a *lot* of other > dependencies in. Same with using Not sure what you mean here. A lot more dependencies in GUIX_PYTHONPATH in the environment variables of the profile, or in the wrapper, or ...? > ```scheme > (native-inputs >    `(("sitecustomize.py" ,(local-file (search-auxiliary-file >         "python/sitecustomize.py"))))) > ``` I don't know how sitecustomize.py works. > Sorry if I am missing something obvious, here. I will keep looking, just > wanted to log what I've tried so far. > > Once I figure out how search paths actually work inside of `guix`, I'm > sure the solution will be fairly simple. But I haven't quite gotten > there yet. > > It seems like the solution has to do with `wrap-package`, but looking at > the `beets` package definition, I only see the following lines related > to wrapping the binary: > > ```scheme >           ;; Wrap the executable, so it can find python-gi (aka >           ;; pygobject) and gstreamer plugins. >           (add-after 'wrap 'wrap-typelib >             (lambda* (#:key outputs #:allow-other-keys) >               (let ((prog (string-append (assoc-ref outputs "out") >                                          "/bin/beet")) >                     (plugins (getenv "GST_PLUGIN_SYSTEM_PATH")) >                     (types (getenv "GI_TYPELIB_PATH"))) >                 (wrap-program prog >                   `("GST_PLUGIN_SYSTEM_PATH" ":" prefix (,plugins)) >                   `("GI_TYPELIB_PATH" ":" prefix (,types))) >                 #t)))))) Look in python-build-system.scm, the build system also does some wrapping (you can wrap a program multiple times!). > ``` > It doesn't seem like PYTHONPATH is being interacted with here. Is that > something that might be defined elsewhere? > python-build-system sets GUIX_PYTHONPATH. I don't know the difference between PYTHONPATH and GUIX_PYTHONPATH. Some compatibility mechanism between foreign distros and Guix I presume. > I'm tempted to merge in the > following, which I pulled from another package (solfege), to explicitly > set PYTHONPATH… But I don't want to change something if it is set elsewhere. > > > ```scheme >           (add-after 'install 'wrap-program >             (lambda* (#:key inputs outputs #:allow-other-keys) >               ;; Make sure 'solfege' runs with the correct PYTHONPATH. >               (let* ((out (assoc-ref outputs "out")) >                      (path (getenv "GUIX_PYTHONPATH"))) >                 (wrap-program (string-append out "/bin/solfege") >                   `("GUIX_PYTHONPATH" ":" prefix (,path)))) >               #t))))) > ``` See python-build-system and some replies above ;-. > Any input or clarification will be appreciated! I'm learning a lot as I > (slowly) work through this! Thank You for Your time! Greetings, Maxime.