[PATCH 0/2] Fix two emacs packages with native compilation.

  • Done
  • quality assurance status badge
Details
2 participants
  • John Kehayias
  • Liliana Marie Prikler
Owner
unassigned
Submitted by
John Kehayias
Severity
normal

Debbugs page

John Kehayias wrote 2 years ago
(name . Guix-patches)(address . guix-patches@gnu.org)
87tu4vtoie.fsf@protonmail.com
Hi,

I noticed that emacs-pdf-tools was failing if trying to native compile at build with --with-input=emacs-minimal=emacs as noted in the recent native compilation news. The error was just an exit status of 255, but I diagnosed by running the given compilation command in emacs to find the problem. The culprit is missing the phase that adds the install directory to the native load path (where emacs will try to write the compiled files) for this package as it manually pulls in the emacs build phases. Simply adding this missing phase (new with native compilation) fixes the problem.

While I was at it, I checked for any other packages with a similar problem, with a quick search through emacs-xyz. I found only emacs-libgit and fixed it similarly. I may have missed others or in other modules, but pdf-tools was the only one so far from my emacs packages.

I checked that both packages build normally and with native compilation, and checked that those that depend on emacs-libgit built fine too.

Thanks!
John
John Kehayias wrote 2 years ago
[PATCH 1/2] gnu: emacs-pdf-tools: Fix build with native compilation.
(address . 58078@debbugs.gnu.org)
87o7v3to3x.fsf@protonmail.com
Empty Message
From 1bbe765fb9972dbc9073e01ba66e30a8d806f962 Mon Sep 17 00:00:00 2001
From: John Kehayias <john.kehayias@protonmail.com>
Date: Sun, 25 Sep 2022 12:07:11 -0400
Subject: [PATCH 1/2] gnu: emacs-pdf-tools: Fix build with native compilation.
* gnu/packages/emacs-xyz.scm (emacs-pdf-tools)[phases]: Add the
add-install-to-native-load-path phase from emacs:%standard-phases after the
emacs-expand-load-path phase.
---
gnu/packages/emacs-xyz.scm | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
Toggle diff (17 lines)
diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm
index e48757ee69..b6e64f812d 100644
--- a/gnu/packages/emacs-xyz.scm
+++ b/gnu/packages/emacs-xyz.scm
@@ -4047,7 +4047,9 @@ (define-public emacs-pdf-tools
("pdf-tools-handle-upgrades" '()))))
(add-after 'emacs-patch-variables 'emacs-expand-load-path
(assoc-ref emacs:%standard-phases 'expand-load-path))
- (add-after 'emacs-expand-load-path 'emacs-install
+ (add-after 'emacs-expand-load-path 'emacs-add-install-to-native-load-path
+ (assoc-ref emacs:%standard-phases 'add-install-to-native-load-path))
+ (add-after 'emacs-add-install-to-native-load-path 'emacs-install
(assoc-ref emacs:%standard-phases 'install))
(add-after 'emacs-install 'emacs-build
(assoc-ref emacs:%standard-phases 'build))
--
2.37.3
John Kehayias wrote 2 years ago
[PATCH 2/2] gnu: emacs-libgit: Fix build with native compilation.
(address . 58078@debbugs.gnu.org)
87mtanto2j.fsf@protonmail.com
Empty Message
From b36fdf8b739d901307d26295016760dd4c6f7b0d Mon Sep 17 00:00:00 2001
From: John Kehayias <john.kehayias@protonmail.com>
Date: Sun, 25 Sep 2022 12:11:02 -0400
Subject: [PATCH 2/2] gnu: emacs-libgit: Fix build with native compilation.
* gnu/packages/emacs-xyz.scm (emacs-libgit)[phases]: Add the
add-install-to-native-load-path phase from emacs:%standard-phases after the
unpack phase.
---
gnu/packages/emacs-xyz.scm | 2 ++
1 file changed, 2 insertions(+)
Toggle diff (15 lines)
diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm
index b6e64f812d..eb6879b3b9 100644
--- a/gnu/packages/emacs-xyz.scm
+++ b/gnu/packages/emacs-xyz.scm
@@ -967,6 +967,8 @@ (define-public emacs-libgit
(install #:outputs outputs
#:include (cons "\\.so$"
emacs:%default-include)))))
+ (add-after 'unpack 'emacs-add-install-to-native-load-path
+ (assoc-ref emacs:%standard-phases 'add-install-to-native-load-path))
(add-after 'install 'make-autoloads
(assoc-ref emacs:%standard-phases 'make-autoloads))
(add-after 'make-autoloads 'enable-autoloads-compilation
--
2.37.3
Liliana Marie Prikler wrote 2 years ago
(name . John Kehayias)(address . john.kehayias@protonmail.com)(address . 58078-done@debbugs.gnu.org)
9937fdb62d4885cb1ceaea36cf744c7351635353.camel@gmail.com
Pushed both to master.

Thanks!
Closed
?
Your comment

This issue is archived.

To comment on this conversation send an email to 58078@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 58078
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch
You may also tag this issue. See list of standard tags. For example, to set the confirmed and easy tags
mumi command -t +confirmed -t +easy
Or, remove the moreinfo tag and set the help tag
mumi command -t -moreinfo -t +help