Subject: bug#48342: native-comp emacs gets into an infinite loop at startup if no .el files are available

From: Dima Kogan <[email-masked]>
Date: Tue, 11 May 2021 01:44:03 -0700

Andrea Corallo <[email-masked]> writes:

> could you share the Lisp backtrace? If you have loaded the .gdbinit
> shipped with the repot this will be at the bottom of the gdb
> backtrace.

Hi Andrea. The backtrace looks like this:

  "display-warning" (0xffebcfd8)
  "display-warning" (0xffebd5d8)
  "display-warning" (0xffebdbd8)
  "display-warning" (0xffebe1d8)
  "display-warning" (0xffebe7d8)
  "display-warning" (0xffebedd8)
  "display-warning" (0xffebf3d8)
  "display-warning" (0xffebf9d8)
  "display-warning" (0xffebffd8)
  "display-warning" (0xffec05d8)
  "display-warning" (0xffec0bd8)
  "display-warning" (0xffec11d8)
  "display-warning" (0xffec17d8)
  "display-warning" (0xffec1dd8)
  "display-warning" (0xffec23d8)
  "display-warning" (0xffec29d8)
  "display-warning" (0xffec2fd8)
  "display-warning" (0xffec35d8)
  "display-warning" (0xffec3bd8)
  "display-warning" (0xffec41d8)
  "display-warning" (0xffec47d8)
  "display-warning" (0xffec4dd8)
  "display-warning" (0xffec59d8)
  "display-warning" (0xffec5fd8)
  "display-warning" (0xffec65d8)
  "debug" (0xffec6bd8)
  "substitute-env-vars" (0xffec6e28)
  "substitute-env-in-file-name" (0xffec6ec8)
  "display-warning" (0xffec7248)
  ... 1000s more "display-warning"
  "locate-file" (0xffffe498)
  "command-line" (0xffffe5a0)
  "normal-top-level" (0xffffe640)

>> And second: how should this be packaged? Is shipping the .el files a
>> hard requirement now?

> Yes if you want the native compiler to be able to compile files,
> otherwise you should either native compile all lisp files Ahead of Time
> or set `comp-deferred-compilation' to nil in early init so that Emacs
> will not try to native compile bytecode being loaded.

That's helpful. Thanks.