GNU bug report logs - #66357
29.1; malformed load-history entry when built --with-ns

Previous Next

Package: emacs;

Reported by: Aaron Ucko <ucko <at> ncbi.nlm.nih.gov>

Date: Thu, 5 Oct 2023 05:14:02 UTC

Severity: normal

Found in version 29.1

To reply to this bug, email your comments to 66357 AT debbugs.gnu.org.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#66357; Package emacs. (Thu, 05 Oct 2023 05:14:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Aaron Ucko <ucko <at> ncbi.nlm.nih.gov>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Thu, 05 Oct 2023 05:14:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Aaron Ucko <ucko <at> ncbi.nlm.nih.gov>
To: bug-gnu-emacs <at> gnu.org
Subject: 29.1; malformed load-history entry when built --with-ns
Date: Wed, 04 Oct 2023 15:34:34 -0400
Immediately after startup, load-history starts with the malformed entry

  ((require . package) (require . info))

which in turn breaks e.g. eval-after-load, which reasonably expects
every entry to start with a filename.

I encounter this behavior with an all-comments .emacs, but not with
emacs -q; with -q, load-history instead starts with nil, which is
irregular too but (mostly?) harmless.  This Cocoa-enabled build exhibits
the same behavior in -nw mode, but an X11 build of the same sources
(unpatched 29.1) doesn't add any irregular entries in any mode.

I configured it --with-ns-self-contained so that my two builds could
share a .../share/emacs hierarchy, but I'd expect that to be a
formality.

Please let me know if you need any more information.

Thanks!


In GNU Emacs 29.1 (build 1, aarch64-apple-darwin22.4.0, NS
 appkit-2299.50 Version 13.3.1 (Build 22E261)) of 2023-10-04 built on
 NCBIMAC1014
Windowing system distributor 'Apple', version 10.3.2299
System Description:  macOS 13.3.1

Configured using:
 'configure --prefix=/Users/ucko/emacs-29.1 --with-ns
 --disable-ns-self-contained --with-modules --without-gnutls'

Configured features:
ACL LIBXML2 MODULES NOTIFY KQUEUE NS PDUMPER PNG SQLITE3 THREADS
TOOLKIT_SCROLL_BARS ZLIB

Important settings:
  value of $LC_COLLATE: C
  value of $LANG: en_US.UTF-8
  locale-coding-system: utf-8-unix

Major mode: Lisp Interaction

Minor modes in effect:
  display-time-mode: t
  tooltip-mode: t
  global-eldoc-mode: t
  eldoc-mode: t
  show-paren-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  column-number-mode: t
  line-number-mode: t
  indent-tabs-mode: t
  transient-mark-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t

Load-path shadows:
/Users/ucko/share/emacs/tex-site hides /Users/ucko/.emacs.d/elpa/auctex-13.0.16/tex-site
/Users/ucko/.emacs.d/elpa/transient-20230220.1425/transient hides /Users/ucko/emacs-29.1/share/emacs/29.1/lisp/transient
/Users/ucko/share/emacs/w3/socks hides /Users/ucko/emacs-29.1/share/emacs/29.1/lisp/net/socks

Features:
(shadow sort mail-extr emacsbug cl-extra pp thingatpt help-fns
radix-tree cl-print dabbrev debug backtrace help-mode find-func time
jka-compr amu-functions dsvn log-edit ring pcvs-util add-log vc
vc-dispatcher nnimap nnmail gnus-int mail-source gnus-range message
sendmail yank-media puny dired dired-loaddefs rfc822 mml mml-sec epa epg
rfc6068 epg-config mm-decode mm-bodies mm-encode mail-parse rfc2231
rfc2047 rfc2045 ietf-drums mailabbrev gmm-utils mailheader utf7 nnoo
gnus wid-edit nnheader gnus-util text-property-search time-date mm-util
mail-prsvr mail-utils range advice w3-auto derived cc-mode cc-fonts
cc-guess cc-menus cc-cmds cc-styles cc-align cc-engine cc-vars cc-defs
finder-inf tex-site pcase info package browse-url url url-proxy
url-privacy url-expand url-methods url-history url-cookie
generate-lisp-file url-domsuf url-util mailcap url-handlers url-parse
auth-source cl-seq eieio eieio-core cl-macs password-cache json subr-x
map byte-opt gv bytecomp byte-compile url-vars cl-loaddefs cl-lib rmc
iso-transl tooltip cus-start cconv eldoc paren electric uniquify
ediff-hook vc-hooks lisp-float-type elisp-mode mwheel term/ns-win ns-win
ucs-normalize mule-util term/common-win tool-bar dnd fontset image
regexp-opt fringe tabulated-list replace newcomment text-mode lisp-mode
prog-mode register page tab-bar menu-bar rfn-eshadow isearch easymenu
timer select scroll-bar mouse jit-lock font-lock syntax font-core
term/tty-colors frame minibuffer nadvice seq simple cl-generic
indonesian philippine cham georgian utf-8-lang misc-lang vietnamese
tibetan thai tai-viet lao korean japanese eucjp-ms cp51932 hebrew greek
romanian slovak czech european ethiopic indian cyrillic chinese
composite emoji-zwj charscript charprop case-table epa-hook
jka-cmpr-hook help abbrev obarray oclosure cl-preloaded button loaddefs
theme-loaddefs faces cus-face macroexp files window text-properties
overlay sha1 md5 base64 format env code-pages mule custom widget keymap
hashtable-print-readable backquote threads kqueue cocoa ns multi-tty
make-network-process emacs)

Memory information:
((conses 16 452778 74812)
 (symbols 48 31202 3)
 (strings 32 94378 3768)
 (string-bytes 1 2764532)
 (vectors 16 70705)
 (vector-slots 8 1674909 46441)
 (floats 8 213 55)
 (intervals 56 58004 21708)
 (buffers 976 14))

-- 
Aaron Ucko <ucko at ncbi>, NCBI C++ Toolkit core development group




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#66357; Package emacs. (Thu, 05 Oct 2023 06:02:01 GMT) Full text and rfc822 format available.

Message #8 received at 66357 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Aaron Ucko <ucko <at> ncbi.nlm.nih.gov>
Cc: 66357 <at> debbugs.gnu.org
Subject: Re: bug#66357: 29.1; malformed load-history entry when built --with-ns
Date: Thu, 05 Oct 2023 09:01:27 +0300
> Date: Wed, 04 Oct 2023 15:34:34 -0400
> From:  Aaron Ucko via "Bug reports for GNU Emacs,
>  the Swiss army knife of text editors" <bug-gnu-emacs <at> gnu.org>
> 
> 
> Immediately after startup, load-history starts with the malformed entry
> 
>   ((require . package) (require . info))
> 
> which in turn breaks e.g. eval-after-load, which reasonably expects
> every entry to start with a filename.
> 
> I encounter this behavior with an all-comments .emacs, but not with
> emacs -q; with -q, load-history instead starts with nil, which is
> irregular too but (mostly?) harmless.  This Cocoa-enabled build exhibits
> the same behavior in -nw mode, but an X11 build of the same sources
> (unpatched 29.1) doesn't add any irregular entries in any mode.

I cannot reproduce this (but I'm not on macOS).  My guess is that you
have packages installed via package.el, and some of your init files
are executed (and load package.el) even though the .emacs is commented
out.

I don't have any packages installed, so I don't see this problem.

In any case, the above value is non malformed, it is fully documented
in the ELisp manual:

 -- Variable: load-history
     The value of this variable is an alist that associates the names of
     loaded library files with the names of the functions and variables
     they defined, as well as the features they provided or required.

     Each element in this alist describes one loaded library (including
     libraries that are preloaded at startup).  It is a list whose CAR
     is the absolute file name of the library (a string).  The rest of
     the list elements have these forms:

     ‘VAR’
          The symbol VAR was defined as a variable.
     ‘(defun . FUN)’
          The function FUN was defined.  ‘(defun . FUN)’, which
          represents defining FUN as a function.
     ‘(defface . FACE)’
          The face FACE was defined.
     ‘(require . FEATURE)’
          The feature FEATURE was required.





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#66357; Package emacs. (Wed, 11 Oct 2023 18:34:02 GMT) Full text and rfc822 format available.

Message #11 received at 66357 <at> debbugs.gnu.org (full text, mbox):

From: "Aaron M. Ucko" <ucko <at> ncbi.nlm.nih.gov>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 66357 <at> debbugs.gnu.org
Subject: Re: bug#66357: 29.1; malformed load-history entry when built --with-ns
Date: Wed, 11 Oct 2023 14:33:23 -0400
Thanks for the quick reply, and sorry for not following up earlier.

Eli Zaretskii <eliz <at> gnu.org> writes:

> I cannot reproduce this (but I'm not on macOS).

I haven't yet been able to elsewhere either, even with GNUstep libraries
installed and Emacs configured to use them.

> My guess is that you
> have packages installed via package.el, and some of your init files
> are executed (and load package.el) even though the .emacs is commented
> out.

I do indeed have some packages installed, and it looks like their
general presence affects Emacs's startup logic.  I'm not sure how much
the precise set matters, but FTR, I specifically have

  $ ls ~/.emacs.d/elpa/
  \@-readme.txt                     groovy-mode-201203310931/
  aggressive-indent-readme.txt      jq-mode-20220610.1119/
  applescript-mode-20210802.1715/   kotlin-mode-20210917.1911/
  archives/                         kotlin-mode-20230123.1859/
  asn1-mode-20170729.226/           ldap-mode-readme.txt
  auctex-13.0.16/                   magit-20220131.125/
  compat-29.1.3.4/                  magit-20230221.648/
  crontab-mode-20210715.133/        magit-section-20220130.2007/
  dash-20210826.1149/               magit-section-20230213.2018/
  dash-20221013.836/                protobuf-mode-20230216.1713/
  git-commit-20220130.2254/         s-20220902.1511/
  git-commit-20230220.1901/         transient-20220130.1941/
  gnupg/                            transient-20230220.1425/
  gradle-mode-20150313.1905/        with-editor-20220130.1942/
  graphviz-dot-mode-20230213.1945/  with-editor-20230212.2214/

>      Each element in this alist describes one loaded library (including
>      libraries that are preloaded at startup).  It is a list whose CAR
                                                               ^^^^^^^^^
>      is the absolute file name of the library (a string).
       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

The offending entry is missing a file name (or even a leading nil
placeholder), and consists *solely* of two

>      ‘(require . FEATURE)’

forms, which are valid only later in the list.

-- 
Aaron Ucko <ucko at ncbi>, NCBI C++ Toolkit core development group




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#66357; Package emacs. (Wed, 11 Oct 2023 18:40:01 GMT) Full text and rfc822 format available.

Message #14 received at 66357 <at> debbugs.gnu.org (full text, mbox):

From: "Aaron M. Ucko" <ucko <at> ncbi.nlm.nih.gov>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 66357 <at> debbugs.gnu.org
Subject: Re: bug#66357: 29.1; malformed load-history entry when built --with-ns
Date: Wed, 11 Oct 2023 14:39:12 -0400
Thanks for the quick reply, and sorry for not following up earlier.

Eli Zaretskii <eliz <at> gnu.org> writes:

> I cannot reproduce this (but I'm not on macOS).

I haven't yet been able to elsewhere either, even with GNUstep libraries
installed and Emacs configured to use them.

> My guess is that you
> have packages installed via package.el, and some of your init files
> are executed (and load package.el) even though the .emacs is commented
> out.

I do indeed have some packages installed, and it looks like their
general presence affects Emacs's startup logic.  I'm not sure how much
the precise set matters, but FTR, I specifically have

  $ ls ~/.emacs.d/elpa/
  \@-readme.txt                     groovy-mode-201203310931/
  aggressive-indent-readme.txt      jq-mode-20220610.1119/
  applescript-mode-20210802.1715/   kotlin-mode-20210917.1911/
  archives/                         kotlin-mode-20230123.1859/
  asn1-mode-20170729.226/           ldap-mode-readme.txt
  auctex-13.0.16/                   magit-20220131.125/
  compat-29.1.3.4/                  magit-20230221.648/
  crontab-mode-20210715.133/        magit-section-20220130.2007/
  dash-20210826.1149/               magit-section-20230213.2018/
  dash-20221013.836/                protobuf-mode-20230216.1713/
  git-commit-20220130.2254/         s-20220902.1511/
  git-commit-20230220.1901/         transient-20220130.1941/
  gnupg/                            transient-20230220.1425/
  gradle-mode-20150313.1905/        with-editor-20220130.1942/
  graphviz-dot-mode-20230213.1945/  with-editor-20230212.2214/

>      Each element in this alist describes one loaded library (including
>      libraries that are preloaded at startup).  It is a list whose CAR
                                                               ^^^^^^^^^
>      is the absolute file name of the library (a string).
       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

The offending entry is missing a file name (or even a leading nil
placeholder), and consists *solely* of two

>      ‘(require . FEATURE)’

forms, which are valid only later in the list.

-- 
Aaron Ucko <ucko at ncbi>, NCBI C++ Toolkit core development group




This bug report was last modified 205 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.