$ ls
static-fire.asd static-fire.lisp
$ cat static-fire.asd
;; modeled after https://github.com/fare/workout-timer/blob/master/workout-timer.asd
(asdf:defsystem "static-fire"
:depends-on ((:version "asdf" "3.1")
"cffi")
:serial t
:components ((:file "static-fire")))
(asdf:defsystem "static-fire/static"
:class program-system
:defsystem-depends-on ("cffi-toolchain")
:depends-on ("static-fire")
:build-operation :static-program-op
:build-pathname "static-fire.static"
:entry-point "static-fire:entry-point")
$ cat static-fire.lisp
(defpackage #:static-fire
(:use #:cl)
(:export #:entry-point))
(defun entry-point (argv)
(declare (ignore argv))
(write-string "Hello, world!"))
=======================================
$ sbcl
* (asdf:load-system "static-fire")
; compiling file "/Users/robert/Scratch/static-fire/static-fire.lisp" (written 14 DEC 2017 11:46:54 AM):
; compiling (DEFPACKAGE #:STATIC-FIRE ...)
; compiling (DEFUN ENTRY-POINT ...)
; /Users/robert/.cache/common-lisp/sbcl-1.4.1.26-271f54e5c-macosx-x64/Users/robert/Scratch/static-fire/static-fire-tmpGHU3ALSV.fasl written
; compilation finished in 0:00:00.003
T
* (asdf:make "static-fire/static")
; cc -o /Users/robert/.cache/common-lisp/sbcl-1.4.1.26-271f54e5c-macosx-x64/Users/robert/Scratch/static-fire/static-fire/static-runtime-tmpAAURSO1 -g -mmacosx-version-min=10.6 -Wl,-no_pie -arch x86_64 -dynamic -twolevel_namespace -bind_at_load -pagezero_size 0x100000
Undefined symbols for architecture x86_64:
"_main", referenced from:
start in crt1.10.6.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
debugger invoked on a UIOP/RUN-PROGRAM:SUBPROCESS-ERROR in thread
#<THREAD "main thread" RUNNING {1001B50083}>:
Subprocess #<UIOP/LAUNCH-PROGRAM::PROCESS-INFO {10030745D3}>
with command ("cc" "-o"
"/Users/robert/.cache/common-lisp/sbcl-1.4.1.26-271f54e5c-macosx-x64/Users/robert/Scratch/static-fire/static-fire/static-runtime-tmpAAURSO1"
"-g" "-mmacosx-version-min=10.6" "-Wl,-no_pie" "-arch" "x86_64"
"-dynamic" "-twolevel_namespace" "-bind_at_load"
"-pagezero_size" ...)
exited with error code 1
Type HELP for debugger help, or (SB-EXT:EXIT) to exit from SBCL.
restarts (invokable by number or by possibly-abbreviated name):
0: [CONTINUE ] IGNORE-ERROR-STATUS
1: [RETRY ] Retry
#<STATIC-RUNTIME-OP > on #<PROGRAM-SYSTEM "static-fire/static">.
2: [ACCEPT ] Continue, treating
#<STATIC-RUNTIME-OP > on #<PROGRAM-SYSTEM "static-fire/static">
as having been successful.
3: Retry ASDF operation.
4: [CLEAR-CONFIGURATION-AND-RETRY] Retry ASDF operation after resetting the
configuration.
5: Retry ASDF operation.
6: Retry ASDF operation after resetting the
configuration.
7: [ABORT ] Exit debugger, returning to top level.
(UIOP/RUN-PROGRAM::%CHECK-RESULT 1 :COMMAND ("cc" "-o" "/Users/robert/.cache/common-lisp/sbcl-1.4.1.26-271f54e5c-macosx-x64/Users/robert/Scratch/static-fire/static-fire/static-runtime-tmpAAURSO1" "-g" "-mmacosx-version-min=10.6" "-Wl,-no_pie" "-arch" "x86_64" "-dynamic" "-twolevel_namespace" "-bind_at_load" "-pagezero_size" ...) :PROCESS #<UIOP/LAUNCH-PROGRAM::PROCESS-INFO {10030745D3}> :IGNORE-ERROR-STATUS NIL)
source: (CERROR "IGNORE-ERROR-STATUS" 'SUBPROCESS-ERROR :COMMAND COMMAND
:CODE EXIT-CODE :PROCESS PROCESS)
0]