Skip to content

Creating deliverables using ASDFv3 bundle operations #4

Description

@hraban

There are a few ASDFv3 build operations which seem under ABCL to either be NOPs or cause full errors.

Example:

hello.asd:

(asdf:defsystem "hello"
  :entry-point "hello:main"
  :components ((:file "main")))

main.lisp:

(defpackage :hello
  (:use :cl)
  (:export main))

(in-package :hello)

(defun main (&rest args)
  (format T "Hello, world~%"))

Execute:

CL_SOURCE_REGISTRY=$PWD abcl --noinit --nosystem --batch --eval '(require "asdf")' --eval '(asdf:operate '\''asdf:program-op "hello")'

Expected result: a binary (or a .jar, or some kind of build output?) in ~/.cache/common-lisp/...

Observed result:

Failed to introspect virtual threading methods: java.lang.reflect.InvocationTargetException
Armed Bear Common Lisp 1.9.2
Java 19.0.2 Azul Systems, Inc.
OpenJDK 64-Bit Server VM
Low-level initialization completed in 0.084 seconds.
Startup completed in 0.405 seconds.
; Compiling /private/tmp/hello/main.lisp ...
; (DEFPACKAGE :HELLO ...)
; (IN-PACKAGE :HELLO)
; (DEFUN MAIN ...)
; in (DEFUN MAIN ...)

; Caught STYLE-WARNING:
;   The variable ARGS is defined but never used.

; Wrote /Users/user/.cache/common-lisp/abcl-1.9.2-fasl43-macosx-arm64/private/tmp/hello/main-tmpJOXJUEIU.abcl (0.032 seconds)
; Caught COMPILE-WARNED-WARNING:
;   Lisp compilation had style-warnings while compiling #<ASDF/LISP-ACTION:CL-SOURCE-FILE "hello" "main">


; Compilation unit finished
;   Caught 1 WARNING condition
;   Caught 1 STYLE-WARNING condition


Caught UIOP/UTILITY:NOT-IMPLEMENTED-ERROR while processing --eval option "(asdf:operate 'asdf:program-op "hello")":
  #<NOT-IMPLEMENTED-ERROR {5158C4AB}>

I can find sundry articles online about bundling as .jar files or even as stand-alone executable using ABCL, but I'd expect this functionality to somehow be exposed to ASDF as one of the bundle operations.

Should ABCL support this in some way or another?

  • program-op and image-op error (you'd expect a JAR at least?)
  • lib-op and dll-op are NOPs (makes sense)

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions