From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:470:142:3::10]:41270) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jTQvA-0002co-GM for guix-patches@gnu.org; Tue, 28 Apr 2020 10:09:31 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.90_1) (envelope-from ) id 1jTQr9-0001xg-5U for guix-patches@gnu.org; Tue, 28 Apr 2020 10:09:12 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:57671) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jTQr8-0001xB-Jm for guix-patches@gnu.org; Tue, 28 Apr 2020 10:05:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jTQr8-0001yN-F8 for guix-patches@gnu.org; Tue, 28 Apr 2020 10:05:02 -0400 Subject: [bug#39412] [PATCH 0/2] gnu: emacs-telega: Build with emacs-wide-int on 32-bit systems. Resent-Message-ID: From: Diego Nicola Barbato References: <20200204094351.18671-1-dnbarbato@posteo.de> <20200204111424.GE19864@E5400> <87eetfcl4r.fsf@GlaDOS.home> Date: Tue, 28 Apr 2020 16:04:27 +0200 In-Reply-To: <87eetfcl4r.fsf@GlaDOS.home> (Diego Nicola Barbato's message of "Thu, 26 Mar 2020 14:15:48 +0100") Message-ID: <87pnbrhfkk.fsf@GlaDOS.home> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: Efraim Flashner Cc: 39412@debbugs.gnu.org --=-=-= Content-Type: text/plain Hi, Diego Nicola Barbato writes: [...] >> long I wonder if it'd be better for it to be unbuildable on 32-bit >> systems than to make it installable but unusable without changing other >> installed packages. > > IMO it's ok for it to require changing other installed packages during a > transitional period (e.g. guix repl currently doesn't work with > `guile-readline' and requires that the guile3.0 variant be installed > instead due to the transition in progress from Guile 2 to Guile 3). I > do believe that the failure mode of Telega running with `emacs' instead > of `emacs-wide-int' on a 32-bit system is problematic because it doesn't > make it clear what's wrong and how to fix it. I have tried to address > this in v2 of my patch series by patching Telega to run > `telega-test-env' (the failing test) on startup (i.e. `M-x telega'). > That way it fails immediately with the following error message: > > Emacs with wide ints (--with-wide-int) is required > > This should hopefully lead users on the right track. I've rebased the patches on master and modified the last one such that `telega-test-env' doesn't display a message when it succeeds. [...] Regards, Diego --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=v3-0001-gnu-Add-emacs-wide-int.patch >From 0197316358bc496f1d6868f3e41be7121ed8fa5f Mon Sep 17 00:00:00 2001 From: Diego Nicola Barbato Date: Sun, 29 Dec 2019 00:41:48 +0100 Subject: [PATCH v3 1/3] gnu: Add emacs-wide-int. * gnu/packages/emacs.scm (emacs-wide-int): New variable. --- gnu/packages/emacs.scm | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/gnu/packages/emacs.scm b/gnu/packages/emacs.scm index 3d0368be4e..ab7cc20d10 100644 --- a/gnu/packages/emacs.scm +++ b/gnu/packages/emacs.scm @@ -401,6 +401,17 @@ editor (without an X toolkit)" ) ((#:configure-flags cf) `(cons "--with-x-toolkit=no" ,cf))))))) +(define-public emacs-wide-int + (package + (inherit emacs) + (name "emacs-wide-int") + (synopsis "The extensible, customizable, self-documenting text +editor (with wide ints)" ) + (arguments + (substitute-keyword-arguments (package-arguments emacs) + ((#:configure-flags flags) + `(cons "--with-wide-int" ,flags)))))) + (define-public guile-emacs (let ((commit "41120e0f595b16387eebfbf731fff70481de1b4b") (revision "0")) -- 2.26.0 --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=v3-0002-gnu-emacs-telega-Build-with-emacs-wide-int-on-32-.patch >From 1b86cf0846233b19b4905537d566f9ea40f76dbd Mon Sep 17 00:00:00 2001 From: Diego Nicola Barbato Date: Sun, 29 Dec 2019 01:03:38 +0100 Subject: [PATCH v3 2/3] gnu: emacs-telega: Build with emacs-wide-int on 32-bit systems. Fixes . Reported by . * gnu/packages/emacs-xyz.scm (emacs-telega)[native-inputs]: Replace emacs with emacs-wide-int on 32-bit systems. This is needed because Telega requires 62-bit wide ints. --- gnu/packages/emacs-xyz.scm | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm index 0ae3f72fb7..e5bd414d75 100644 --- a/gnu/packages/emacs-xyz.scm +++ b/gnu/packages/emacs-xyz.scm @@ -21419,7 +21419,12 @@ fish-completion. It can be used in both Eshell and M-x shell.") (native-inputs `(("tdlib" ,tdlib) ("libtgvoip" ,libtgvoip) ; VoIP support. - ("emacs" ,emacs) + ;; Use Emacs with wide ints on 32-bit architectures. + ("emacs" ,(match (%current-system) + ((or "i686-linux" "armhf-linux") + emacs-wide-int) + (_ + emacs))) ("python" ,python))) (synopsis "GNU Emacs client for the Telegram messenger") (description -- 2.26.0 --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=v3-0003-gnu-emacs-telega-Test-Emacs-environment-on-startu.patch >From 6f6a35fd07559aa484a59c4b6267e01db41921a3 Mon Sep 17 00:00:00 2001 From: Diego Nicola Barbato Date: Fri, 7 Feb 2020 17:59:31 +0100 Subject: [PATCH v3 3/3] gnu: emacs-telega: Test Emacs environment on startup. Print a more helpful error message when someone attempts to run Telega on an incompatible Emacs (e.g a 32-bit Emacs without wide ints). * gnu/packages/patches/telega-test-env.patch: New file. * gnu/local.mk (dist_patch_DATA): Add it. * gnu/packages/emacs-xyz.scm (emacs-telega): Use it. --- gnu/local.mk | 1 + gnu/packages/emacs-xyz.scm | 2 ++ gnu/packages/patches/telega-test-env.patch | 14 ++++++++++++++ 3 files changed, 17 insertions(+) create mode 100644 gnu/packages/patches/telega-test-env.patch diff --git a/gnu/local.mk b/gnu/local.mk index 9f212434a9..5787c675dd 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1470,6 +1470,7 @@ dist_patch_DATA = \ %D%/packages/patches/tcsh-fix-autotest.patch \ %D%/packages/patches/tcsh-fix-out-of-bounds-read.patch \ %D%/packages/patches/teensy-loader-cli-help.patch \ + %D%/packages/patches/telega-test-env.patch \ %D%/packages/patches/texinfo-5-perl-compat.patch \ %D%/packages/patches/texlive-bin-CVE-2018-17407.patch \ %D%/packages/patches/texlive-bin-luatex-poppler-compat.patch \ diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm index e5bd414d75..01758bbbc5 100644 --- a/gnu/packages/emacs-xyz.scm +++ b/gnu/packages/emacs-xyz.scm @@ -21328,6 +21328,8 @@ fish-completion. It can be used in both Eshell and M-x shell.") (sha256 (base32 "0mv6i80958d9crzspzik5xh5g8326115bvg2frgv0dp9p6rm86m3")) + (patches + (search-patches "telega-test-env.patch")) (file-name (git-file-name name version)))) (build-system gnu-build-system) (arguments diff --git a/gnu/packages/patches/telega-test-env.patch b/gnu/packages/patches/telega-test-env.patch new file mode 100644 index 0000000000..75fe2e12fc --- /dev/null +++ b/gnu/packages/patches/telega-test-env.patch @@ -0,0 +1,14 @@ +Test Emacs environment on startup. + +Patch by Diego N. Barbato + +--- a/telega.el 2020-02-07 17:07:18.549970090 +0100 ++++ b/telega.el 2020-02-07 17:10:08.383499765 +0100 +@@ -82,6 +82,7 @@ + "Start telegramming. + If prefix ARG is given, then will not pop to telega root buffer." + (interactive "P") ++ (telega-test-env t) + (telega--create-hier) + + (unless (telega-server-live-p) -- 2.26.0 --=-=-=--