GNU bug report logs -
#39412
[PATCH 0/2] gnu: emacs-telega: Build with emacs-wide-int on 32-bit systems.
Previous Next
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 39412 in the body.
You can then email your comments to 39412 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
guix-patches <at> gnu.org
:
bug#39412
; Package
guix-patches
.
(Tue, 04 Feb 2020 09:45:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Diego Nicola Barbato <dnbarbato <at> posteo.de>
:
New bug report received and forwarded. Copy sent to
guix-patches <at> gnu.org
.
(Tue, 04 Feb 2020 09:45:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
Hi Guix,
Telega requires wide Emacs integers (62-bit), so it checks whether
`most-positive-fixnum' is equal to 2305843009213693951. Due to a
performance penalty [0] wide Emacs integers have to be explicitly
enabled on 32-bit architectures. Because of this `emacs-telega'
currently fails to build on armhf-linux and i686-linux.
The following two patches fix this by first adding a variant of
`emacs' with wide ints enabled and then using this `emacs-wide-int'
instead of `emacs' to build `emacs-telega' on 32-bit systems.
I am not completely happy with this solution, because wide ints are
not required to build Telega but to run it: A user installing
`emacs-telega' alongside "vanilla" `emacs' on a 32-bit machine will be
greeted with cryptic parse errors when trying to run Telega. Would it
be enough to mention that `emacs-telega' has to be installed alongside
`emacs-wide-int' on 32-bit systems in the description?
I have chosen this approach over building the regular Emacs package
with the "--with-wide-ints" flag because I do not think the
performance penalty is justified. What do others think?
In the long run it should be possible to drop this workaround once
Emacs 27, which introduces bignums, is released. With those Telega
should work on 32-bit Emacs without wide ints.
Regards,
Diego
[0]: Emacs' configure.ac file talks about a 10% to 30% slowdown of the
Lisp interpreter and a larger memory footprint.
Diego Nicola Barbato (2):
gnu: Add emacs-wide-int.
gnu: emacs-telega: Build with emacs-wide-int on 32-bit systems.
gnu/packages/emacs-xyz.scm | 7 ++++++-
gnu/packages/emacs.scm | 11 +++++++++++
2 files changed, 17 insertions(+), 1 deletion(-)
--
2.25.0
Information forwarded
to
guix-patches <at> gnu.org
:
bug#39412
; Package
guix-patches
.
(Tue, 04 Feb 2020 09:50:01 GMT)
Full text and
rfc822 format available.
Message #8 received at 39412 <at> debbugs.gnu.org (full text, mbox):
* 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 b26c928e87..53123a6c82 100644
--- a/gnu/packages/emacs.scm
+++ b/gnu/packages/emacs.scm
@@ -380,6 +380,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.25.0
Information forwarded
to
guix-patches <at> gnu.org
:
bug#39412
; Package
guix-patches
.
(Tue, 04 Feb 2020 09:51:02 GMT)
Full text and
rfc822 format available.
Message #11 received at 39412 <at> debbugs.gnu.org (full text, mbox):
Fixes <https://bugs.gnu.org/39406>.
Reported by <lmedeiros <at> riseup.net>.
* 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 9936127a18..f4c58e94b2 100644
--- a/gnu/packages/emacs-xyz.scm
+++ b/gnu/packages/emacs-xyz.scm
@@ -20613,7 +20613,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.25.0
Information forwarded
to
guix-patches <at> gnu.org
:
bug#39412
; Package
guix-patches
.
(Tue, 04 Feb 2020 11:16:02 GMT)
Full text and
rfc822 format available.
Message #14 received at 39412 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
I'll start by saying I'm not a user of emacs or of emacs-telega.
On Tue, Feb 04, 2020 at 10:43:51AM +0100, Diego Nicola Barbato wrote:
> Hi Guix,
>
> Telega requires wide Emacs integers (62-bit), so it checks whether
> `most-positive-fixnum' is equal to 2305843009213693951. Due to a
> performance penalty [0] wide Emacs integers have to be explicitly
> enabled on 32-bit architectures. Because of this `emacs-telega'
> currently fails to build on armhf-linux and i686-linux.
I assume it actually needs '--with-wide-ints' and that patching out the
check wouldn't actually fix the problem.
> The following two patches fix this by first adding a variant of
> `emacs' with wide ints enabled and then using this `emacs-wide-int'
> instead of `emacs' to build `emacs-telega' on 32-bit systems.
>
> I am not completely happy with this solution, because wide ints are
> not required to build Telega but to run it: A user installing
> `emacs-telega' alongside "vanilla" `emacs' on a 32-bit machine will be
> greeted with cryptic parse errors when trying to run Telega. Would it
> be enough to mention that `emacs-telega' has to be installed alongside
> `emacs-wide-int' on 32-bit systems in the description?
I don't like this plan so much. It means relying on the users to read
the description which is something I normally only do when I don't know
what package I'm looking for.
> I have chosen this approach over building the regular Emacs package
> with the "--with-wide-ints" flag because I do not think the
> performance penalty is justified. What do others think?
10-30% performance penalty across the board in emacs is pretty severe for
one package. Otherwise that would've been my suggestion.
> In the long run it should be possible to drop this workaround once
> Emacs 27, which introduces bignums, is released. With those Telega
> should work on 32-bit Emacs without wide ints.
Do we know how long it may be before Emacs 27 is out? If it's not that
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.
>
> Regards,
>
> Diego
>
> [0]: Emacs' configure.ac file talks about a 10% to 30% slowdown of the
> Lisp interpreter and a larger memory footprint.
Thank you for looking into this!
--
Efraim Flashner <efraim <at> flashner.co.il> אפרים פלשנר
GPG key = A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted
[signature.asc (application/pgp-signature, inline)]
Information forwarded
to
guix-patches <at> gnu.org
:
bug#39412
; Package
guix-patches
.
(Thu, 26 Mar 2020 13:17:02 GMT)
Full text and
rfc822 format available.
Message #17 received at 39412 <at> debbugs.gnu.org (full text, mbox):
Hi Efraim,
Sorry for the long delay.
Efraim Flashner <efraim <at> flashner.co.il> writes:
> I'll start by saying I'm not a user of emacs or of emacs-telega.
>
> On Tue, Feb 04, 2020 at 10:43:51AM +0100, Diego Nicola Barbato wrote:
>> Hi Guix,
>>
>> Telega requires wide Emacs integers (62-bit), so it checks whether
>> `most-positive-fixnum' is equal to 2305843009213693951. Due to a
>> performance penalty [0] wide Emacs integers have to be explicitly
>> enabled on 32-bit architectures. Because of this `emacs-telega'
>> currently fails to build on armhf-linux and i686-linux.
>
> I assume it actually needs '--with-wide-ints' and that patching out the
> check wouldn't actually fix the problem.
Yes, that would lead to the same cryptic errors (i.e. assertion
failures) I mentioned below when running it (although it would build
successfully) on 32-bit systems.
>> The following two patches fix this by first adding a variant of
>> `emacs' with wide ints enabled and then using this `emacs-wide-int'
>> instead of `emacs' to build `emacs-telega' on 32-bit systems.
>>
>> I am not completely happy with this solution, because wide ints are
>> not required to build Telega but to run it: A user installing
>> `emacs-telega' alongside "vanilla" `emacs' on a 32-bit machine will be
>> greeted with cryptic parse errors when trying to run Telega. Would it
>> be enough to mention that `emacs-telega' has to be installed alongside
>> `emacs-wide-int' on 32-bit systems in the description?
>
> I don't like this plan so much. It means relying on the users to read
> the description which is something I normally only do when I don't know
> what package I'm looking for.
>
>> I have chosen this approach over building the regular Emacs package
>> with the "--with-wide-ints" flag because I do not think the
>> performance penalty is justified. What do others think?
>
> 10-30% performance penalty across the board in emacs is pretty severe for
> one package. Otherwise that would've been my suggestion.
>
>> In the long run it should be possible to drop this workaround once
>> Emacs 27, which introduces bignums, is released. With those Telega
>> should work on 32-bit Emacs without wide ints.
>
> Do we know how long it may be before Emacs 27 is out? If it's not that
The release cycle for Emacs 27 was started in late December [1] and a
pretest has been released [2], but I don't know how long it's going to
be until 27.1.
> 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.
If v2 is still considered inadequate I'm fine with dropping the patches
and waiting for Emacs 27 instead (the failing test would still have to
be tweaked to make it aware of bignums).
> Thank you for looking into this!
Thanks for your feedback!
Diego
>> [0]: Emacs' configure.ac file talks about a 10% to 30% slowdown of the
>> Lisp interpreter and a larger memory footprint.
[1]: https://lists.gnu.org/archive/html/emacs-devel/2019-12/msg00635.html
[2]: https://lists.gnu.org/archive/html/emacs-devel/2020-03/msg00045.html
Information forwarded
to
guix-patches <at> gnu.org
:
bug#39412
; Package
guix-patches
.
(Thu, 26 Mar 2020 13:18:01 GMT)
Full text and
rfc822 format available.
Message #20 received at 39412 <at> debbugs.gnu.org (full text, mbox):
* 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 de19998a41..b52849c578 100644
--- a/gnu/packages/emacs.scm
+++ b/gnu/packages/emacs.scm
@@ -398,6 +398,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
Information forwarded
to
guix-patches <at> gnu.org
:
bug#39412
; Package
guix-patches
.
(Thu, 26 Mar 2020 13:19:01 GMT)
Full text and
rfc822 format available.
Message #23 received at 39412 <at> debbugs.gnu.org (full text, mbox):
Fixes <https://bugs.gnu.org/39406>.
Reported by <lmedeiros <at> riseup.net>.
* 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 7b67cc37ae..401dbdec2c 100644
--- a/gnu/packages/emacs-xyz.scm
+++ b/gnu/packages/emacs-xyz.scm
@@ -20671,7 +20671,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
Information forwarded
to
guix-patches <at> gnu.org
:
bug#39412
; Package
guix-patches
.
(Thu, 26 Mar 2020 13:19:02 GMT)
Full text and
rfc822 format available.
Message #26 received at 39412 <at> debbugs.gnu.org (full text, mbox):
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 7cce60b7c0..eb6998cb65 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1448,6 +1448,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 401dbdec2c..23a988625d 100644
--- a/gnu/packages/emacs-xyz.scm
+++ b/gnu/packages/emacs-xyz.scm
@@ -20580,6 +20580,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..7b2600d13b
--- /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)
+ (telega--create-hier)
+
+ (unless (telega-server-live-p)
--
2.26.0
Information forwarded
to
guix-patches <at> gnu.org
:
bug#39412
; Package
guix-patches
.
(Tue, 28 Apr 2020 14:05:02 GMT)
Full text and
rfc822 format available.
Message #29 received at 39412 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Hi,
Diego Nicola Barbato <dnbarbato <at> posteo.de> 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
[v3-0001-gnu-Add-emacs-wide-int.patch (text/x-patch, attachment)]
[v3-0002-gnu-emacs-telega-Build-with-emacs-wide-int-on-32-.patch (text/x-patch, attachment)]
[v3-0003-gnu-emacs-telega-Test-Emacs-environment-on-startu.patch (text/x-patch, attachment)]
Reply sent
to
Efraim Flashner <efraim <at> flashner.co.il>
:
You have taken responsibility.
(Tue, 28 Apr 2020 17:48:02 GMT)
Full text and
rfc822 format available.
Notification sent
to
Diego Nicola Barbato <dnbarbato <at> posteo.de>
:
bug acknowledged by developer.
(Tue, 28 Apr 2020 17:48:02 GMT)
Full text and
rfc822 format available.
Message #34 received at 39412-done <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Looks good. patch pushed!
--
Efraim Flashner <efraim <at> flashner.co.il> אפרים פלשנר
GPG key = A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted
[signature.asc (application/pgp-signature, inline)]
Information forwarded
to
guix-patches <at> gnu.org
:
bug#39412
; Package
guix-patches
.
(Tue, 28 Apr 2020 20:28:02 GMT)
Full text and
rfc822 format available.
Message #37 received at 39412 <at> debbugs.gnu.org (full text, mbox):
Efraim Flashner <efraim <at> flashner.co.il> writes:
> Looks good. patch pushed!
Thanks!
I went ahead and closed https://debbugs.gnu.org/39406.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Wed, 27 May 2020 11:24:05 GMT)
Full text and
rfc822 format available.
This bug report was last modified 4 years and 213 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.