Subject: bug#70781: "error: make-custom-binary-output-port: unbound variable" after guix home reconfigure

From: [email-masked]
Date: Sun, 5 May 2024 12:08:58 +0200 (CEST)

Hello everyone!

I have somehow managed to get my Guix install into an erroneous state.

After running a "guix home reconfigure" I now get this error backtraces error everytime I try to to anything with guix except "guix --help". Which also means I can't do a roll-back (or at least I have not managed to do it).

I'm running Guix on a foreign distro (Debian container on a Chromebook).

dev@penguin:~ $ guix pull
Backtrace:
          11 (primitive-load "/home/dev/.config/guix/current/bin/guix")
In guix/ui.scm:
   2312:7 10 (run-guix . _)
  2275:10  9 (run-guix-command _ . _)
In ice-9/boot-9.scm:
  1755:12  8 (with-exception-handler _ _ #:unwind? _ # _)
  1749:15  7 (with-exception-handler #<procedure 7f342cb121e0 at ic…> …)
In guix/store.scm:
   662:15  6 (call-with-store #<procedure 7f342ebcd1e0 at guix/scrip…>)
    575:2  5 (open-connection _ #:port _ #:reserve-space? _ # _)
In ice-9/boot-9.scm:
  1755:12  4 (with-exception-handler _ _ #:unwind? _ # _)
In guix/store.scm:
   582:19  3 (_)
   942:11  2 (buffering-output-port _ _)
In ice-9/boot-9.scm:
  1676:22  1 (raise-exception _ #:continuable? _)
  1674:22  0 (raise-exception _ #:continuable? _)

ice-9/boot-9.scm:1674:22: In procedure raise-exception:
error: make-custom-binary-output-port: unbound variable

This is the third time I have managed to get into this state.
The first time I had to uninstall and re-install Guix completely, which fixed it. The second time I had Guix installed in to "~/guix-profile/bin" and could use that to roll-back my home environment. 

But this time I don't have that. So I would appreciate any guidance on how to diagnose this and if there are way to get my out of this state without having to uninstall and re-install Guix.

Best Regards 
Kristofer