Installing Guile 2.2.4 on Two Computers

Scheme Languages have fascinated me for a while, along with Racket, Emacs Lisp, and Common Lisp. It's hard to decide(fn:0) which language to concentrate on. But, on principle, I have to go with Guile: Gnu's Ubiquitous Intelligent Language Extension. And, in practice, SXML and scheme seem like a good way for me to re-implement the way I generate teaching worksheets from pictures and sentences. Also, the quote notation of I.A. Richards might be made more accessible with scheme-generated html pages too. Ethically, the most principled way, doing the right thing is the most important. Probably, in the long run, the time and attention dedicated to working with Free Software is the best way to grow and contribute as a decent person.

Free Programming Start: Computers on Kotatsu

Debian 9 with Gnome makes these computers, an older smaller notebook bought used and a newer larger laptop, work for me. I've been using the larger laptop for much longer than the older notebook, which I bought used and loaned to people as an free software experience.

Along with Racket, GNU's Guile Scheme from Debian's apt repositories had been on the bigger computer for some time. I was able to play with some examples while reading R. Kent Dybvig's The Scheme Programming Language ,but, Skribilo's installation gave me trouble a few months ago.

With a few free hours the other night, I read slow enough to see the Skribilo needs Guile 2.2 while I only had Guile 2.0. Complications took some time to overcome during the installation on larger computer that had Guile 2.0. Overcoming those complications made installation on the next computer easier, but Guile 2.2.4 seems to need a Guile 2.0 installation in order to have shared libraries to access. For learning Skribilo, and if all goes well – Artanis as well, I imagine I will only need one Guile. So I uninstalled Guile 2.0 apt uninstall guile after installing Guile 2.2.4.

Guile 2.2.4 seemed to work well after uninstalling Guile 2.0, so with the older, slower computer I skipped the Guile 2.0 of Debian's apt (package) repositories and went directly for the Guile 2.2.4 tar.gz from GNU's site(fn:Gtar.gz). Using the browser Firefox to download the tar.gz files for Guile, Skribilo, Guile Reader, and maybe Artanis(fn:Alinks) I set the about:preferences(URL) to ask me for a folder. After downloading the first file to ~/Guile/modules the rest of the files came into the same folder smoothly. Transferring files from the Downloads folder can be a distraction. With a long view, putting Guile 2.2 in a Guile\modules folder could be appropriate.

Guile 2.2's installation succeeded after a few tweaks to the process explained in the manual's section 1.6 “Obtaining and Installing Guile”. (fn:GM1.6). Various tar and zcat commands are complex when you don't use them very frequently. Gnome's file manager lets Extract Here with a right click on a .tar.gz file. Then in a shell console I just have remember cd change directories twice to get into the inner Guile-2.2.4 folder containinge the configure and Makefile files that get everything to work.

With the shell console in the folder with all Guile's files I followed the manual(fn:GM1.6). As a regular user (not as root user yet, as recommended somewhere) I typed in two commands: 1. > ./configure This command told me of things needed for the Guile installation. 2. > make These commands take a long time.

The configure command's messages about missing requirements were not enough for me quickly meet Guile's needs. When the message said I needed libtdl or libunistring, I really needed libtdl-dev and libunistring-dev. Guile's installation when well with Debian's packages: apt-get install libtdl-dev as a sudoer with sudo apt-get install libunistring-dev or as root user.

While installing required software, on the older machine it was too involved to figure out how to, once again, add a sudo group so I just used a few shells consoles. I am developing a convention where my regular user shells are on the left half the screen, while the root user shells are on the right side. Even if the configure and make commands do not demand other software installations, I'll need sudo (standing for Super User Do?) or root privileges (authority?) to finally install Guile with the make install command.

The Guile installation process also requires libgmp which I was not able to get with Debian's apt. A search got me to the GNU MP 4.1 page(fn:GMP) and I got more practice with the tar.gz file installation process: 1) download, 2) Extract Here, 3) cd to inner GMP-6.1.2 folder, 4) > ./configure, 5) > make, and 6) # make install. I now like the compact notation, > make and # make install, using > for commands safely to be done as a regular user and # for commands necessarily to be done as root user. Until now I've often rushed through manual and helpful pages and missed the important details that can save time and frustration.

The installation process mentioned the need for bdw-gc. A search(fn:SUpage) showed me that Debian's libgc-dev package would work so a quick # apt-get install libgc-dev let me avoid longer download, configure and make process.
The need for libffi was, like libtdl and libunistring, met by Debian's -dev package # apt-get install libffi-dev.

With Guile installed we check with > guile and get the scheme@(guile-user)> prompt. It is fun to work through Nala Ginrut's Scheme in 15 Minutes pages on the Artanis site(fn:Alinks).

A helpful hintfrom Yusuke Shinyama(fn:YSpage) is to create a .guile file in your home directory.

    (use-modules (ice-9 readline))
    (activate-readline)

With the above two lines in ~\.guile you can use the up arrow key instead of re-typing the previous command when using Guile interactively. If you are already in an interactive session just type the two lines in at the prompt. After doing it seven or eight times I'm glad I noticed Yusuke Shinyama's advice.(fn:YSpage)

I had to uninstall, # apt uninstall guile, Guile 2.0 so that > guile gave me an interactive sesssion with Guile 2.2.4. But on the machine that never had a Guile, the absence of Guile 2.0's shared libraries kept Guile from starting any session. I compared the results for > whereis guile on the two machines. The machine with a working Guile 2.2.4 still had a /usr/share/guile/2.0 folder, even though I uninstalled: # apt uninstall guile. Thinking that I'd rather have a working Guile Scheme, even if it was an older one, I installed the Debian package # apt-get install guile and then > guile worked, and I had a session with Guile 2.2.4.

And then I was able to install Skribilo(fn:SK) and it's requirement, Guile Reader(fn:GRpage). These installations gave me some trouble with directory paths, guilemoduledir, but a close reading of configure messages was enough for a working Skribilo installation. Guile Reader's need for gperf was easily met after the experience with installing Guile 2.2.4. While the attitude and techniques for installation are still fresh with me, I hope to find the time to install Artanis too. After spending hours installing Guile I'll have to get competent with Skribilo, and hopefully train my brain learning web works with Artanis.

Free Programming Start: Keyboard View of Computers

(This post is a copy of a January 14, 2019 post: – https://write.as/bsmall2/installing-guile-2-2-4-on-two-computers) #Guile #GuileScheme #Scheme #Skribilo #InstallingGuile