GNU bug report logs - #75709
Emacs fails to start with "List contains a loop" error

Previous Next

Package: guix;

Reported by: Thiago Jung Bauermann <bauermann <at> kolabnow.com>

Date: Mon, 20 Jan 2025 23:32:02 UTC

Severity: important

Merged with 75749

Done: Liliana Marie Prikler <liliana.prikler <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: James Smith <jsubuntuxp <at> disroot.org>
To: 75709 <at> debbugs.gnu.org
Cc: bauermann <at> kolabnow.com
Subject: bug#75709: Emacs fails to start with "List contains a loop" error
Date: Mon, 20 Jan 2025 18:37:30 -0700
Hi,

Thiago Jung Bauermann via Bug reports for GNU Guix <bug-guix <at> gnu.org> writes:

> Since a recent "guix pull", Emacs (I tested with the emacs-pgtk package)
> can't start up anymore:
>
> $ emacs
> List contains a loop: ("/home/user/.guix-profile/lib/emacs/native-site-lisp" "/gnu/store/k62mmzkbmivw2r3wwlpcxs3lp9vwjyac-emacs-lsp-mode-9.0.0/lib/emacs/native-site-lisp" "/home/user/.guix-profile/lib/emacs/native-site-lisp" "/home/user/.guix-profile/lib/emacs/native-site-lisp" "/gnu/store/k62mmzkbmivw2r3wwlpcxs3lp9vwjyac-emacs-lsp-mode-9.0.0/lib/emacs/native-site-lisp" . #2)
> $ echo $?
> 255
>
> The root cause of the problem is that I have duplicate path entries in
> these environment variables:
>
> $ env | grep EMACS
> EMACSNATIVELOADPATH=/home/sademeo/.guix-profile/lib/emacs/native-site-lisp:/home/sademeo/.guix-profile/lib/emacs/native-site-lisp
> EMACSLOADPATH=/home/sademeo/.guix-profile/share/emacs/site-lisp:/home/sademeo/.guix-profile/share/emacs/site-lisp
>
> If I remove the duplicate entries, Emacs starts correctly again.
>
> I suppose this is a common problem (it's surprisingly hard to ensure a
> given shell initialization snippet will run only once), and also it's
> hardly a fatal or unrecoverable error. IMHO it should warrant at most a
> warning message (if that), not a complete abort of the program.
>
> With that in mind, I bisected Guix and arrived at this commit:
>
> e9b13294700de7082ee23aa6e1c17b4a8c8828ec is the first bad commit
> commit e9b13294700de7082ee23aa6e1c17b4a8c8828ec
>
>     profiles: emacs-subdirs: Also expand native-comp-eln-load-path.
>
> To reproduce the problem, it's enough to install emacs-pgtk and
> emacs-ccls in your profile. It might be necessary to remove them and
> then install them again, not sure why.
>
> Guix version:
>
> $ guix describe
> Generation 17   jan 20 2025 18:48:17    (current)
>   guix e9b1329
>     repository URL: https://git.savannah.gnu.org/git/guix.git
>     commit: e9b13294700de7082ee23aa6e1c17b4a8c8828ec
>
> It's probably irrelevant, but just for completeness: Guix is installed
> on top of Ubuntu 24.10.

I've encountered the same issue on Guix System, and found that only
duplicate paths in $EMACSNATIVELOADPATH causes this ($EMACSLOADPATH
doesn't seem to be causing any issues).

Here's the relevant variables on my system:
#+begin_src bash
EMACSNATIVELOADPATH=/home/ubuntuxp/.guix-profile/lib/emacs/native-site-lisp:/home/ubuntuxp/.guix-profile/lib/emacs/native-site-lisp:/home/ubuntuxp/.guix-profile/lib/emacs/native-site-lisp
EMACSLOADPATH=/home/ubuntuxp/.guix-profile/share/emacs/site-lisp:/home/ubuntuxp/.guix-profile/share/emacs/site-lisp:/home/ubuntuxp/.guix-profile/share/emacs/site-lisp
#+end_src

James Smith




This bug report was last modified 103 days ago.

Previous Next


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