Created
December 13, 2012 19:28
-
-
Save anonymous/4279042 to your computer and use it in GitHub Desktop.
A simple workaround for sbcl clsql-based cores deployment. Solving libraries paths problem by unloading/loading libraries.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(let ((library-list (cffi:list-foreign-libraries))) | |
(setf cffi:*foreign-library-directories* (list #p"lib/")) | |
(setf clsql-sys:*foreign-library-search-paths* (list #p"lib/")) | |
#+sbcl | |
(progn | |
(pushnew (alexandria:named-lambda load-libraries () | |
(mapcar #'(lambda (x) | |
(cffi:load-foreign-library x)) | |
(mapcar #'(lambda (x) | |
(pathname (file-namestring (slot-value x 'pathname)))) | |
library-list))) | |
sb-ext:*init-hooks*) | |
(mapcar #'cffi:close-foreign-library library-list)) | |
(save-lisp-and-die "image.core" :purify t :executable t)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment