all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: akrl@sdf.org, Stefan Monnier <monnier@iro.umontreal.ca>
Cc: emacs-devel@gnu.org
Subject: Re: Building a release tarball generates trampoline files in eln-cache
Date: Thu, 04 Nov 2021 13:12:29 +0200	[thread overview]
Message-ID: <83bl30fa3m.fsf@gnu.org> (raw)
In-Reply-To: <jwvmtmmparm.fsf-monnier+emacs@gnu.org> (message from Stefan Monnier on Tue, 02 Nov 2021 16:26:22 -0400)

> From: Stefan Monnier <monnier@iro.umontreal.ca>
> Cc: Andrea Corallo <akrl@sdf.org>,  emacs-devel@gnu.org
> Date: Tue, 02 Nov 2021 16:26:22 -0400
> 
> Eli Zaretskii [2021-11-02 21:47:42] wrote:
> >> From: Andrea Corallo <akrl@sdf.org>
> >> Cc: emacs-devel@gnu.org
> >> Date: Tue, 02 Nov 2021 19:22:56 +0000
> >> > This shows errors in the *Compile Log* buffer(??)
> >> >
> >> >   lisp/emacs-lisp/seq.elc: Error: Symbol’s function definition is void: gv-setter
> >> >   lisp/term/xterm.elc: Error: Symbol’s function definition is void: t
> >> >
> >> > If I delete seq.elc, the problem goes away.
> >> >
> >> > How do I investigate this?
> >> 
> >> I guess a start is to run in gdb to see where the function definition of
> >> gv-setter was last time changed (if ever).
> >> 
> >> I guess `gv-setter' was compiled and dumped, therefore its definition
> >> it's expected to be revived by 'load_comp_unit' called from
> >> pdumper.c:5355 while Emacs is starting-up.
> >
> > Thanks, will try.
> >
> > Any idea why the errors show in *Compile Log* buffer?  Where did that
> > buffer come from?
> 
> I'd guess that it's when `cl-generic.el` calls `byte-compile` (both
> seq.el and xterm.el use `cl-defmethod`).
> `cl-generic.el` is also one of the rare users of `gv-setter`.
> OTOH, `gv-setter` normally doesn't appear within the code that
> `cl-generic.el` passes to `byte-compile`, instead `gv-setter` is called
> directly by `cl-generic.el`, so my guess might be off.

Maybe, maybe not.

The crucial detail here is that I invoke "emacs -nw" (are you using
"-nw" in your attempts to reproduce?).  What happens then is that we
load the terminal-specific support file, in this case xterm.elc,
during startup.  And since xterm.el is not preloaded, it is not
natively-compiled by the build process.  So once we load it, Emacs
tries to native-compile it, and all of its prerequisites, and that's
where those errors and that compile log buffer come from, I guess.

I tried to mark xterm.el and seq.el as not for native-compile, but
that didn't help.  However, if I manually compile gv.el natively into
a *.eln file, the problem goes away.

So why would Emacs want to native-compile gv.el in this case, and why
trying that causes this problem?  Maybe we should add gv.el to the
list of files that are natively-compiled as part of the build?

Interestingly, if gv-XXX.eln is available, Emacs still loads bytecomp
at startup, but I don't see any evidence that it compiles xterm.el
natively: no subprocesses and no xterm-XXX.eln files are created.  Why
does it load bytecomp, and what prevents it from natively compiling
xterm.el in this case?



  reply	other threads:[~2021-11-04 11:12 UTC|newest]

Thread overview: 40+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-09  8:19 Building a release tarball generates trampoline files in eln-cache Eli Zaretskii
2021-10-09 14:37 ` Ken Brown
2021-10-09 15:05   ` Eli Zaretskii
2021-10-09 15:39     ` Ken Brown
2021-10-09 17:33       ` Ken Brown
2021-10-09 17:51         ` Eli Zaretskii
2021-10-13 19:37           ` Andrea Corallo via Emacs development discussions.
2021-10-14  6:18             ` Eli Zaretskii
2021-10-15  7:35               ` Andrea Corallo via Emacs development discussions.
2021-10-15 18:08                 ` Ken Brown
2021-10-16  8:34                 ` Eli Zaretskii
2021-10-16  9:04                   ` Andrea Corallo
2021-10-16  9:30                     ` Eli Zaretskii
2021-10-16  9:55                       ` Eli Zaretskii
2021-10-16 13:42                         ` Ken Brown
2021-10-16 20:15                         ` Andrea Corallo
2021-10-17  5:56                           ` Eli Zaretskii
2021-10-18 20:46                             ` Andrea Corallo
2021-10-27 16:32                             ` Eli Zaretskii
2021-11-02 18:45                               ` Eli Zaretskii
2021-11-02 19:22                                 ` Andrea Corallo
2021-11-02 19:44                                   ` Stefan Monnier
2021-11-02 19:47                                   ` Eli Zaretskii
2021-11-02 19:51                                     ` Andrea Corallo
2021-11-02 20:26                                     ` Stefan Monnier
2021-11-04 11:12                                       ` Eli Zaretskii [this message]
2021-11-05 15:39                                         ` Andrea Corallo
2021-11-05 15:49                                           ` Andrea Corallo
2021-11-08 15:07                                             ` Eli Zaretskii
2021-11-09 21:55                                               ` Andrea Corallo
2021-11-10 18:37                                                 ` Eli Zaretskii
2021-11-11 15:08                                                   ` Andrea Corallo
2021-11-11 16:50                                                     ` Eli Zaretskii
2021-11-11 21:01                                                       ` Andrea Corallo
2021-11-13 14:47                                                         ` Eli Zaretskii
2021-11-13 20:33                                                           ` Andrea Corallo
2021-11-15 17:34                                                             ` Eli Zaretskii
2021-11-15 19:37                                                               ` Andrea Corallo
2021-11-02 19:49                                   ` Andrea Corallo
2021-11-02 20:09                                     ` Andrea Corallo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=83bl30fa3m.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=akrl@sdf.org \
    --cc=emacs-devel@gnu.org \
    --cc=monnier@iro.umontreal.ca \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.