1
1
mirror of https://github.com/kanaka/mal.git synced 2024-09-11 13:55:55 +03:00

common-lisp: fix build with sbcl 2.0.1.debian

The update from ubuntu:vivid to ubuntu:20.04 update the version of sbcl
from 1.2.4.debian to 2.0.1.debian. This resulted in the cl-launch based
build process no longer working: dependencies were not resolved (but
running it several times would eventually resolve them. So use an sbcl
build command directly when building for sbcl.

Note: updating the image to ubuntu:24.04 upgrades the version of sbcl to
2.2.9.debian. Something about that version breaks how we do hash-maps.
They become temperamental: hash-map creation often results in a nil
object returned and doing (get hm key) usually results in nil returned
even if the key shows as being present.
This commit is contained in:
Joel Martin 2024-08-06 12:02:16 -05:00
parent 448d26aab6
commit 062fb6f66e
2 changed files with 6 additions and 3 deletions

View File

@ -25,7 +25,7 @@ RUN apt-get -y install curl git libreadline-dev libedit-dev
RUN apt-get -y install sbcl
# Install cl-asdf (CLISP does not seem to come with it)
RUN apt-get -y install cl-launch cl-asdf
RUN apt-get -y install cl-launch cl-asdf cl-ppcre
RUN cd /tmp && \
git clone https://gitlab.common-lisp.net/xcvb/cl-launch.git && \

View File

@ -15,6 +15,9 @@ LISP ?= sbcl
ABCL ?= abcl
MKCL ?= mkcl
BINS = step0_repl step1_read_print step2_eval step3_env step4_if_fn_do \
step5_tco step6_file step7_quote step8_macros step9_try stepA_mal
# TODO: In theory cl-launch should be able to build standalone executable using
# MKCL unfortunately the executable crashes on startup
STANDALONE_EXE = sbcl clisp ccl ecl cmucl
@ -28,7 +31,7 @@ $(foreach step, $(call steps), $(call record_lisp,$(patsubst step%,%,$(step)),$(
.PRECIOUS: hist/%_impl
all : stepA_mal
all : $(BINS)
hist/%_impl: ;
@ -47,7 +50,7 @@ ifeq ($(LISP),clisp)
endif
ifneq ($(filter $(LISP),$(STANDALONE_EXE)),)
cl-launch --wrap 'if [ -z "$$CL_LAUNCH_VERSION" ] ; then cd "$$(dirname $$CL_LAUNCH_FILE)" ; fi' --verbose --lisp $(LISP) --source-registry $(ROOT_DIR) --system $@ --dump '!' -o $@ --entry 'mal:main'
sbcl --eval '(load "~/quicklisp/setup.lisp")' --eval '(asdf:initialize-source-registry `(:source-registry (:tree "$(ROOT_DIR)") :inherit-configuration))' --eval '(ql:quickload :uiop)' --eval '(ql:quickload :cl-readline)' --eval '(ql:quickload :genhash)' --eval '(asdf:load-system "$@")' --eval '(asdf:operate :build-op "$@")' --eval "(save-lisp-and-die \"$@\" :executable t :toplevel #'(lambda () (mal:main)))" --quit
else ifeq ($(LISP),abcl)
echo -n '#!/bin/sh\ncd `dirname $$0` ; $(ABCL) --noinform --noinit --nosystem --load run-abcl.lisp -- $@ $$@' > $@
chmod +x $@