Skip to content

Instantly share code, notes, and snippets.

Created December 13, 2012 19:28
What would you like to do?
A simple workaround for sbcl clsql-based cores deployment. Solving libraries paths problem by unloading/loading libraries.
(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/"))
(pushnew (alexandria:named-lambda load-libraries ()
(mapcar #'(lambda (x)
(cffi:load-foreign-library x))
(mapcar #'(lambda (x)
(pathname (file-namestring (slot-value x 'pathname))))
(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