Puppy Linux Blog Post:

How to compile GNU Common Lisp 2.6.12 in Lucid Puppy Linux 5.2.8
12/27/2015

Post Below
12/27/2015 - How to compile GNU Common Lisp 2.6.12 in Lucid Puppy Linux 5.2.8 (Puppy Linux)

    Hide/Show:


   ▲ Top  ▼ Bottom  △ TOC
How to compile GNU Common Lisp 2.6.12 in Lucid Puppy Linux 5.2.8
Sunday, December 27th, 2015
14:39:57 GMT

Puppy Linux

I had a tough time compiling GNU Common Lisp 2.6.12 from scratch in Lucid Puppy Linux 5.2.8 version 004.

But, I finally managed to do it. Here's how:


  1. GNU Common Lisp can do things with Tcl/Tk, but only if you have Tcl/Tk installed.

    As far as I know, Lucid Puppy 5.2.8 doesn't include Tcl/Tk by default. So, if you want Tcl/Tk, you can download their source code here:

    https://www.tcl.tk/software/tcltk/download.html

    I downloaded version 8.6.4 of both Tcl and Tk.


  2. Both Tcl and Tk were nice and easy to compile. I don't know if you have to compile and install them in a particular order, but I think I compiled and installed Tcl first.

    All I had to do was unzip each source code tarball, open the source code folder, open a terminal window, and put in these three commands:

    ./configure
    make
    make install

    (Though I actually used the command "new2dir make install" (without quotes) because I wanted to make .pet and .sfs files.)


  3. GNU Common Lisp itself was far more troublesome to compile. You can download its source code here:

    http://gnu.mirror.iweb.com/gcl/gcl-2.6.12.tar.gz


  4. Unzip the source code tarball. And if you want to make a .pet or .sfs file of make .pet and .sfs files, rename the gcl folder to "gcl-2.6.12" (or whichever version you're trying to compile).


  5. Next, open your gcl source code folder, then open the "h" folder. Then, open the "make-init.h" file in a text editor.

    Above the line which says "#include <signal.h>" (without quotes), add this line:

    #include <sys/ucontext.h>

    (Huge thanks to the author of this post for the solution, because without that post I would have had absolutely no clue at all what to do.)

    The above fix makes it so the compilation won't be stopped by these errors:


  6. Go back to the gcl source code folder, open a terminal, and type these three lines:

    ./configure --enable-tkconfig=/usr/local/lib/ --enable-tclconfig=/usr/local/lib/

    LD_LIBRARY_PATH=/usr/local/lib

    make


  7. After the build is finished - if you want to make a .pet and/or .sfs file, type this:

    new2dir make install

    Or, if you'd rather just install it without building a .pet or .sfs file, type this:

    make install


  8. Just one last nuisance to deal with. The file /bin/gcl has to be moved or renamed, because otherwise, your system might mistakenly try to run that instead of the correct gcl file at: /usr/local/bin/gcl

After all those steps, it should be possible to run GNU Common Lisp simply by typing "gcl" (without quotes).


If you have Tcl/Tk, here's how you can try them out with GNU Common Lisp.

Go to the gcl source code folder, open a terminal prompt, and type:

gcl

Then, at the GCL prompt, put in these commands:

(si::tkconnect)

(load "gcl-tk/demos/widget.lisp")

That last command will fail if your current working directory isn't the gcl source code folder.

   ▲ Top  ▼ Bottom  △ TOC


    Hide/Show: