unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Dima Kogan <dima@secretsauce.net>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 48342@debbugs.gnu.org, akrl@sdf.org
Subject: bug#48342: native-comp emacs gets into an infinite loop at startup if no .el files are available
Date: Tue, 11 May 2021 10:29:20 -0700	[thread overview]
Message-ID: <87zgx1yya7.fsf@secretsauce.net> (raw)
In-Reply-To: <834kf95u1z.fsf@gnu.org>

Eli Zaretskii <eliz@gnu.org> writes:

> Any idea how come display-warning calls itself?

I'm here:

  https://github.com/emacs-mirror/emacs/commit/bb8b8d

A single recursive cycle in the C backtrace looks like this:

  #21 0x000055555573b282 in maybe_swap_for_eln (no_native=no_native@entry=false, filename=filename@entry=0x7fffffebd780, fd=fd@entry=0x7fffffebd77c, mtime=...) at lread.c:1713
  #22 0x000055555573ba5d in openp (path=0x555555d75e63, str=0x7fffeefb3a1c, suffixes=<optimized out>, storeptr=0x7fffffebd958, predicate=0x0, newer=false, no_native=false) at ../lib/stat-time.h:149
  #23 0x000055555573ed05 in Fload (file=0x7fffeefb3a1c, noerror=0x0, nomessage=0x30, nosuffix=0x0, must_suffix=<optimized out>) at lisp.h:1002
  #24 0x000055555573faef in save_match_data_load (file=0x7fffeefb3a1c, noerror=noerror@entry=0x0, nomessage=nomessage@entry=0x30, nosuffix=nosuffix@entry=0x0, must_suffix=must_suffix@entry=0x30) at lread.c:1616
  #25 0x0000555555713d57 in Fautoload_do_load (fundef=0x7fffef14ed9b, funname=0x2aaa99569808, macro_only=0x0) at eval.c:2308
  #26 0x0000555555714040 in Ffuncall (nargs=3, args=0x7fffffebdbd0) at lisp.h:1002
  #27 0x0000555555714211 in call2 (fn=<optimized out>, arg1=arg1@entry=0x4650, arg2=arg2@entry=0x555555f11bf4) at eval.c:2903
  #28 0x000055555573b282 in maybe_swap_for_eln (no_native=no_native@entry=false, filename=filename@entry=0x7fffffebdd80, fd=fd@entry=0x7fffffebdd7c, mtime=...) at lread.c:1713

The maybe_swap_for_el() call in Frame #28 checks for the sources, sees
that the file on disk doesn't exist, and throws the warning as expected:

Code:
  call2 (intern_c_string ("display-warning")
Full context:
  https://github.com/emacs-mirror/emacs/blob/bb8b8d717f91a85ca41de9e82246e6975e1ed719/src/lread.c#L1713

Frame #26 is the (display-warning ...)

Frame #25 is (autoload-do-load ... 'display-warning)

Frame #23 is (load "warnings" ...)

The backtrace isn't right about the line number in frame #22, but that
function is in lread.c. It's trying to compile "warnings.el".


> Note that if you will be distributing the *.eln files, I think the GPL
> requires you to make the *.el files available. In fact, this is so
> even with the *.elc files. So I'm not sure I understand how you could
> distribute only the *.elc files until now: isn't that contrary to GPL?

The .el files are available, but the user doesn't have to install them.
Just like the .c sources are available, but the user can install just
the pre-built binaries if they want to.





  parent reply	other threads:[~2021-05-11 17:29 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-11  7:47 bug#48342: native-comp emacs gets into an infinite loop at startup if no .el files are available Dima Kogan
2021-05-11  8:37 ` Andrea Corallo via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-05-11  8:44   ` Dima Kogan
2021-05-11 12:33     ` Eli Zaretskii
2021-05-11 17:00       ` Gregory Heytings
2021-05-11 17:12       ` Andrea Corallo via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-05-11 17:29       ` Dima Kogan [this message]
2021-05-11 17:43         ` Eli Zaretskii
2021-05-11 17:57           ` Dima Kogan
2021-05-11 18:57             ` Gregory Heytings
2021-05-11 19:11               ` Eli Zaretskii
2021-05-11 19:38                 ` Gregory Heytings
2021-05-11 19:51                   ` Eli Zaretskii
2021-05-11 19:59                     ` Dima Kogan
2021-05-11 20:23                       ` Eli Zaretskii
2021-05-11 20:00                     ` Gregory Heytings
2021-05-11 20:04                       ` Gregory Heytings
2021-05-11 17:45         ` Eli Zaretskii
2021-05-11 19:43           ` Andrea Corallo via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-07-02 16:44             ` Lars Ingebrigtsen

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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=87zgx1yya7.fsf@secretsauce.net \
    --to=dima@secretsauce.net \
    --cc=48342@debbugs.gnu.org \
    --cc=akrl@sdf.org \
    --cc=eliz@gnu.org \
    /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 public inbox

	https://git.savannah.gnu.org/cgit/emacs.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).