Error starting Guile with `readline` support

246 Views Asked by At

I'm trying to configure Guile to use readline.

Here's my ~/.guile:

(use-modules (ice-9 readline))

(there was more, this one line is sufficient to have this failure)

Here's a log of my interaction:

agam@ssdnodes-61de65ea00d0b:~$ guile
guile: warning: failed to install locale
Backtrace:
In ice-9/boot-9.scm:
  1752:10 12 (with-exception-handler _ _ #:unwind? _ # _)
In unknown file:
          11 (apply-smob/0 #<thunk 7fb7984660c0>)
In ice-9/boot-9.scm:
    724:2 10 (call-with-prompt ("prompt") #<procedure 7fb796fc2e80 ?> ?)
In ice-9/eval.scm:
    619:8  9 (_ #(#(#<directory (guile-user) 7fb79846cc80>)))
In unknown file:
           8 (primitive-load "/home/agam/.guile")
In ice-9/eval.scm:
   721:20  7 (primitive-eval (use-modules (ice-9 readline)))
In ice-9/psyntax.scm:
  1230:36  6 (expand-top-sequence ((use-modules (ice-9 readline))) _ ?)
  1222:19  5 (parse _ (("placeholder" placeholder)) ((top) #(# # ?)) ?)
   259:10  4 (parse _ (("placeholder" placeholder)) (()) _ c&e (eval) ?)
In ice-9/boot-9.scm:
  3927:20  3 (process-use-modules _)
   222:17  2 (map1 (((ice-9 readline))))
  3928:31  1 (_ ((ice-9 readline)))
   3329:6  0 (resolve-interface (ice-9 readline) #:select _ #:hide _ ?)

ice-9/boot-9.scm:3329:6: In procedure resolve-interface:
no code for module (ice-9 readline)

If it helps, I'm doing this within Guile installed via guix install guile. I have installed glibc-locales, and GUIX_LOCPATH is set to "$HOME/.guix-profile/lib/locale"

1

There are 1 best solutions below

0
On

Turns out the locale ... warning was a red herring, I was missing the readline package.

I needed to

  • guix install guile-readline, followed by
  • . "$GUIX_PROFILE/etc/profile"

After that, guile starts up fine.