Installing SBCL on Uberspace
Uberspace does not provide SBCL by default, so you will have to install it yourself in order to use it for your Common Lisp server application.
Since Uberspace is a shared hoster, SBCL has to be installed to your home directory.
This requires either some environment variables to be set or SBCL to be compiled with a different prefix.
Additional information related to installing/building SBCL can be found in the
INSTALL file comming with the SBCL source/binary distribution or on the SBCL homepage.
The easiest way to install SBCL is to use the binary distribution you can get from the download page. Download the latest version for Linux/AMD64 from the platform table to your Uberspace, unpack it, and go into the directory, e.g. (without linebreaks):
To install SBCL to the home directory (i.e., to ~/bin, ~/lib, etc., which are also used by other applications on your uberspace), run the install script with
INSTALL_ROOT set to your home directory (so exchange
chfin with your actual username):
The installation procedure will probably complain about missing documentation files, which you can ignore. Before that it should say something like
SBCL has been installed: binary /home/chfin/bin/sbcl core and contribs in /home/chfin/lib/sbcl/
The third line is important as it tells us that SBCL’s core has been installed to
SBCL by default looks for its core under
/usr/local is the default prefix.
To make SBCL find its core in
/home/chfin/lib/sbcl, we either have to build it with the prefix
/home/chfin or set the environment variable
SBCL_HOME to the core directory:
To make this permanent, add the previous line to your
~/.bash_profile, log out and log in again.
This should give you
Compiling from source
Compiling from source has the advantage that you can provide a prefix that SBCL is installed to and that it uses to search for its core, so you don’t have to set
Also, the usual benefits of compiling from source apply like adding/removing features.
To compile SBCL, you need an already compiled SBCL or another Lisp implementation that is able to compile SBCL (refer to the the
INSTALL for a complete list).
The easiest way is to use an already installed SBCL (as described in the previous section) or a simply unpacked binary distribution.
Fetch the sbcl source by downloading the source tarball or cloning the git repo (don’t forget to checkout the latest release tag) and navigate to the source directory.
To compile SBCL using an already installed SBCL just run
chfin with your username.
Of course, you can add other options to
make.sh to customize your build according to
If you didn’t install SBCL before and want to use the unpacked binary distribution, copy the file
run-sbcl.sh from the source directory to the toplevel directory of the binary distribution, e.g.:
This script allows you to run SBCL from the builddirectory or binary distribution without having to install it, taking care of loading the correct core and setting
So, in order to build the SBCL source, run
chfin with your username and adding your own cusomization options.
Note that you should run this in a screen session and detach it since you are accessing your uberspace via SSH and watching the whole output during compilation will heavily slow down the compilation process (as described in
If you want, you can continue and build the documentation and run tests as described in
To install the compiled SBCL to your uberspace now, just run:
--prefix=/home/chfin already configured the install script to install the binaries to your home directory.
Also, you don’t have to set
SBCL_HOME anymore since it now correctly defaults to