Note that there are some explanatory texts on larger screens.

plurals
  1. POHow can ecl include asdf dependencies in an executable? (take 2)
    text
    copied!<p>This question was asked and answered by ayrnieu at</p> <p><a href="https://stackoverflow.com/questions/580083/how-can-ecl-include-asdf-dependencies-in-an-executable">How can ECL include ASDF dependencies in an executable?</a></p> <p>But the example code he linked to does not actually involve any dependencies. I've tried copying the model in the stumpwm code he refers to but I can't get it to work. He are my files.</p> <p>---- ecl-test.asd ----</p> <pre><code>(defsystem "ecl-test" :description "test of asdf:make-build" :depends-on (:mydefs) :components ((:file "package") (:file "ecl-test" :depends-on ("package")) (:file "main" :depends-on ("package" "ecl-test")) ) ) </code></pre> <p>---- ecl-test.lisp ----</p> <pre><code> (in-package :ecl-test) (defun test () (format t "testing...~%") ;; Note that with the next line commented out, ;; the program never uses the package "mydefs". ;; (format t (write-to-string (mydefs:number-sequence :from 2 :to 7))) (format t "...done~%")) </code></pre> <p>---- package.lisp ----</p> <pre><code>(defpackage :ecl-test (:use :cl :mydefs ) (:export :test)) </code></pre> <p>---- main.lisp ----</p> <pre><code>(ecl-test:test) (ext:quit) </code></pre> <p>This compiles successfully (in slime):</p> <pre><code>CL-USER&gt; (asdf:make-build 'ecl-test :type :program :monolithic t :epilogue-code '(ext:quit 0)) ; loading system definition from /home/dabrowsa/lisp/ecl-test/ecl-test.asd into ; #&lt;ASDF0 package&gt; ;;; Loading "/home/dabrowsa/lisp/ecl-test/ecl-test.asd" ;;; Compiling /home/dabrowsa/lisp/ecl-test/package.lisp. ;;; OPTIMIZE levels: Safety=2, Space=0, Speed=3, Debug=3 ;;; End of Pass 1. ;;; Note: Creating tag: "_eclitxZgyvjVscp1_KzxnJ9z" for #P"/home/dabrowsa/lisp/ecl-test/package.o" ;;; Note: Invoking external command: ;;; gcc "-I/usr/include/" -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -g -O2 -fPIC -Dlinux -O -w -c "/home/dabrowsa/lisp/ecl-test/package.c" -o "/home/dabrowsa/lisp/ecl-test/package.o" ;;; Finished compiling /home/dabrowsa/lisp/ecl-test/package.lisp. ;;; Note: Scanning #P"/home/dabrowsa/lisp/ecl-test/package.o" ;;; Note: Found tag: "_eclitxZgyvjVscp1_KzxnJ9z" for /home/dabrowsa/lisp/ecl-test/package.o ;;; Note: Invoking external command: ;;; gcc "-I/usr/include/" -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -g -O2 -fPIC -Dlinux -O -w -c "/tmp/ECLINITMs8gOO.c" -o "/tmp/ECLINITMs8gOO.o" ;;; Note: Invoking external command: ;;; gcc -o "/home/dabrowsa/lisp/ecl-test/package.fas" -L"/usr/lib/" "/tmp/ECLINITMs8gOO.o" "/home/dabrowsa/lisp/ecl-test/package.o" -shared -lecl -lgmp -lgc -ldl -lm ;;; Loading "/home/dabrowsa/lisp/ecl-test/package.fas" ;;; Compiling /home/dabrowsa/lisp/ecl-test/ecl-test.lisp. ;;; OPTIMIZE levels: Safety=2, Space=0, Speed=3, Debug=3 ;;; Compiling (DEFUN TEST ...). ;;; End of Pass 1. ;;; Note: Creating tag: "_eclclGsJgWGIqMw1_y1ynJ9z" for #P"/home/dabrowsa/lisp/ecl-test/ecl-test.o" ;;; Emitting code for TEST. ;;; Note: Invoking external command: ;;; gcc "-I/usr/include/" -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -g -O2 -fPIC -Dlinux -O -w -c "/home/dabrowsa/lisp/ecl-test/ecl-test.c" -o "/home/dabrowsa/lisp/ecl-test/ecl-test.o" ;;; Finished compiling /home/dabrowsa/lisp/ecl-test/ecl-test.lisp. ;;; Note: Scanning #P"/home/dabrowsa/lisp/ecl-test/ecl-test.o" ;;; Note: Found tag: "_eclclGsJgWGIqMw1_y1ynJ9z" for /home/dabrowsa/lisp/ecl-test/ecl-test.o ;;; Note: Invoking external command: ;;; gcc "-I/usr/include/" -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -g -O2 -fPIC -Dlinux -O -w -c "/tmp/ECLINITg28qfo.c" -o "/tmp/ECLINITg28qfo.o" ;;; Note: Invoking external command: ;;; gcc -o "/home/dabrowsa/lisp/ecl-test/ecl-test.fas" -L"/usr/lib/" "/tmp/ECLINITg28qfo.o" "/home/dabrowsa/lisp/ecl-test/ecl-test.o" -shared -lecl -lgmp -lgc -ldl -lm ;;; Loading "/home/dabrowsa/lisp/ecl-test/ecl-test.fas" ;;; Compiling /home/dabrowsa/lisp/ecl-test/main.lisp. ;;; OPTIMIZE levels: Safety=2, Space=0, Speed=3, Debug=3 ;;; End of Pass 1. ;;; Note: Creating tag: "_eclJi0DFzaXyAEw1_4LynJ9z" for #P"/home/dabrowsa/lisp/ecl-test/main.o" ;;; Note: Invoking external command: ;;; gcc "-I/usr/include/" -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -g -O2 -fPIC -Dlinux -O -w -c "/home/dabrowsa/lisp/ecl-test/main.c" -o "/home/dabrowsa/lisp/ecl-test/main.o" ;;; Finished compiling /home/dabrowsa/lisp/ecl-test/main.lisp. ;;; Note: Scanning #P"/home/dabrowsa/lisp/ecl-test/main.o" ;;; Note: Found tag: "_eclJi0DFzaXyAEw1_4LynJ9z" for /home/dabrowsa/lisp/ecl-test/main.o ;;; Note: Invoking external command: ;;; gcc "-I/usr/include/" -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -g -O2 -fPIC -Dlinux -O -w -c "/tmp/ECLINITeop9MY.c" -o "/tmp/ECLINITeop9MY.o" ;;; Note: Invoking external command: ;;; gcc -o "/home/dabrowsa/lisp/ecl-test/main.fas" -L"/usr/lib/" "/tmp/ECLINITeop9MY.o" "/home/dabrowsa/lisp/ecl-test/main.o" -shared -lecl -lgmp -lgc -ldl -lm ;;; Note: Scanning #P"/home/dabrowsa/lisp/ecl-test/main.o" ;;; Note: Found tag: "_eclJi0DFzaXyAEw1_4LynJ9z" for /home/dabrowsa/lisp/ecl-test/main.o ;;; Note: Scanning #P"/home/dabrowsa/lisp/ecl-test/ecl-test.o" ;;; Note: Found tag: "_eclclGsJgWGIqMw1_y1ynJ9z" for /home/dabrowsa/lisp/ecl-test/ecl-test.o ;;; Note: Scanning #P"/home/dabrowsa/lisp/ecl-test/package.o" ;;; Note: Found tag: "_eclitxZgyvjVscp1_KzxnJ9z" for /home/dabrowsa/lisp/ecl-test/package.o ;;; Note: Invoking external command: ;;; gcc "-I/usr/include/" -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -g -O2 -fPIC -Dlinux -O -w -c "/tmp/ECLINITsLgWth.c" -o "/tmp/ECLINITsLgWth.o" ;;; Note: Invoking external command: ;;; ar cr /home/dabrowsa/lisp/ecl-test/libecl-test.a /tmp/ECLINITsLgWth.o /home/dabrowsa/lisp/ecl-test/package.o /home/dabrowsa/lisp/ecl-test/ecl-test.o /home/dabrowsa/lisp/ecl-test/main.o ;;; Note: Invoking external command: ;;; ranlib /home/dabrowsa/lisp/ecl-test/libecl-test.a ;;; Note: Invoking external command: ;;; gcc "-I/usr/include/" -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -g -O2 -fPIC -Dlinux -O -w -c "/tmp/ECLINITTF1dqA.c" -o "/tmp/ECLINITTF1dqA.o" ;;; Note: Invoking external command: ;;; gcc -o "/home/dabrowsa/lisp/ecl-test/ecl-test-mono" -L"/usr/lib/" "/tmp/ECLINITTF1dqA.o" "/home/dabrowsa/lisp/ecl-test/libecl-test.a" -lecl -lgmp -lgc -ldl -lm #&lt;ASDF::PROGRAM-OP NIL 38147728&gt; </code></pre> <p>But executing ecl-test-mono produces an error.</p> <pre><code>~/lisp/ecl-test$ ./ecl-test-mono The function ASDF::SYSTEM-REGISTERED-P is undefined. No restarts available. Broken at NIL. ECL-TEST&gt;&gt; </code></pre> <p>SYSTEM-REGISTERED-P seems to be an unexported function in ASDF, I have no idea why that's popping up here, but then, I'm a newbie so what do I know.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload