emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Building a release tarball generates trampoline files in eln-cache


From: Andrea Corallo
Subject: Re: Building a release tarball generates trampoline files in eln-cache
Date: Fri, 05 Nov 2021 15:39:08 +0000
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

Eli Zaretskii <eliz@gnu.org> writes:

>> 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, 

Apparently emacs (-nw -Q) wants to compile gv.el because once started
`gv-get' is used (still in byte compiled form).

This is the backtrace from where we take the decision:

===========================

#0  maybe_defer_native_compilation (function_name=XIL(0x7ffff3c4f3e8), 
definition=XIL(0xb9f5ed)) at comp.c:4848
#1  0x000000000055b053 in Fdefalias (symbol=XIL(0x7ffff3c4f3e8), 
definition=XIL(0xb9f5ed), docstring=XIL(0)) at data.c:830
#2  0x00000000005766af in eval_sub (form=<optimized out>) at lisp.h:2108
#3  0x00000000005a51b6 in readevalloop (readcharfun=XIL(0x68a0), 
infile0=0x7fffffffb860, sourcename=XIL(0xc4e604), printflag=false, 
unibyte=<optimized out>, 
    readfun=XIL(0), start=XIL(0), end=<optimized out>) at lread.c:2320
#4  0x00000000005a5fc7 in Fload (file=<optimized out>, noerror=<optimized out>, 
nomessage=XIL(0x30), nosuffix=<optimized out>, must_suffix=<optimized out>)
    at lisp.h:1008
#5  0x00000000005a65aa in save_match_data_load (file=XIL(0x7ffff47519cc), 
noerror=noerror@entry=XIL(0), nomessage=nomessage@entry=XIL(0x30), 
    nosuffix=nosuffix@entry=XIL(0), must_suffix=must_suffix@entry=XIL(0x30)) at 
lread.c:1623
#6  0x00000000005736a5 in Fautoload_do_load (fundef=XIL(0x7ffff475199b), 
funname=XIL(0x7ffff3c4f3e8), macro_only=XIL(0)) at lisp.h:1008
#7  0x0000000000573966 in Ffuncall (nargs=3, args=args@entry=0x7fffffffba28) at 
lisp.h:1008
#8  0x00000000005b75c0 in exec_byte_code (bytestr=<optimized out>, 
vector=<optimized out>, maxdepth=<optimized out>, args_template=<optimized 
out>, 
    nargs=<optimized out>, args=<optimized out>) at bytecode.c:632
#9  0x00000000005738b9 in Ffuncall (nargs=3, args=0x7fffffffbd10) at eval.c:3042
#10 0x0000000000573d08 in Fapply (nargs=2, args=0x7fffffffbda0) at eval.c:2656
#11 0x0000000000577ed7 in apply1 (arg=<optimized out>, fn=<optimized out>) at 
lisp.h:1376
#12 Fmacroexpand (form=XIL(0xd49813), environment=XIL(0xcbe143)) at eval.c:1139
#13 0x0000000000573a63 in Ffuncall (nargs=3, args=0x7fffffffbe30) at lisp.h:2108
#14 0x00007ffff3f55c92 in 
F6d6163726f6578702d6d6163726f657870616e64_macroexp_macroexpand_0 ()
   from 
.../emacs-28.0.60/src/../native-lisp/28.0.60-e950671c/preloaded/macroexp-2c3e1495-8e8af7d5.eln
#15 0x0000000000573a63 in Ffuncall (nargs=3, args=0x7fffffffbf70) at lisp.h:2108
#16 0x00007ffff3f56f72 in 
F6d6163726f6578702d2d657870616e642d616c6c_macroexp__expand_all_0 ()
   from 
.../emacs-28.0.60/src/../native-lisp/28.0.60-e950671c/preloaded/macroexp-2c3e1495-8e8af7d5.eln
#17 0x0000000000573a63 in Ffuncall (nargs=2, args=0x7fffffffc0f0) at lisp.h:2108
#18 0x00007ffff3f54f69 in 
F6d6163726f6578702d2d616c6c2d666f726d73_macroexp__all_forms_0 ()
   from 
.../emacs-28.0.60/src/../native-lisp/28.0.60-e950671c/preloaded/macroexp-2c3e1495-8e8af7d5.eln
#19 0x0000000000573a63 in Ffuncall (nargs=3, args=0x7fffffffc1e0) at lisp.h:2108
#20 0x00007ffff3f56cfb in F616e6f6e796d6f75732d6c616d626461_anonymous_lambda_5 
()
   from 
.../emacs-28.0.60/src/../native-lisp/28.0.60-e950671c/preloaded/macroexp-2c3e1495-8e8af7d5.eln
#21 0x00007ffff3f5789f in 
F6d6163726f6578702d2d657870616e642d616c6c_macroexp__expand_all_0 ()
   from 
.../emacs-28.0.60/src/../native-lisp/28.0.60-e950671c/preloaded/macroexp-2c3e1495-8e8af7d5.eln
#22 0x0000000000573a63 in Ffuncall (nargs=2, args=0x7fffffffc420) at lisp.h:2108
#23 0x00007ffff3f54f69 in 
F6d6163726f6578702d2d616c6c2d666f726d73_macroexp__all_forms_0 ()
   from 
.../emacs-28.0.60/src/../native-lisp/28.0.60-e950671c/preloaded/macroexp-2c3e1495-8e8af7d5.eln
#24 0x0000000000573a63 in Ffuncall (nargs=2, args=0x7fffffffc4f0) at lisp.h:2108
#25 0x00007ffff3f575e0 in 
F6d6163726f6578702d2d657870616e642d616c6c_macroexp__expand_all_0 ()
   from 
.../emacs-28.0.60/src/../native-lisp/28.0.60-e950671c/preloaded/macroexp-2c3e1495-8e8af7d5.eln
#26 0x0000000000573a63 in Ffuncall (nargs=2, args=0x7fffffffc6a0) at lisp.h:2108
#27 0x00007ffff3f54f69 in 
F6d6163726f6578702d2d616c6c2d666f726d73_macroexp__all_forms_0 ()
   from 
.../emacs-28.0.60/src/../native-lisp/28.0.60-e950671c/preloaded/macroexp-2c3e1495-8e8af7d5.eln
#28 0x0000000000573a63 in Ffuncall (nargs=3, args=0x7fffffffc7e0) at lisp.h:2108
#29 0x00007ffff3f574c6 in 
F6d6163726f6578702d2d657870616e642d616c6c_macroexp__expand_all_0 ()
   from 
.../emacs-28.0.60/src/../native-lisp/28.0.60-e950671c/preloaded/macroexp-2c3e1495-8e8af7d5.eln
#30 0x0000000000573a63 in Ffuncall (nargs=2, args=0x7fffffffc920) at lisp.h:2108
#31 0x00007ffff3f54f69 in 
F6d6163726f6578702d2d616c6c2d666f726d73_macroexp__all_forms_0 ()
   from 
.../emacs-28.0.60/src/../native-lisp/28.0.60-e950671c/preloaded/macroexp-2c3e1495-8e8af7d5.eln
#32 0x0000000000573a63 in Ffuncall (nargs=2, args=0x7fffffffc9f0) at lisp.h:2108
#33 0x00007ffff3f575e0 in 
F6d6163726f6578702d2d657870616e642d616c6c_macroexp__expand_all_0 ()
   from 
.../emacs-28.0.60/src/../native-lisp/28.0.60-e950671c/preloaded/macroexp-2c3e1495-8e8af7d5.eln
#34 0x0000000000573a63 in Ffuncall (nargs=2, args=0x7fffffffcba0) at lisp.h:2108
#35 0x00007ffff3f54f69 in 
F6d6163726f6578702d2d616c6c2d666f726d73_macroexp__all_forms_0 ()
   from 
.../emacs-28.0.60/src/../native-lisp/28.0.60-e950671c/preloaded/macroexp-2c3e1495-8e8af7d5.eln
#36 0x0000000000573a63 in Ffuncall (nargs=3, args=0x7fffffffcce0) at lisp.h:2108
#37 0x00007ffff3f574c6 in 
F6d6163726f6578702d2d657870616e642d616c6c_macroexp__expand_all_0 ()
   from 
.../emacs-28.0.60/src/../native-lisp/28.0.60-e950671c/preloaded/macroexp-2c3e1495-8e8af7d5.eln
#38 0x0000000000573a63 in Ffuncall (nargs=2, args=0x7fffffffcdf0) at lisp.h:2108
#39 0x00007ffff3f57974 in F6d6163726f657870616e642d616c6c_macroexpand_all_0 ()
   from 
.../emacs-28.0.60/src/../native-lisp/28.0.60-e950671c/preloaded/macroexp-2c3e1495-8e8af7d5.eln
#40 0x0000000000573a63 in Ffuncall (nargs=3, args=0x7fffffffce90) at lisp.h:2108
#41 0x00007ffff2c43b7f in 
F627974652d636f6d70696c652d70726570726f63657373_byte_compile_preprocess_0 ()
   from 
.../emacs-28.0.60/native-lisp/28.0.60-e950671c/bytecomp-12882072-29d9ad62.eln
#42 0x0000000000573a63 in Ffuncall (nargs=2, args=0x7fffffffcf60) at lisp.h:2108
#43 0x00007ffff2c469c9 in F616e6f6e796d6f75732d6c616d626461_anonymous_lambda_50 
()
   from 
.../emacs-28.0.60/native-lisp/28.0.60-e950671c/bytecomp-12882072-29d9ad62.eln
#44 0x0000000000573a63 in Ffuncall (nargs=2, args=0x7fffffffd068) at lisp.h:2108
#45 0x00007ffff2c46f30 in F627974652d636f6d70696c65_byte_compile_0 ()
   from 
.../emacs-28.0.60/native-lisp/28.0.60-e950671c/bytecomp-12882072-29d9ad62.eln
#46 0x0000000000573a63 in Ffuncall (nargs=2, args=0x7fffffffd1b0) at lisp.h:2108
#47 0x00007ffff4275860 in 
F636c2d2d67656e657269632d6765742d64697370617463686572_cl__generic_get_dispatcher_0
 ()
   from 
.../emacs-28.0.60/src/../native-lisp/28.0.60-e950671c/preloaded/cl-generic-be68ad15-12e9508b.eln
#48 0x0000000000573a63 in Ffuncall (nargs=2, args=0x7fffffffd2d0) at lisp.h:2108
#49 0x00007ffff4275b4c in 
F636c2d2d67656e657269632d6d616b652d6e6578742d66756e6374696f6e_cl__generic_make_next_function_0
 ()
   from 
.../emacs-28.0.60/src/../native-lisp/28.0.60-e950671c/preloaded/cl-generic-be68ad15-12e9508b.eln
#50 0x0000000000573a63 in Ffuncall (nargs=4, args=0x7fffffffd3a0) at lisp.h:2108
#51 0x00007ffff4275a1f in 
F636c2d2d67656e657269632d6d616b652d66756e6374696f6e_cl__generic_make_function_0 
()
   from 
.../emacs-28.0.60/src/../native-lisp/28.0.60-e950671c/preloaded/cl-generic-be68ad15-12e9508b.eln
#52 0x0000000000573a63 in Ffuncall (nargs=2, args=0x7fffffffd4e0) at lisp.h:2108
#53 0x00007ffff4274a3b in 
F636c2d67656e657269632d646566696e652d6d6574686f64_cl_generic_define_method_0 ()
   from 
.../emacs-28.0.60/src/../native-lisp/28.0.60-e950671c/preloaded/cl-generic-be68ad15-12e9508b.eln
#54 0x0000000000573a63 in Ffuncall (nargs=6, args=args@entry=0x7fffffffd648) at 
lisp.h:2108
#55 0x00000000005b75c0 in exec_byte_code (bytestr=<optimized out>, 
vector=<optimized out>, maxdepth=<optimized out>, args_template=<optimized 
out>, 
    nargs=<optimized out>, args=<optimized out>) at bytecode.c:632
#56 0x00000000005766af in eval_sub (form=<optimized out>) at lisp.h:2108
#57 0x00000000005a51b6 in readevalloop (readcharfun=XIL(0x68a0), 
infile0=0x7fffffffdb00, sourcename=XIL(0xd09114), printflag=false, 
unibyte=<optimized out>, 
    readfun=XIL(0), start=XIL(0), end=<optimized out>) at lread.c:2320
#58 0x00000000005a5fc7 in Fload (file=<optimized out>, noerror=<optimized out>, 
nomessage=XIL(0x30), nosuffix=<optimized out>, must_suffix=<optimized out>)
    at lisp.h:1008
#59 0x00007ffff4208cb5 in F616e6f6e796d6f75732d6c616d626461_anonymous_lambda_48 
()
#54 0x0000000000573a63 in Ffuncall (nargs=6, args=args@entry=0x7fffffffd648) at 
lisp.h:2108
#55 0x00000000005b75c0 in exec_byte_code (bytestr=<optimized out>, 
vector=<optimized out>, maxdepth=<optimized out>, args_template=<optimized 
out>, 
    nargs=<optimized out>, args=<optimized out>) at bytecode.c:632
#56 0x00000000005766af in eval_sub (form=<optimized out>) at lisp.h:2108
#57 0x00000000005a51b6 in readevalloop (readcharfun=XIL(0x68a0), 
infile0=0x7fffffffdb00, sourcename=XIL(0xd09114), printflag=false, 
unibyte=<optimized out>, 
    readfun=XIL(0), start=XIL(0), end=<optimized out>) at lread.c:2320
#58 0x00000000005a5fc7 in Fload (file=<optimized out>, noerror=<optimized out>, 
nomessage=XIL(0x30), nosuffix=<optimized out>, must_suffix=<optimized out>)
    at lisp.h:1008
#59 0x00007ffff4208cb5 in F616e6f6e796d6f75732d6c616d626461_anonymous_lambda_48 
()
--Type <RET> for more, q to quit, c to continue without paging--
   from 
.../emacs-28.0.60/src/../native-lisp/28.0.60-e950671c/preloaded/faces-b9447c93-7f74610c.eln
#60 0x0000000000573a63 in Ffuncall (nargs=2, args=0x7fffffffdc90) at lisp.h:2108
#61 0x00007ffff4208abc in F7474792d66696e642d74797065_tty_find_type_0 ()
   from 
.../emacs-28.0.60/src/../native-lisp/28.0.60-e950671c/preloaded/faces-b9447c93-7f74610c.eln
#62 0x0000000000573a63 in Ffuncall (nargs=3, args=0x7fffffffddb0) at lisp.h:2108
#63 0x00007ffff4208ec7 in 
F7474792d72756e2d7465726d696e616c2d696e697469616c697a6174696f6e_tty_run_terminal_initialization_0
 ()
   from 
.../emacs-28.0.60/src/../native-lisp/28.0.60-e950671c/preloaded/faces-b9447c93-7f74610c.eln
#64 0x0000000000573a63 in Ffuncall (nargs=4, args=0x7fffffffdeb0) at lisp.h:2108
#65 0x00007ffff3d881e2 in F636f6d6d616e642d6c696e65_command_line_0 ()
   from 
.../emacs-28.0.60/src/../native-lisp/28.0.60-e950671c/preloaded/startup-bbc6ea72-8e089fac.eln
#66 0x0000000000573a63 in Ffuncall (nargs=1, args=0x7fffffffdfb8) at lisp.h:2108
#67 0x00007ffff3d82ca9 in F6e6f726d616c2d746f702d6c6576656c_normal_top_level_0 
()
   from 
.../emacs-28.0.60/src/../native-lisp/28.0.60-e950671c/preloaded/startup-bbc6ea72-8e089fac.eln
#68 0x00000000005769b9 in eval_sub (form=<optimized out>) at lisp.h:2108
#69 0x0000000000578697 in Feval (form=XIL(0x7ffff479b3d3), lexical=<optimized 
out>) at eval.c:2330
#70 0x00000000005728f7 in internal_condition_case (bfun=bfun@entry=0x4e0580 
<top_level_2>, handlers=handlers@entry=XIL(0x90), hfun=hfun@entry=0x4e6ed0 
<cmd_error>)
    at eval.c:1453
#71 0x00000000004e1374 in top_level_1 (ignore=ignore@entry=XIL(0)) at 
lisp.h:1008
#72 0x0000000000572831 in internal_catch (tag=<optimized out>, 
func=func@entry=0x4e1330 <top_level_1>, arg=arg@entry=XIL(0)) at eval.c:1184
#73 0x00000000004e0d59 in command_loop () at lisp.h:1008
#74 0x00000000004e6a0d in recursive_edit_1 () at keyboard.c:720
#75 0x00000000004e6daa in Frecursive_edit () at keyboard.c:803
#76 0x000000000042a6f1 in main (argc=<optimized out>, argv=<optimized out>) at 
emacs.c:2310

Lisp Backtrace:

eval.c:122: Emacs fatal error: assertion failed: pdl->kind == SPECPDL_BACKTRACE

Breakpoint 1, terminate_due_to_signal (sig=sig@entry=6, 
backtrace_limit=backtrace_limit@entry=2147483647) at emacs.c:400
400       signal (sig, SIG_DFL);

===========================

> and why trying that causes this problem?

Still unclear.

After Emacs decideds gv.el should be compiled we require comp.el.
Probably as a consequence of that we queue for native compilation also
(in order): cl-lib.el, seq.el, warnings.el.  Then the error.

  Andrea



reply via email to

[Prev in Thread] Current Thread [Next in Thread]