From patchwork Tue Mar 15 09:38:14 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Tanguy LE CARROUR X-Patchwork-Id: 37837 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 1256E27BBEA; Tue, 15 Mar 2022 10:49:38 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-3.9 required=5.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_MSPIKE_H5,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 7489227BBE9 for ; Tue, 15 Mar 2022 10:49:37 +0000 (GMT) Received: from localhost ([::1]:57068 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nU4kC-0002mI-Js for patchwork@mira.cbaines.net; Tue, 15 Mar 2022 06:49:36 -0400 Received: from eggs.gnu.org ([209.51.188.92]:38068) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nU3es-0006yE-Db for guix-patches@gnu.org; Tue, 15 Mar 2022 05:40:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:53686) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nU3es-0005Wo-3J for guix-patches@gnu.org; Tue, 15 Mar 2022 05:40:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nU3er-000896-VP for guix-patches@gnu.org; Tue, 15 Mar 2022 05:40:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#54396] [PATCH] [WIP] gnu: python-notmuch2: Fix build. Resent-From: Tanguy Le Carrour Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 15 Mar 2022 09:40:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 54396 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 54396@debbugs.gnu.org Cc: Tanguy Le Carrour X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.164733714431223 (code B ref -1); Tue, 15 Mar 2022 09:40:01 +0000 Received: (at submit) by debbugs.gnu.org; 15 Mar 2022 09:39:04 +0000 Received: from localhost ([127.0.0.1]:47583 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nU3dq-000879-LV for submit@debbugs.gnu.org; Tue, 15 Mar 2022 05:39:04 -0400 Received: from lists.gnu.org ([209.51.188.17]:42298) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nU3do-000871-Hn for submit@debbugs.gnu.org; Tue, 15 Mar 2022 05:38:57 -0400 Received: from eggs.gnu.org ([209.51.188.92]:37896) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nU3do-0006UC-AU for guix-patches@gnu.org; Tue, 15 Mar 2022 05:38:56 -0400 Received: from relay1-d.mail.gandi.net ([217.70.183.193]:44557) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nU3dm-0005Qv-3V for guix-patches@gnu.org; Tue, 15 Mar 2022 05:38:56 -0400 Received: (Authenticated sender: tanguy@bioneland.org) by mail.gandi.net (Postfix) with ESMTPSA id 1B968240009; Tue, 15 Mar 2022 09:38:45 +0000 (UTC) From: Tanguy Le Carrour Date: Tue, 15 Mar 2022 10:38:14 +0100 Message-Id: <20220315093814.25033-1-tanguy@bioneland.org> X-Mailer: git-send-email 2.34.0 MIME-Version: 1.0 Received-SPF: none client-ip=217.70.183.193; envelope-from=tanguy@bioneland.org; helo=relay1-d.mail.gandi.net X-Spam_score_int: -25 X-Spam_score: -2.6 X-Spam_bar: -- X-Spam_report: (-2.6 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_NONE=0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches Hi Guix, I'm (still) trying to fix a build failure I (unsuccessfully) reported here: . I've tried and produced a patch, but, somehow, I cannot make it work! :-( ``` + (setenv "SHELL" (which "sh")) + (setenv "CONFIG_SHELL" (which "sh")) ``` I'm not sure those lines are required, but at this point I've just copied/pasted code I found in an other package definition. ``` + ;(invoke "./configure" (string-append "--prefix=" out))))) + (invoke "bash" "./configure" (string-append "--prefix=" out))))) ``` If I "just" invoke `./configure` I get an error code, but no error message. I had to prepend `bash` to get the error message telling me that `cc` and `gcc` were missing. ``` + #:use-module (gnu packages commencement) ; […] + (native-inputs (list gcc-toolchain)) ``` When I add `#:use-module (gnu packages commencement)` I get the following error message I cannot decipher: ``` error: tcc: unbound variable hint: Did you forget a `use-modules' form? error: googletest: unbound variable hint: Did you forget a `use-modules' form? ; […] Throw to key `unbound-variable' with args `("resolve-interface" "no binding `~A' in module ~A" (python (gnu packages python)) #f)'. Backtrace: In guix/store.scm: 658:37 19 (thunk) 1320:8 18 (call-with-build-handler # …) In guix/scripts/build.scm: 499:2 17 (_) In srfi/srfi-1.scm: 673:15 16 (append-map _ _ . _) 586:17 15 (map1 ((argument . "python-notmuch2") (build-mode . 0) …)) In guix/scripts/build.scm: 519:31 14 (_ _) In gnu/packages.scm: 478:2 13 (%find-package "python-notmuch2" "python-notmuch2" #f) 363:6 12 (find-best-packages-by-name _ _) 293:56 11 (_ "python-notmuch2" _) In unknown file: 10 (force #) In gnu/packages.scm: 240:33 9 (fold-packages # …) In guix/discovery.scm: 159:11 8 (all-modules _ #:warn _) In srfi/srfi-1.scm: 460:18 7 (fold # …) In guix/discovery.scm: 149:19 6 (_ _ ()) 116:5 5 (scheme-modules _ _ #:warn _) In srfi/srfi-1.scm: 691:23 4 (filter-map # . #) In guix/discovery.scm: 124:24 3 (_ . _) In guix/ui.scm: 325:2 2 (report-unbound-variable-error _ #:frame _) In ice-9/boot-9.scm: 1685:16 1 (raise-exception _ #:continuable? _) 1685:16 0 (raise-exception _ #:continuable? _) ice-9/boot-9.scm:1685:16: In procedure raise-exception: Throw to key `match-error' with args `("match" "no matching pattern" (unbound-variable "resolve-interface" "no binding `~A' in module ~A" (python (gnu packages python)) #f))'. ``` Any advice welcome! Regards, diff --git a/gnu/packages/mail.scm b/gnu/packages/mail.scm index d253ca7011..e7cf07944d 100644 --- a/gnu/packages/mail.scm +++ b/gnu/packages/mail.scm @@ -28,7 +28,7 @@ ;;; Copyright © 2018 Alex Vong ;;; Copyright © 2018 Gábor Boskovits ;;; Copyright © 2018, 2019, 2020, 2021, 2022 Ricardo Wurmus -;;; Copyright © 2019, 2020, 2021 Tanguy Le Carrour +;;; Copyright © 2019, 2020-2022 Tanguy Le Carrour ;;; Copyright © 2020 Vincent Legoll ;;; Copyright © 2020 Justus Winter ;;; Copyright © 2020 Eric Brown @@ -75,6 +75,7 @@ (define-module (gnu packages mail) #:use-module (gnu packages boost) #:use-module (gnu packages calendar) #:use-module (gnu packages check) + #:use-module (gnu packages commencement) #:use-module (gnu packages compression) #:use-module (gnu packages crypto) #:use-module (gnu packages curl) @@ -1486,14 +1487,24 @@ (define-public python-notmuch2 (package (inherit python-notmuch) (name "python-notmuch2") - (propagated-inputs (list python-cffi)) (arguments `(#:phases (modify-phases %standard-phases + ;; configure generates `bindings/python-cffi/_notmuch_config.py` + ;; https://git.notmuchmail.org/git?p=notmuch;a=commit;h=7b5921877e748338359a25dae578771f768183af + (add-after 'unpack 'run-configure + (lambda* (#:key outputs #:allow-other-keys) + (let ((out (assoc-ref outputs "out"))) + (setenv "SHELL" (which "sh")) + (setenv "CONFIG_SHELL" (which "sh")) + ;(invoke "./configure" (string-append "--prefix=" out))))) + (invoke "bash" "./configure" (string-append "--prefix=" out))))) ;; This python package lives in a subdirectory of the notmuch source ;; tree, so chdir into it before building. - (add-after 'unpack 'enter-python-dir + (add-after 'run-configure 'enter-python-dir (lambda _ (chdir "bindings/python-cffi")))))) + (native-inputs (list gcc-toolchain)) + (propagated-inputs (list python-cffi)) (synopsis "Pythonic bindings for the notmuch mail database using CFFI") (license license:gpl3+)))