GNU bug report logs -
#75709
Emacs fails to start with "List contains a loop" error
Previous Next
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 75709 in the body.
You can then email your comments to 75709 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-guix <at> gnu.org
:
bug#75709
; Package
guix
.
(Mon, 20 Jan 2025 23:32:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Thiago Jung Bauermann <bauermann <at> kolabnow.com>
:
New bug report received and forwarded. Copy sent to
bug-guix <at> gnu.org
.
(Mon, 20 Jan 2025 23:32:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
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.
--
Thiago
Information forwarded
to
bug-guix <at> gnu.org
:
bug#75709
; Package
guix
.
(Tue, 21 Jan 2025 01:39:01 GMT)
Full text and
rfc822 format available.
Message #8 received at submit <at> debbugs.gnu.org (full text, mbox):
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
Information forwarded
to
bug-guix <at> gnu.org
:
bug#75709
; Package
guix
.
(Tue, 21 Jan 2025 01:39:02 GMT)
Full text and
rfc822 format available.
Information forwarded
to
bug-guix <at> gnu.org
:
bug#75709
; Package
guix
.
(Wed, 22 Jan 2025 18:20:01 GMT)
Full text and
rfc822 format available.
Message #14 received at 75709 <at> debbugs.gnu.org (full text, mbox):
Hi Thiago
Am Montag, dem 20.01.2025 um 19:43 -0300 schrieb Thiago Jung Bauermann:
>
> 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.
You quite likely have redundant code in your shell init scripts. Note
that your Guix profile should already be sourced on Guix System without
adding anything to them.
> 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
> […]
Try replacing nconc with append and see whether it fixes your issue.
You can reproduce this more easily with
$ guix shell emacs-pgtk emacs-dash \
--with-input=emacs-minimal=emacs-pgtk -- \
sh -c 'source $GUIX_ENVIRONMENT/etc/profile && emacs'
Cheers
Information forwarded
to
bug-guix <at> gnu.org
:
bug#75709
; Package
guix
.
(Wed, 22 Jan 2025 23:02:01 GMT)
Full text and
rfc822 format available.
Message #17 received at 75709 <at> debbugs.gnu.org (full text, mbox):
Ni! Hi everyone.
Having the same issue here.
I'm using `emacs-pgtk` with Guix Home on Guix System, so it's Guix (Home) itself is producing all my profile variables and shell init scripts.
My home configuration is very plain and doesn't touch shell init in any relevant way. Here's the bash-config part:
```
(home-bash-configuration
(aliases '(("ema" . "emacs -nw")
("emc" . "emacsclient -nw")))
(environment-variables '(("EDITOR" . "emacs"))))
```
And here's my EMACS vars after starting a fresh session:
```
$ env | grep EMACS
EMACSNATIVELOADPATH=/home/user/.guix-home/profile/lib/emacs/native-site-lisp:/home/user/.guix-home/profile/lib/emacs/native-site-lisp
EMACSLOADPATH=/home/user/.guix-home/profile/share/emacs/site-lisp:/home/user/.guix-home/profile/share/emacs/site-lisp
```
And just in case, here are the list of 'emacs-' packages in my home profile:
```
"emacs-atomic-chrome"
"emacs-company"
"emacs-geiser"
"emacs-geiser-guile"
"emacs-guix"
"emacs-ibuffer-vc"
"emacs-magit"
"emacs-marginalia"
"emacs-markdown-mode"
"emacs-nov-el"
"emacs-olivetti"
"emacs-paredit"
"emacs-pgtk"
"emacs-python-black"
"emacs-undo-tree"
"emacs-yaml-mode"
"emacs-yasnippet"
"emacs-yasnippet-snippets"
```
Does this help spot something? What can I do to help?
ale
.~´
Information forwarded
to
bug-guix <at> gnu.org
:
bug#75709
; Package
guix
.
(Thu, 23 Jan 2025 03:09:01 GMT)
Full text and
rfc822 format available.
Message #20 received at 75709 <at> debbugs.gnu.org (full text, mbox):
Hello Liliana,
Liliana Marie Prikler <liliana.prikler <at> gmail.com> writes:
> Am Montag, dem 20.01.2025 um 19:43 -0300 schrieb Thiago Jung Bauermann:
>>
>> 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.
>
> You quite likely have redundant code in your shell init scripts. Note
> that your Guix profile should already be sourced on Guix System without
> adding anything to them.
Yes, after I opened the bug I dug a bit and found that I had two
slightly different copies of guix.sh in /etc/profile.d/, one of which
forgotten there from some old experimentation. After I removed it, the
EMACS environment variables above were correct again.
>> 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
>> […]
>
> Try replacing nconc with append and see whether it fixes your issue.
Yes, it does fix it. Thanks!
> You can reproduce this more easily with
>
> $ guix shell emacs-pgtk emacs-dash \
> --with-input=emacs-minimal=emacs-pgtk -- \
> sh -c 'source $GUIX_ENVIRONMENT/etc/profile && emacs'
Thank you for providing this command. Indeed it made checking the fix
easier.
--
Thiago
Information forwarded
to
bug-guix <at> gnu.org
:
bug#75709
; Package
guix
.
(Thu, 23 Jan 2025 16:24:01 GMT)
Full text and
rfc822 format available.
Message #23 received at 75709 <at> debbugs.gnu.org (full text, mbox):
Hello Alexandre,
Alexandre Hannud Abdo <abdo <at> member.fsf.org> writes:
> Having the same issue here.
>
> I'm using `emacs-pgtk` with Guix Home on Guix System, so it's Guix (Home) itself is
> producing all my profile variables and shell init scripts.
>
> My home configuration is very plain and doesn't touch shell init in any relevant
> way. Here's the bash-config part:
>
> ```
> (home-bash-configuration
> (aliases '(("ema" . "emacs -nw")
> ("emc" . "emacsclient -nw")))
> (environment-variables '(("EDITOR" . "emacs"))))
> ```
I don't use Guix System nor Guix Home, so it's unwise for me to
speculate. But I'll do it anyway. :)
Perhaps you have Emacs packages installed in both the system configuration
and the home configuration? Perhaps that could be causing the
environment variable to be set at two different places?
In any case, there does seem to be some issue with Guix System or Guix Home.
> And just in case, here are the list of 'emacs-' packages in my home profile:
>
> ```
> "emacs-atomic-chrome"
> "emacs-company"
> "emacs-geiser"
> "emacs-geiser-guile"
> "emacs-guix"
> "emacs-ibuffer-vc"
> "emacs-magit"
> "emacs-marginalia"
> "emacs-markdown-mode"
> "emacs-nov-el"
> "emacs-olivetti"
> "emacs-paredit"
> "emacs-pgtk"
> "emacs-python-black"
> "emacs-undo-tree"
> "emacs-yaml-mode"
> "emacs-yasnippet"
> "emacs-yasnippet-snippets"
> ```
>
> Does this help spot something? What can I do to help?
The issue in the Emacs package was already spotted by Liliana, but to
spot what could be the problem with Guix System / Guix Home, the best
option is to give enough information so that someone else can reproduce
the problem you're seeing.
That would be either your full system and home configurations (if you
are comfortable providing them), or (even better) a trimmed down version
of the system and home ocnfigurations that still reproduce the problem.
--
Thiago
Information forwarded
to
bug-guix <at> gnu.org
:
bug#75709
; Package
guix
.
(Thu, 23 Jan 2025 16:55:02 GMT)
Full text and
rfc822 format available.
Message #26 received at 75709 <at> debbugs.gnu.org (full text, mbox):
> You quite likely have redundant code in your shell init scripts.
Or your terminal is configured to run as a login shell. E.g. for
xfce4-terminal see:
Edit > Preferences > Advanced -> "Run command as login shell."
Cheers, Bost
Information forwarded
to
bug-guix <at> gnu.org
:
bug#75709
; Package
guix
.
(Thu, 23 Jan 2025 17:28:01 GMT)
Full text and
rfc822 format available.
Message #29 received at 75709 <at> debbugs.gnu.org (full text, mbox):
Hello everyone,
I have the same problem here.
'unset EMACSNATIVELOADPATH' is a usable (but dirty) workaround for me
I'm running guix home on arch because I don't have the time to package t2-linux for guix right now.
In case it helps, you can find the complete configuration for the system here:
https://codeberg.org/Schroedinger50PCT/dots
Information forwarded
to
bug-guix <at> gnu.org
:
bug#75709
; Package
guix
.
(Thu, 23 Jan 2025 21:52:02 GMT)
Full text and
rfc822 format available.
Message #32 received at 75709 <at> debbugs.gnu.org (full text, mbox):
Am Donnerstag, dem 23.01.2025 um 00:07 -0300 schrieb Thiago Jung
Bauermann:
> […]
> >
> > Try replacing nconc with append and see whether it fixes your
> > issue.
>
> Yes, it does fix it. Thanks!
Would you like to submit this as a patch, then? :)
Cheers
Information forwarded
to
bug-guix <at> gnu.org
:
bug#75709
; Package
guix
.
(Fri, 24 Jan 2025 00:14:02 GMT)
Full text and
rfc822 format available.
Message #35 received at 75709 <at> debbugs.gnu.org (full text, mbox):
Ni! Thanks for your comments, Thiago. Emacs is not installed by my system config. And as I said my sisem is very plain and any details I haven't provided are unrelated to emacs. .~´
Le 23/01/2025 à 17:23, Thiago Jung Bauermann a écrit :
> Hello Alexandre,
>
> Alexandre Hannud Abdo <abdo <at> member.fsf.org> writes:
>
>> Having the same issue here.
>>
>> I'm using `emacs-pgtk` with Guix Home on Guix System, so it's Guix (Home) itself is
>> producing all my profile variables and shell init scripts.
>>
>> My home configuration is very plain and doesn't touch shell init in any relevant
>> way. Here's the bash-config part:
>>
>> ```
>> (home-bash-configuration
>> (aliases '(("ema" . "emacs -nw")
>> ("emc" . "emacsclient -nw")))
>> (environment-variables '(("EDITOR" . "emacs"))))
>> ```
> I don't use Guix System nor Guix Home, so it's unwise for me to
> speculate. But I'll do it anyway. :)
>
> Perhaps you have Emacs packages installed in both the system configuration
> and the home configuration? Perhaps that could be causing the
> environment variable to be set at two different places?
>
> In any case, there does seem to be some issue with Guix System or Guix Home.
>
>> And just in case, here are the list of 'emacs-' packages in my home profile:
>>
>> ```
>> "emacs-atomic-chrome"
>> "emacs-company"
>> "emacs-geiser"
>> "emacs-geiser-guile"
>> "emacs-guix"
>> "emacs-ibuffer-vc"
>> "emacs-magit"
>> "emacs-marginalia"
>> "emacs-markdown-mode"
>> "emacs-nov-el"
>> "emacs-olivetti"
>> "emacs-paredit"
>> "emacs-pgtk"
>> "emacs-python-black"
>> "emacs-undo-tree"
>> "emacs-yaml-mode"
>> "emacs-yasnippet"
>> "emacs-yasnippet-snippets"
>> ```
>>
>> Does this help spot something? What can I do to help?
> The issue in the Emacs package was already spotted by Liliana, but to
> spot what could be the problem with Guix System / Guix Home, the best
> option is to give enough information so that someone else can reproduce
> the problem you're seeing.
>
> That would be either your full system and home configurations (if you
> are comfortable providing them), or (even better) a trimmed down version
> of the system and home ocnfigurations that still reproduce the problem.
>
> --
> Thiago
Information forwarded
to
bug-guix <at> gnu.org
:
bug#75709
; Package
guix
.
(Fri, 24 Jan 2025 23:11:02 GMT)
Full text and
rfc822 format available.
Message #38 received at 75709 <at> debbugs.gnu.org (full text, mbox):
Liliana Marie Prikler <liliana.prikler <at> gmail.com> writes:
> Am Donnerstag, dem 23.01.2025 um 00:07 -0300 schrieb Thiago Jung
> Bauermann:
>> […]
>> >
>> > Try replacing nconc with append and see whether it fixes your
>> > issue.
>>
>> Yes, it does fix it. Thanks!
> Would you like to submit this as a patch, then? :)
Ah! I didn't think that would be appropriate since it's your fix, but
since you suggested it, I just did:
https://issues.guix.gnu.org/75817
--
Thiago
Merged 75709 75749.
Request was from
Ludovic Courtès <ludo <at> gnu.org>
to
control <at> debbugs.gnu.org
.
(Mon, 27 Jan 2025 08:39:02 GMT)
Full text and
rfc822 format available.
Severity set to 'important' from 'normal'
Request was from
Ludovic Courtès <ludo <at> gnu.org>
to
control <at> debbugs.gnu.org
.
(Mon, 27 Jan 2025 08:43:02 GMT)
Full text and
rfc822 format available.
Information forwarded
to
bug-guix <at> gnu.org
:
bug#75709
; Package
guix
.
(Mon, 03 Feb 2025 19:42:02 GMT)
Full text and
rfc822 format available.
Message #45 received at 75709 <at> debbugs.gnu.org (full text, mbox):
Hey Liliana,
Ludovic Courtès <ludo <at> gnu.org> skribis:
> Liliana Marie Prikler <liliana.prikler <at> gmail.com> skribis:
>
>>> Looking forward to applying this fix (exwm wouldn’t start this
>>> morning).
>>> :-)
>> Welp, I just found out the hard way there is no jobset for emacs-team…
>> Should we add one or just directly push to master?
>
> There was one but it was deactivated; I’ve now reactivated it.
>
> https://ci.guix.gnu.org/jobset/emacs-team
Could you please merge it if that’s OK?
I think it’s a real problem to keep Emacs broken when we have a fix and
substitutes.
Ludo’.
Reply sent
to
Liliana Marie Prikler <liliana.prikler <at> gmail.com>
:
You have taken responsibility.
(Mon, 03 Feb 2025 20:25:02 GMT)
Full text and
rfc822 format available.
Notification sent
to
Thiago Jung Bauermann <bauermann <at> kolabnow.com>
:
bug acknowledged by developer.
(Mon, 03 Feb 2025 20:25:03 GMT)
Full text and
rfc822 format available.
Message #50 received at 75709-done <at> debbugs.gnu.org (full text, mbox):
Am Montag, dem 03.02.2025 um 20:40 +0100 schrieb Ludovic Courtès:
> Hey Liliana,
>
> Ludovic Courtès <ludo <at> gnu.org> skribis:
>
> > Liliana Marie Prikler <liliana.prikler <at> gmail.com> skribis:
> >
> > > > Looking forward to applying this fix (exwm wouldn’t start this
> > > > morning).
> > > > :-)
> > > Welp, I just found out the hard way there is no jobset for emacs-
> > > team… Should we add one or just directly push to master?
> >
> > There was one but it was deactivated; I’ve now reactivated it.
> >
> > https://ci.guix.gnu.org/jobset/emacs-team
>
> Could you please merge it if that’s OK?
>
> I think it’s a real problem to keep Emacs broken when we have a fix
> and substitutes.
Ahh, my bad. It was already merged as
f9b1e548c95a115e2bb143d0f4b1632a600f32da, but I forgot to close the
bug.
Cheers
Reply sent
to
Liliana Marie Prikler <liliana.prikler <at> gmail.com>
:
You have taken responsibility.
(Mon, 03 Feb 2025 20:25:03 GMT)
Full text and
rfc822 format available.
Notification sent
to
"Dr. Arne Babenhauserheide" <arne_bab <at> web.de>
:
bug acknowledged by developer.
(Mon, 03 Feb 2025 20:25:03 GMT)
Full text and
rfc822 format available.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Tue, 04 Mar 2025 12:24:07 GMT)
Full text and
rfc822 format available.
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.