unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: "Mark A. Hershberger" <mah@everybody.org>, Andrea Corallo <akrl@sdf.org>
Cc: 62136@debbugs.gnu.org
Subject: bug#62136: 30.0.50; byte-compiled init.el loads correctly, but native compiled init.eln loads incompletely
Date: Sun, 12 Mar 2023 09:24:41 +0200	[thread overview]
Message-ID: <83lek2v3d2.fsf@gnu.org> (raw)
In-Reply-To: <87zg8i1ruo.fsf@everybody.org> (bug-gnu-emacs@gnu.org)

> Date: Sun, 12 Mar 2023 00:06:07 -0500
> From:  "Mark A. Hershberger" via "Bug reports for GNU Emacs,
>  the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
> 
> 
> For a while now, I've had to re-byte-compile init.el to get it to work
> correctly. Today, I tracked down the problem to an incorrectly compiled
> .eln file.
> 
> My init.el is probably over-large and takes 8s to load normally.  But
> once it loads normally, a native compilation copy is created in
> ~/.emacs.d/eln-cache and subsequent loads take only 3s.  Which would be
> great if it were working, but the loading is incomplete because things
> like the theme are not loaded.  Erasing the init-*.eln file under
> ~/.emacs.d/eln-cache allows emacs to load properly using the
> byte-compiled file.  Example run:
> 
>     $ find ~/.emacs.d/ -mtime -0.002 -ls
>     17171430      4 drwxr-xr-x  26 mah      mah          4096 Mar 11 22:22 ~/.emacs.d/
>     17566126      4 drwx------   2 mah      mah          4096 Mar 11 22:22 ~/.emacs.d/auto-save-list
>     19674336     36 drwxr-xr-x   2 mah      mah         36864 Mar 11 22:21 ~/.emacs.d/eln-cache/30.0.50-29d0097a
>     19693480     68 -rwxr-xr-x   1 mah      mah         66280 Mar 11 22:21 ~/.emacs.d/eln-cache/30.0.50-29d0097a/init-1f8fd1e4-78889c62.eln
>     17171381    168 -rw-r--r--   1 mah      mah        169284 Mar 11 22:22 ~/.emacs.d/ido.last
>     17174597      4 drwxr-xr-x   2 mah      mah          4096 Mar 11 22:21 ~/.emacs.d/transient
>     17174599      4 -rw-r--r--   1 mah      mah          2019 Mar 11 22:21 ~/.emacs.d/transient/history.el
>     17189836    168 -rw-r--r--   1 mah      mah        169284 Mar 11 22:21 ~/.emacs.d/ido.last~
>     17171265      4 drwxr-xr-x   4 mah      mah          4096 Mar 11 22:22 ~/.emacs.d/straight
>     17175288    548 -rw-r--r--   1 mah      mah        558574 Mar 11 22:22 ~/.emacs.d/straight/build-cache.el
>     $ rm ~/.emacs.d/eln-cache/30.0.50-29d0097a/init-1f8fd1e4-78889c62.eln
>     $ # emacs properly started
>     $ # exit emacs
>     $ find ~/.emacs.d/ -mtime -0.002 -ls
>     17171430      4 drwxr-xr-x  26 mah      mah          4096 Mar 11 22:23 ~/.emacs.d/
>     17566126      4 drwx------   2 mah      mah          4096 Mar 11 22:23 ~/.emacs.d/auto-save-list
>     19674336     36 drwxr-xr-x   2 mah      mah         36864 Mar 11 22:23 ~/.emacs.d/eln-cache/30.0.50-29d0097a
>     19692826     68 -rwxr-xr-x   1 mah      mah         66280 Mar 11 22:23 ~/.emacs.d/eln-cache/30.0.50-29d0097a/init-1f8fd1e4-78889c62.eln
>     17189836    168 -rw-r--r--   1 mah      mah        169284 Mar 11 22:23 ~/.emacs.d/ido.last
>     17174597      4 drwxr-xr-x   2 mah      mah          4096 Mar 11 22:23 ~/.emacs.d/transient
>     17174599      4 -rw-r--r--   1 mah      mah          2019 Mar 11 22:23 ~/.emacs.d/transient/history.el
>     17171381    168 -rw-r--r--   1 mah      mah        169284 Mar 11 22:22 ~/.emacs.d/ido.last~
>     17171265      4 drwxr-xr-x   4 mah      mah          4096 Mar 11 22:23 ~/.emacs.d/straight
>     17175288    548 -rw-r--r--   1 mah      mah        560242 Mar 11 22:23 ~/.emacs.d/straight/build-cache.el
>     $ # emacs started without proper execution
> 
> FWIW, the theme is loaded using use-package:
> 
>     (use-package spacemacs-common
>       :straight (:host github :repo "nashamri/spacemacs-theme")
>       :init
>       (mah/show-load-time "loading spacemacs")
>       (load-theme 'spacemacs-dark t)
>       (mah/show-load-time "done loading spacemacs")
>       :ensure t)
> 
> The mah/show-load-time messages do not show up in the *Messages* buffer
> when during loads of the .eln file.

Thank you for your report.

However, having read the description, I don't think I understand what
is the problem in your case.  You say some .eln file is compiled
incorrectly, but what are the symptoms of that incorrectness?  You say
"things like the theme are not loaded", but don't tell what exactly is
not loaded and don't show the evidence and symptoms of those parts
which don't load.

IOW, please be more specific about the problems and provide more
details about the actual problems you see.  Bonus points for posting a
recipe to reproduce the problem with the minimal init.el file (and any
other files that are absolutely necessary for reproduction).

It would be also beneficial to take unnecessary 3rd-party packages out
of the equation.  So if you can reproduce the problem without
Spacemacs, without 'straight', and without use-package, it will make
our job of investigating the problem easier.  Long story short: try to
make the scenario as simple and with as few actors as possible, and
then post a complete and detailed description of what goes wrong in
that scenario.

> I saw https://debbugs.gnu.org/cgi/bugreport.cgi?bug=43969 which has some
> similarities, but there is more missing thand just the spacemacs theme.
> This makes me think that it isn't just a matter of missing requires.

Do you see any relevant error messages in *Messages* or any warnings
in *Warnings* buffers?





  reply	other threads:[~2023-03-12  7:24 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-12  5:06 bug#62136: 30.0.50; byte-compiled init.el loads correctly, but native compiled init.eln loads incompletely Mark A. Hershberger via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-03-12  7:24 ` Eli Zaretskii [this message]
2023-03-13  5:40 ` Mark A. Hershberger via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-04-05 22:04 ` bug#62136: (no subject) Teika Kazura
2023-04-06 15:21   ` bug#62136: init.el partial execution Mark A. Hershberger via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-04-06 17:25   ` bug#62136: a further update: straight.el & nativecomp interaction? Mark A. Hershberger via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-04-06 17:33     ` Eli Zaretskii
2023-04-06 18:07       ` Mark A. Hershberger via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-04-06 18:24         ` Eli Zaretskii
2023-05-05  6:41           ` Eli Zaretskii
2023-05-05 12:31             ` Mark A. Hershberger via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-05-05 13:31               ` Eli Zaretskii

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=83lek2v3d2.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=62136@debbugs.gnu.org \
    --cc=akrl@sdf.org \
    --cc=mah@everybody.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).