On 10/11/12 13:35, z_axis wrote:
> I have built stumpwm using SBCL,CCL,CLISP and ECL successfully.
> The executable created by ECL is smallest but it doesnot work.

With the attached patch, I was able to build a working image
using ECL 12.7.1.

The patch contains two changes:
* Adding ASDF as a dependency in stumpwm.asd avoids the error
  "Package ((ASDF . #<ASDF package>)) referenced in compiled
  file NIL but has not been created" when running the image.
* The redefinition of ECL's compile-file-pathname function is a
  workaround to avoid the error "Filesystem error with pathname
  #P"SYS:libLIBCLX.A.NEWEST"." while building the image (by
  preventing library file names from being translated twice).

ECL has to be built...
* with CLX enabled (using portable CLX results in "In function
  OPEN-UNIX-SOCKET-STREAM, the value of the first argument is
  "/tmp/.X11-unix/X0" which is not of the expected type STRING.")
* without thread support (enabling threads results in "Attempted
  to recursively lock #<lock (nonrecursive) "CLX Buffer Lock">
  which is already owned by #<process SI:TOP-LEVEL>.")

-- 
Dirk
diff --git a/make-image.lisp.in b/make-image.lisp.in
index 78cbb7f..6c5686a 100644
--- a/make-image.lisp.in
+++ b/make-image.lisp.in
@@ -22,6 +22,14 @@
 (ccl:save-application "stumpwm" :prepend-kernel t :toplevel-function #'stumpwm:stumpwm)
 
 #+ecl
+(let ((compile-file-pathname #'compile-file-pathname))
+  (ext:package-lock :cl nil)
+  (defun compile-file-pathname (filename-base &rest more-args)
+    (cond ((pathname-host filename-base) filename-base)
+          (t (apply compile-file-pathname filename-base more-args))))
+  (ext:package-lock :cl t))
+
+#+ecl
 (asdf:make-build 'stumpwm :type :program :monolithic t
                  :move-here "."
                  :name-suffix ""
diff --git a/stumpwm.asd b/stumpwm.asd
index c98046c..4a21595 100644
--- a/stumpwm.asd
+++ b/stumpwm.asd
@@ -19,7 +19,7 @@
   ;; :license "GNU General Public License"
   :description "A tiling, keyboard driven window manager" 
   :serial t
-  :depends-on (:cl-ppcre #-(or cmu clisp) :clx #+sbcl :sb-posix)
+  :depends-on (#+ecl :asdf :cl-ppcre #-(or cmu clisp) :clx #+sbcl :sb-posix)
   :components ((:file "package")
 	       (:file "primitives")
                (:file "workarounds")

_______________________________________________
Stumpwm-devel mailing list
Stumpwm-devel@nongnu.org
https://lists.nongnu.org/mailman/listinfo/stumpwm-devel

Reply via email to