If I want to build a Docker image using these scripts (e.g., I forked the allegro
repo to make a docker image for Allegro version 11), how do I do that?
I'm afraid I can't figure out how to do this. It seems like there's a long toolchain involved here, and I'm not sure what README file tells me how to build the docker images given a forked and updated image repo. Thanks!
Do I need to install bashbrew
? And if so, what do I do once I have? Also the generate-stackbrew-library.sh script does something, but I'm not sure what or how to use it.
Maybe add a README to the cl-docker-images
group? Thanks
Update the ABCL version.
If we install QL with the existing script, we get an ancient version of ASDF in QL, one that's much older than what Franz distributes with Allegro. Suggestion: add -e '(require :asdf)'
to the install-quicklisp script.
If you are interested, I could make a MR: running this up the flagpole
Eric Timmons (dba63137) at 14 Mar 22:50
Update allegro license and use 64 bit version
Add a docker image for the most recent ABCL release.
The tests for ITERATE fail on clasp, because when we try to start up the clasp docker image we get an error that "shell not found". Not sure what this means. See transcript.
The instructions for "Run a single Common Lisp script" list this as the command:
clisp -c -l ./your-daemon-or-script.lisp
But it should not have the -c or -l flags, which respectively compile a file without loading it, and emit an assembly language file. So this command does not run the script, it only compiles it.
$ ls
test.lisp
$ cat test.lisp
(print "hallo")
$ clisp -q -norc -ansi test.lisp
"hallo"
$ ls
test.lisp
$ clisp -q -norc -ansi -c -l test.lisp
;; Compiling file /home/vibhu/t/test.lisp ...
;; Wrote file /home/vibhu/t/test.fas
;; Wrote file /home/vibhu/t/test.lis
0 errors, 0 warnings
$ ls
test.fas test.lib test.lis test.lisp
Success with ASDF 3.3.5 \o/
- ( cd ~/common-lisp/ && wget https://asdf.common-lisp.dev/archives/asdf-3.3.5.tar.gz && tar -xvf asdf-3.3.5.tar.gz && mv asdf-3.3.5 asdf )
Looks like I managed the upgrade with a tarball:
- ( cd ~/common-lisp/ && wget https://asdf.common-lisp.dev/archives/asdf-3.3.4.tar.gz && tar -xvf asdf-3.3.4.tar.gz && mv asdf-3.3.4 asdf )
- echo "Content of ~/common-lisp/asdf/:" && ls ~/common-lisp/asdf/
I see:
------- ASDF version: 3.3.4
------- UIOP version: 3.3.4
but still
; unrecognized define-package keyword :LOCAL-NICKNAMES
:/
Trying to upgrade ASDF in a before_script
:
before_script:
- mkdir -p ~/common-lisp/asdf/
- ( cd ~/common-lisp/asdf/ && wget https://asdf.common-lisp.dev/archives/asdf-3.3.5.lisp && mv asdf-3.3.5.lisp asdf.lisp )
plus I have (require "asdf")
on top of my .asd,
but it isn't enough I'm still getting the older version.
Oh, yes, one thing that is relevant about using a Mac is that its BSD-inflected sed
is not compatible with the update.sh
script. That's fixable by installing GNU sed (e.g., from Homebrew or MacPorts), and using that instead. If it's of interest, I can provide a patch; LMK if you would like one.
I forked the repo for the ABCL images, and tried to execute the steps described on its README (btw, it would be helpful to tell people they need to install bashbrew
, but that didn't take long to figure out).
I got stuck on the following -- maybe there's a version coded into the script that no longer exists?
Here's the error message:
$ ./generate-stackbrew-library.sh
failed fetching repo "https://github.com/docker-library/official-images/raw/master/library/openjdk:11-jdk-windowsservercore-ltsc2016"
tag not found in manifest for "openjdk": "11-jdk-windowsservercore-ltsc2016"
# this file is generated via https://github.com/cl-docker-images/abcl/blob/cd5916cbc69e9ee384ff7a007b979ef2004331c2/generate-stackbrew-library.sh
Maintainers: Eric Timmons <nasafreak@gmail.com> (@daewok)
GitRepo: https://github.com/cl-docker-images/abcl.git
./generate-stackbrew-library.sh: line 124: parentRepoToArches[$variantParent]: unbound variable
Note, I was doing this on an M1 Mac; but I don't know that this is relevant.
Hi,
I defined a package with uiop:define-package
that contains :local-nicknames
. The build (Gitlab CI) fails:
caught ERROR: ; (during macroexpansion of (UIOP/PACKAGE:DEFINE-PACKAGE BOOKSHOPS.MODELS ...)) ; unrecognized define-package keyword :LOCAL-NICKNAMES
It turns out the ASDF version shipped in this image (SBCL 2.2.4, image: clfoundation/sbcl
) is 3.3.1, which dates from 2017. My local version at "3.3.4.15" works as expected.
What can we do about this, update ASDF in the image?
Best,
package definition:
(uiop:define-package bookshops/web
(:use :cl)
(:import-from :easy-routes
:defroute)
(:local-nicknames (#:utils #:bookshops.utils)
(#:a #:alexandria)))
A separate allegro image exists, why not add allegro to the cl-devel image?
When trying to load an FFI dependent lisp library, e.g. cl-glfw-opengl-sgix_shadow_ambient, with ABCL, one gets error like this:
; Caught SIMPLE-WARNING:
; Please obtain and install maven-3.0.3 or later locally from <http://maven.apache.org/download.html>, then set ABCL-ASDF:*MVN-LIBS-DIRECTORY* to the directory containing maven-core-3.*.jar et. al.
Unhandled SERIOUS-CONDITION of type COMMON-LISP:ERROR is signaled: Class not found: com.sun.jna.Pointer
This is because ABCL uses maven to download the JNA library it uses for FFI.
My current workaround is to have maven downloaded from the said URL to a directory mounted to the docker image as the cl
user home, and then have M2_HOME and M2 variables exported in my main script (located in the same mounted directory)
THIS_DIR=$(realpath "`dirname $0`")
export M2_HOME=$THIS_DIR/apache-maven-3.8.6
export M2=$M2_HOME/bin
# ... run lisp
(Actually any one of the two variables would be enough I believe, although not tested, because I needed both in my environment for some other reason).
Note, maven by default downloads libraries to ~/.m2/, so having home directory mounted helps here - the download happens only once and then reused by the container on next run.
The ABCL code that looks up for Maven installation is here: https://github.com/armedbear/abcl/blob/master/contrib/abcl-asdf/maven.lisp But I don't know which of these functions are required for most crucial things like FFI, and which are optional or used only in specific situations.
It may be good to have in the Docker image Maven already installed, and maybe JNA already downloaded.
$ ecl
ecl: error while loading shared libraries: libffi.so.7: cannot open shared object file: No such file or directory