[Cl-smoke] Building cl-smoke on Mac OS X

Elliott Slaughter elliottslaughter at gmail.com
Tue Feb 16 23:58:13 CET 2010


On Tue, Feb 16, 2010 at 1:53 PM, Tobias Rautenkranz
<tobias at rautenkranz.ch>wrote:

>
> > However, when I attempt to load cl-smoke.qt.core in sbcl, cffi throws
> fits,
> > first because your cffi:define-foreign-library statements are missing a
> > :darwin case (and all of the libraries compiled with a .dylib extension,
> > instead of a .so extension), and second because it refuses to find the
> > libraries even when I have put them on
> cffi:*foreign-library-directories*.
>
> This is not clear to me. You have added the :darwin case, set
> cffi:*foreing-library-directories* and the libraries (which?) where not
> found?
>

Here are the changes which I have made in my attempts to make cl-smoke
compile (beyond the ones already mentioned on this list):

hunk ./src/libsmoke/smoke.lisp 6
+    (:darwin "libsmokeqtcore.3.darwin")
hunk ./src/libsmoke/smoke.lisp 10
+    (:darwin "libclsmoke.dylib")
hunk ./src/libsmoke/smoke.lisp 14
+    (:darwin "libclsmokeutil.dylib")
hunk ./src/smoke.lisp 175
+           (:darwin ,(format nil "~(~A~).3.dylib" library))

And here are the steps I'm taking to load cl-smoke:

* (asdf:oos 'asdf:load-op :cffi)
* (push #p"/opt/local/lib/" cffi:*foreign-library-directories*)
* (asdf:oos 'asdf:load-op :cl-smoke.qt.examples)
[ ... initial output omitted ... ]
; compiling file
"/Users/elliott/Programming/Lisp/asdf/smoke/src/libsmoke/smoke.lisp"
(written 15 FEB 2010 03:28:32 PM):
; compiling (IN-PACKAGE #:SMOKE)
; compiling (DEFINE-FOREIGN-LIBRARY LIBSMOKEQT ...)
; compiling (DEFINE-FOREIGN-LIBRARY LIBCLSMOKE ...)
; compiling (DEFINE-FOREIGN-LIBRARY LIBCLSMOKEUTIL ...)
; compiling (USE-FOREIGN-LIBRARY LIBSMOKEQT)
; file: /Users/elliott/Programming/Lisp/asdf/smoke/src/libsmoke/smoke.lisp
; in: EVAL-WHEN (:LOAD-TOPLEVEL :COMPILE-TOPLEVEL :EXECUTE)
;     (CFFI:USE-FOREIGN-LIBRARY SMOKE::LIBSMOKEQT)
; ==>
;   (CFFI:LOAD-FOREIGN-LIBRARY 'SMOKE::LIBSMOKEQT)
;
; caught ERROR:
;   (during compile-time-too processing)
;   Unable to load foreign library (LIBSMOKEQT).
;     Error opening shared object "libsmokeqtcore.3.darwin":
;     dlopen(3) failed.

; compiling (USE-FOREIGN-LIBRARY LIBCLSMOKE)
; file: /Users/elliott/Programming/Lisp/asdf/smoke/src/libsmoke/smoke.lisp
; in: EVAL-WHEN (:LOAD-TOPLEVEL :COMPILE-TOPLEVEL :EXECUTE)
;     (CFFI:USE-FOREIGN-LIBRARY SMOKE::LIBCLSMOKE)
; ==>
;   (CFFI:LOAD-FOREIGN-LIBRARY 'SMOKE::LIBCLSMOKE)
;
; caught ERROR:
;   (during compile-time-too processing)
;   Unable to load foreign library (LIBCLSMOKE).
;     Error opening shared object "/opt/local/lib/libclsmoke.0.0.1.dylib":
;     dlopen(3) failed.
[ ... further compile errors ... ]

All of the dylib files mentioned above are present in my /opt/local/lib
directory.

Thanks again for helping me sort this out.

-- 
Elliott Slaughter

"Don't worry about what anybody else is going to do. The best way to predict
the future is to invent it." - Alan Kay
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://tobias.rautenkranz.ch/pipermail/cl-smoke_tobias.rautenkranz.ch/attachments/20100216/3bd8dbc9/attachment-0002.html>


More information about the Cl-smoke mailing list