Skip to content

Instantly share code, notes, and snippets.

@simon-brooke
Last active July 6, 2026 15:36
Show Gist options
  • Select an option

  • Save simon-brooke/b281809402fbc9469716aad80aa2bfd3 to your computer and use it in GitHub Desktop.

Select an option

Save simon-brooke/b281809402fbc9469716aad80aa2bfd3 to your computer and use it in GitHub Desktop.
Bringing the Jolt language compiler up on Debian

The Jolt language is an experimental Clojure source to native executable compiler built on Chez Scheme. This Gist describes how I got it running on Debian Trixie.

Firstly, in the jolt repository, the file bin/joltc is a (clever) shell script wrapper. It assumes that the chez scheme executable on your system will be invoked as chez. If you install chez scheme using the Debian package manager, it will be installed as chezscheme, and consequently the script won't find it. I intend to submit a pull request to make the shell script try a number of possible variant names for the chez scheme executable, but I haven't yet done so and, even if I do, it may not be accepted.

I tried creating a symbolic link /home/simon/bin/chez → /usr/bin/chezscheme but this did not work, apparently because the executable constructs the path to its boot file as a relative path from its executable and using the name by which it was invoked.

I imagine that you could do:

pushd /usr/bin
sudo ln -s chezscheme chez
popd

but I did not do this and have not tested it. Instead, I edited the shell script as shown in this diff:

diff --git a/bin/joltc b/bin/joltc
index c1dc162..4f9f6af 100755
--- a/bin/joltc
+++ b/bin/joltc
@@ -17,4 +17,5 @@ export JOLT_PWD="${JOLT_PWD:-$PWD}"
 # Version for --version / banners: git describe of this checkout, else "dev".
 export JOLT_VERSION="${JOLT_VERSION:-$(git -C "$root" describe --tags --always --dirty 2>/dev/null || echo dev)}"
 cd "$root" || exit 1
-exec chez --script host/chez/cli.ss "$@"
+exec chezscheme --script host/chez/cli.ss "$@"
+

This still left the executable failing to find its boot file. On Debian, the boot script is called scheme.boot and is additionally symlinked as chezscheme.boot, but if the executable is invoked as chez it expects the boot script to be named chez.boot; so, although I generally do not like making changes in directories managed by the package manager, I added an additional symlink chez.boot → scheme.boot, as detailed in the recipe below.

Steps to compile

Clone the repository

Note that if you do not add the --recurse-submodules flag, it will not work. Do not ask me how I know this.

git clone --recurse-submodules https://github.com/jolt-lang/jolt.git
cd jolt

install dependencies

These are the additional packages I needed. BUT, my system already had a fairly full complement of compiler writing tools; you may find you need more.

sudo apt install chezscheme chezscheme-dev lz4 liblz4-dev xxd

Frob the boot file

I've explained above that chez scheme seems to have a rather baroque way of finding the boot file without which it will not start up. In the Debian packaged version, this too is not named as the jolt build process expects.

Note that, as of June 2026, the version of chez scheme in the Trixie repository was 10.0.0; but the numbers here may change, so check.

export JOLT_CHEZ_CSV=/usr/lib/csv10.0.0/ta6le/
pushd $JOLT_CHEZ_CSV
sudo ln -s scheme.boot chez.boot
popd

Compile

make joltc

This creates an executable in target/release, and another in target/debug, both called joltc. The version in target/debug/ is, on my system, about twice as big as that in target/release. They appear to work the same, and I haven't yet investigated what additional functionality the debug variant provides.

@simon-brooke

simon-brooke commented Jul 5, 2026

Copy link
Copy Markdown
Author

Note that the glimmer-gl toolkit does not work for me out of the box on Debian, sadly.

It fails with the following message:

  GL info log: 0:1(10): error: GLSL 3.30 is not supported. Supported versions are: 1.00 ES, 3.00 ES, 3.10 ES, and 3.20 ES

Unhandled exception: shader: program failed to compile/link

I suspect the reason for this is that the version of the Mesa GL Shading Language for Embedded Systems supported by Trixie is not sufficiently up to date; but it could simply be that I'm missing another library.

However, as far as I can see from either Wikipedia or the Mesa project's own website, there is no 3.30 version, either of GLSL or GLSL-ES.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment