[Ecls-list] make-build vs. xlib

Juan Jose Garcia-Ripoll juanjose.garciaripoll at googlemail.com
Sat Mar 13 13:55:08 UTC 2010


On Wed, Mar 10, 2010 at 9:05 AM, Juan Jose Garcia-Ripoll <
juanjose.garciaripoll at googlemail.com> wrote:

> On Wed, Mar 10, 2010 at 12:25 AM, Julian Stecklina <js at alien8.de> wrote:
>
>> If I load the system on the REPL, everything works as expected and the
>> PRINT prints #<"XLIB" package>. If I compile foo to a standalone binary
>> using (asdf:make-build 'foo :type :program), I get NIL, i.e. the XLIB
>> module is missing from the binary.
>>
>
> This has nothing to do with XLIB per se. The problem is simply that
> precompiled modules (xlib, asdf, etc) can not be included in standalone
> binaries. That requires a bit more hacking of ASDF than is currently done,
> as well as changing the build process to install statically linked versions
> of those modules.
>

This limitation has been lifted in git/CVS, though I did not make a full
test with CLX.

> (require 'asdf)

;;; Loading #P"/Users/jjgarcia/lib/ecl-10.3.1/ASDF.fas"
;;; Loading #P"/Users/jjgarcia/lib/ecl-10.3.1/CMP.fas"
;;; Loading #P"/Users/jjgarcia/lib/ecl-10.3.1/sysfun.lsp"
("ASDF" "CMP")
> (asdf:make-build 'foo :type :program)

; loading system definition from /Users/jjgarcia/build/ecl/foo.asd into
; #<ASDF0 package>
;;; Loading "/Users/jjgarcia/build/ecl/foo.asd"p [...]
;;;   Invoking external command:
;;;   gcc -o
"/Users/jjgarcia/.cache/common-lisp/ecl-10.3.1-darwin-x86/Users/jjgarcia/build/ecl/foo-mono"
-L"/Users/jjgarcia/lib/"
"/private/var/folders/kU/kUiyJak2GK4YuehJzAcNGU+++TI/-Tmp-/ECLINITP1IELn.o"
"/Users/jjgarcia/lib/ecl-10.3.1/libserve-event.a"
"/Users/jjgarcia/.cache/common-lisp/ecl-10.3.1-darwin-x86/Users/jjgarcia/build/ecl/libfoo.a"
-lffi -lecl  -lpthread   -lm
;;;
#<ASDF::PROGRAM-OP NIL 32265152>
>
$
~/.cache/common-lisp/ecl-10.3.1-darwin-x86/Users/jjgarcia/build/ecl/foo-mono

ECL (Embeddable Common-Lisp) 10.3.1
Copyright (C) 1984 Taiichi Yuasa and Masami Hagiya
Copyright (C) 1993 Giuseppe Attardi
Copyright (C) 2000 Juan J. Garcia-Ripoll
ECL is free software, and you are welcome to redistribute it
under certain conditions; see file 'Copyright' for details.
Type :h for Help.
Top level in: #<process SI:TOP-LEVEL 000ccfc0>.
> (find-package "SERVE-EVENT")

#<"SERVE-EVENT" package>
> (foo)

MY-SYMBOL
>
$ cat foo.lisp foo.asd
(ffi:clines
"#include <limits.h>"
"
cl_object
aux() {
   return @my-symbol;
}")

(defun foo ()
  (ffi:c-inline () () :object "aux()" :one-liner t))
(defsystem foo
    :depends-on (:serve-event)
    :components ((:file "foo")))


-- 
Instituto de Física Fundamental, CSIC
c/ Serrano, 113b, Madrid 28006 (Spain)
http://juanjose.garciaripoll.googlepages.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.common-lisp.net/pipermail/ecl-devel/attachments/20100313/5b9b89e1/attachment.html>


More information about the ecl-devel mailing list