From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id mORCEz5vMGLGeQEAgWs5BA (envelope-from ) for ; Tue, 15 Mar 2022 11:49:34 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id mNf8Dz5vMGIcWgEAauVa8A (envelope-from ) for ; Tue, 15 Mar 2022 11:49:34 +0100 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 AB537171CF for ; Tue, 15 Mar 2022 11:49:33 +0100 (CET) Received: from localhost ([::1]:57068 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nU4k8-0002mI-IJ for larch@yhetil.org; Tue, 15 Mar 2022 06:49:32 -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 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Migadu-Flow: FLOW_IN X-Migadu-To: larch@yhetil.org X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1647341373; 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: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=dLvP26g3SSGcWzAATNhxt3dKilQ+D2ged+7Y6K5isR4=; b=MN1qXnH6HiOZ68ue6efwoGQYUX/soNbDOWSJIXNRfoVakC25LzBNaxNWryP2C6L0ZDsqcJ ylyucNg8kXlQuMPjQxAU6enFHyHe8oDib9TZ6MC7q+JeTJz3aMGgoEFKHNVW4eUoUoyFG3 N3rPvW2pRZ1tZEJYtaSuPFz0WbgnyPIZUus3zc7Z4Csyj7FaVpiK89THF/moPODahBKtWY W5ShhJObFgYDGoYIMd+FiiXkT5p5XJuVOGyK1uIDt4W1+lW8O7xSqR48E2iS/S3BERtlLb socU2H1VNZB+DlCdcnQOxXi0jwJad++tePCHYUIQEivZIonyZ9X64oCxh1GdFw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1647341373; a=rsa-sha256; cv=none; b=OH5AoaQ8tLc7RTsF9UWxgnF9nAxGUW6FIrO8GHflicE9FoZtn0h9ixqPf1zVb0QB/8F7ws hsmd6vlYWSDCcldcO1rnAyCxwKWaC5KAfRUlIM94CZeDFID05tQZgfJiBE0L6uPKcgeXRO pTJ1Ja2yl9y93wToAOsgmNCe+xrmRXkZpEMpP7JwlNSExie4nDX1QI+DvZZ9Tf2LXrnp7d Vx39De0B63okKxe9z1HRCU3QWjZav2Fm3pH1EXKkAAtKCZj5uxwNcFU5dRA04bCrUJhnNM lPOV5e+65cCdxBikdw5DgBOeBZkf/Ahzijycc1kE82RPtztaKQr4rVRQqn2AiQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -2.67 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: AB537171CF X-Spam-Score: -2.67 X-Migadu-Scanner: scn0.migadu.com X-TUID: ryDLJXgiLGxW 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, -- Tanguy --- gnu/packages/mail.scm | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) 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+))) -- 2.34.0