GNU bug report logs - #67260
[PATCH emacs-team 0/2] Think ahead when compiling

Previous Next

Package: guix-patches;

Reported by: Liliana Marie Prikler <liliana.prikler <at> gmail.com>

Date: Sat, 18 Nov 2023 13:50:02 UTC

Severity: normal

Tags: patch

Done: Liliana Marie Prikler <liliana.prikler <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


Message #53 received at 67260 <at> debbugs.gnu.org (full text, mbox):

From: Liliana Marie Prikler <liliana.prikler <at> gmail.com>
To: Andrew Tropin <andrew <at> trop.in>, 67260 <at> debbugs.gnu.org
Cc: Mekeor Melire <mekeor <at> posteo.de>, Josselin Poiret <dev <at> jpoiret.xyz>,
 cox.katherine.e+guix <at> gmail.com
Subject: Re: [PATCH v4 1/5] gnu: emacs: Build trampolines.
Date: Wed, 27 Dec 2023 21:03:15 +0100
Am Mittwoch, dem 27.12.2023 um 21:27 +0300 schrieb Andrew Tropin:
> On 2023-12-27 17:40, Liliana Marie Prikler wrote:
> 
> > Am Mittwoch, dem 27.12.2023 um 14:00 +0300 schrieb Andrew Tropin:
> > > On 2023-11-25 12:13, Liliana Marie Prikler wrote:
> > > 
> > > > * gnu/packages/emacs.scm (emacs-no-x)[#:phases]: Add ‘build-
> > > > trampolines’.
> > > > 
> > > > Change-Id: I33303bcbaf6cbda15867a5546e793c05d1f0e67b
> > > > ---
> > > >  gnu/packages/emacs.scm | 5 ++++-
> > > >  1 file changed, 4 insertions(+), 1 deletion(-)
> > > > 
> > > > diff --git a/gnu/packages/emacs.scm b/gnu/packages/emacs.scm
> > > > index b9d9e2b891..55eab48c25 100644
> > > > --- a/gnu/packages/emacs.scm
> > > > +++ b/gnu/packages/emacs.scm
> > > > @@ -327,7 +327,10 @@ (define-public emacs-no-x
> > > >                      (string-append
> > > >                       "-B" #$(this-package-input "libgccjit")
> > > > "/lib/")
> > > >                      (string-append
> > > > -                     "-B" #$(this-package-input "libgccjit")
> > > > "/lib/gcc/"))))))))))
> > > > +                     "-B" #$(this-package-input "libgccjit")
> > > > "/lib/gcc/"))))))
> > > > +            (add-after 'build 'build-trampolines
> > > > +              (lambda* (#:key make-flags #:allow-other-keys)
> > > > +                (apply invoke "make" "trampolines" make-
> > > > flags)))))))
> > > >      (inputs
> > > >       (modify-inputs (package-inputs emacs-minimal)
> > > >         (prepend gnutls
> > > > 
> > > > base-commit: 60c97924e9519361494aaf0686e28eb831a42315
> > > 
> > > Applied the patch series v4 to emacs-team branch, removed all eln
> > > files
> > > in ~/.cache/emacs and ~/.config/emacs, executed
> > > 
> > > --8<---------------cut here---------------start------------->8---
> > > ./pre-inst-env guix shell emacs-pgtk emacs-magit \
> > > --pure -E '.*GTK.*|.*XDG.*|.*DISPLAY.*' -- emacs -Q
> > > # M-S-: (require 'magit) RET
> > > --8<---------------cut here---------------end--------------->8---
> > You're missing --with-input=emacs-minimal=emacs.  You are not
> > natively compiling emacs-magit atm.
> 
> Right, thank you!
Turns out you also need to do this with emacs-no-x due to emacs-libgit.

Friendly reminder that we don't have build system/packaging utilities
to easily replace emacs versions yet, so magit might not have been the
wisest choice to showcase here.

More worryingly, it appears you're recompiling Emacs itself here.  This
should not be happening.  However, it turns out that your eln-cache is
always first on the native load path and thus already compiled files
won't be found.¹  Try adding 
  --eval='(setq native-comp-jit-compilation nil)'
and see whether you can load natively compiled procedures and have them
show as natively compiled.

Cheers

¹ Maybe there's a smarter way to locate them files?  Did I go wrong in
one of my patches?





This bug report was last modified 1 year and 78 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.