unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
* [bug#58078] [PATCH 0/2] Fix two emacs packages with native compilation.
@ 2022-09-25 16:25 John Kehayias via Guix-patches via
  2022-09-25 16:28 ` [bug#58078] [PATCH 1/2] gnu: emacs-pdf-tools: Fix build " John Kehayias via Guix-patches via
  2022-09-25 16:29 ` [bug#58078] [PATCH 2/2] gnu: emacs-libgit: " John Kehayias via Guix-patches via
  0 siblings, 2 replies; 4+ messages in thread
From: John Kehayias via Guix-patches via @ 2022-09-25 16:25 UTC (permalink / raw)
  To: 58078

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





^ permalink raw reply	[flat|nested] 4+ messages in thread

* [bug#58078] [PATCH 1/2] gnu: emacs-pdf-tools: Fix build with native compilation.
  2022-09-25 16:25 [bug#58078] [PATCH 0/2] Fix two emacs packages with native compilation John Kehayias via Guix-patches via
@ 2022-09-25 16:28 ` John Kehayias via Guix-patches via
  2022-09-25 16:29 ` [bug#58078] [PATCH 2/2] gnu: emacs-libgit: " John Kehayias via Guix-patches via
  1 sibling, 0 replies; 4+ messages in thread
From: John Kehayias via Guix-patches via @ 2022-09-25 16:28 UTC (permalink / raw)
  To: 58078

[-- Attachment #1: Type: text/plain, Size: 13 bytes --]

Empty Message

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-gnu-emacs-pdf-tools-Fix-build-with-native-compilatio.patch --]
[-- Type: text/x-patch; name=0001-gnu-emacs-pdf-tools-Fix-build-with-native-compilatio.patch, Size: 1413 bytes --]

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(-)

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


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [bug#58078] [PATCH 2/2] gnu: emacs-libgit: Fix build with native compilation.
  2022-09-25 16:25 [bug#58078] [PATCH 0/2] Fix two emacs packages with native compilation John Kehayias via Guix-patches via
  2022-09-25 16:28 ` [bug#58078] [PATCH 1/2] gnu: emacs-pdf-tools: Fix build " John Kehayias via Guix-patches via
@ 2022-09-25 16:29 ` John Kehayias via Guix-patches via
  2022-09-25 17:30   ` bug#58078: " Liliana Marie Prikler
  1 sibling, 1 reply; 4+ messages in thread
From: John Kehayias via Guix-patches via @ 2022-09-25 16:29 UTC (permalink / raw)
  To: 58078

[-- Attachment #1: Type: text/plain, Size: 13 bytes --]

Empty Message

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0002-gnu-emacs-libgit-Fix-build-with-native-compilation.patch --]
[-- Type: text/x-patch; name=0002-gnu-emacs-libgit-Fix-build-with-native-compilation.patch, Size: 1223 bytes --]

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(+)

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


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* bug#58078: [PATCH 2/2] gnu: emacs-libgit: Fix build with native compilation.
  2022-09-25 16:29 ` [bug#58078] [PATCH 2/2] gnu: emacs-libgit: " John Kehayias via Guix-patches via
@ 2022-09-25 17:30   ` Liliana Marie Prikler
  0 siblings, 0 replies; 4+ messages in thread
From: Liliana Marie Prikler @ 2022-09-25 17:30 UTC (permalink / raw)
  To: John Kehayias, 58078-done

Pushed both to master.

Thanks!




^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2022-09-25 17:31 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-25 16:25 [bug#58078] [PATCH 0/2] Fix two emacs packages with native compilation John Kehayias via Guix-patches via
2022-09-25 16:28 ` [bug#58078] [PATCH 1/2] gnu: emacs-pdf-tools: Fix build " John Kehayias via Guix-patches via
2022-09-25 16:29 ` [bug#58078] [PATCH 2/2] gnu: emacs-libgit: " John Kehayias via Guix-patches via
2022-09-25 17:30   ` bug#58078: " Liliana Marie Prikler

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).