;;; crunk.scm (import miscmacros) (let/cc cont (display "hello\n") (cont #t)) (display "goodbye\n") ;;; using csc's '-static' option $ csc -static crunk.scm -o crunk-sorta-static $ ldd crunk-sorta-static linux-vdso.so.1 (0x00007ffe42734000) libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f1f9db4e000) libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f1f9db49000) libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f1f9d988000) /lib64/ld-linux-x86-64.so.2 (0x00007f1f9df2e000) $ ./crunk-sorta-static hello goodbye ;;; using gcc to produce a static binary ;;; (chicken 5.2.0 install directory snipped in this output as [...]) $ csc -O0 -d2 -c crunk.scm -link miscmacros $ gcc -g -static crunk.o -o crunk-static [...]/lib/chicken/11/miscmacros.o -L[...]/lib -lchicke\ n -lm $ ldd crunk-static not a dynamic executable $ ./crunk-static Error: (load) during expansion of (import-syntax ...) - unable to load compiled module - cannot load compiled code dynamically - this is a statically linked executable: "[...]/lib/chicken/11/chicken.condition.import.so" Call history: (import scheme chicken.base chicken.syntax) (##core#begin (##core#require library scheme#) (##core#require librar\ y chicken.base#) (##core#requir... (##core#require library scheme#) (##sys#load-library (##core#quote library)) (##core#quote library) (##core#require library chicken.base#) (##sys#load-library (##core#quote library)) (##core#quote library) (##core#begin (##core#require expand chicken.syntax#)) (##core#require expand chicken.syntax#) (##sys#load-library (##core#quote expand)) (##core#quote expand) (##sys#load-library (##core#quote library)) (##sys#load-library (##core#quote library)) (##sys#load-library (##core#quote expand)) (import-syntax scheme (only chicken.base when unless let-optionals make-parameter add1 sub1) (only c... <-- ;;; looking for advice on where to go next with this ;;; ;;; should miscmacros be rebuilt with '-compile-syntax'? ;;; ;;; should the static libchicken.a be rebuilt with '-compile-syntax'? ;;; ;;; TIA!