Hello LilyPond users! I'm trying to start a REPL server[1] inside LilyPond's Guile interpreter, but I can't get it to even load readline support. Note that I am running the precompiled Linux unstable release binary, because I want to be able to use Guile 2.
``` $ lilypond scheme-sandbox GNU LilyPond 2.23.8 (running Guile 2.2) Processing `/usr/local/share/lilypond/2.23.8/ly/scheme-sandbox.ly' Parsing... /usr/local/share/lilypond/2.23.8/ly/scheme-sandbox.ly:21:2: error: GUILE signaled an error for the expression beginning here # (load-user-init) no code for module (ice-9 readline) GNU Guile 2.2.7 Copyright (C) 1995-2019 Free Software Foundation, Inc. Guile comes with ABSOLUTELY NO WARRANTY; for details type `,show w'. This program is free software, and you are welcome to redistribute it under certain conditions; type `,show c' for details. Enter `,help' for help. scheme@(#{ g102}#)> (use-modules (system repl server)) scheme@(#{ g102}#)> (run-server) system/repl/server.scm:75:36: In procedure make-tcp-server-socket: In procedure module-lookup: Unbound variable: INADDR_LOOPBACK Entering a new prompt. Type `,bt' for a backtrace or `,q' to continue. scheme@(#{ g102}#) [1]> ,q scheme@(#{ g102}#)> ,q Success: compilation successfully completed ``` Nor can the Guile debugger script run, either.. ``` $ lilypond guile-debugger GNU LilyPond 2.23.8 (running Guile 2.2) Processing `/usr/local/share/lilypond/2.23.8/ly/guile-debugger.ly' Parsing... /usr/local/share/lilypond/2.23.8/ly/guile-debugger.ly:39:2: error: GUILE signaled an error for the expression beginning here # (use-modules (ice-9 readline)) no code for module (ice-9 readline) /usr/local/share/lilypond/2.23.8/ly/guile-debugger.ly:40:2: error: GUILE signaled an error for the expression beginning here # (activate-readline) Unbound variable: activate-readline Guile debugger for Lilypond For help enter (debug-help) /usr/local/share/lilypond/2.23.8/ly/guile-debugger.ly:46:2: error: GUILE signaled an error for the expression beginning here # (use-modules (lily guile-debugger)) no code for module (ice-9 debugger) /usr/local/share/lilypond/2.23.8/ly/guile-debugger.ly:49:2: error: GUILE signaled an error for the expression beginning here # (top-repl) Unbound variable: top-repl /usr/local/share/lilypond/2.23.8/ly/guile-debugger.ly:55:2: error: GUILE signaled an error for the expression beginning here # (set-current-module lilypond-module) Unbound variable: lilypond-module Success: compilation successfully completed ``` Any suggestions for getting this working? Perhaps the Scheme sandbox is, well, sandboxing access? My system Guile 2 can load readline support, for instance. The docs[2] don't mention an inability to access readline through the sandbox, so I'm not sure where I'm going wrong here. Thanks for any assistance! Hendursaga [1] https://www.gnu.org/software/guile/manual/html_node/REPL-Servers.html [2] https://lilypond.org/doc/v2.23/Documentation/extending/scheme-sandbox