Execution of (asdf:oos `asdf:load-op :clsql-postgresql) results in: The function CLSQL-UFFI:FIND-AND-LOAD-FOREIGN-LIBRARY is undefined. [Condition of type UNDEFINED-FUNCTION] Apparently recent gentoo patches replace calls to clsql-uffi:find-and-load-foreign-library with calls to uffi:load-foreign-library. See /usr/portage/dev-lisp/cl-sql/files/3.5.6-gentoo.patch where the defun for clsql-uffi:find-and-load-foreign-library is indeed removed from uffi/clsql-uffi-loader.lisp along with references to it in db-mysql/mysql-loader.lisp. But another reference to clsql-uffi:find-and-load-foreign-library exists in db-postgresql/postgresql-loader.lisp that isn't addressed by the patch. This results in the error message reported above at execution time. Environment here is: cl-sql: 3.5.6 sbcl: 0.9.13 cl-uffi: 1.5.11
Thanks for the note. I tend to screw this up everytime. I should get to this before the weekend end.
Updated the portage versions to: cl-sql-3.6.3 sbcl-0.9.14 cl-uffi-1.5.14 Adjusted the patch to include the LIBDIR adjustment for PostgreSQL: diff -ur clsql-3.6.3.orig/db-postgresql/postgresql-loader.lisp clsql-3.6.3/db-postgresql/postgresql-loader.lisp --- clsql-3.6.3.orig/db-postgresql/postgresql-loader.lisp 2005-06-08 14:25:33.000000000 -0500 +++ clsql-3.6.3/db-postgresql/postgresql-loader.lisp 2006-07-10 00:47:40.000000000 -0500 @@ -33,9 +33,11 @@ (defmethod clsql-sys:database-type-load-foreign ((database-type (eql :postgresql))) - (clsql-uffi:find-and-load-foreign-library "libpq" - :module "postgresql" - :supporting-libraries *postgresql-supporting-libraries*) + (uffi:load-foreign-library (make-pathname :directory '(:absolute "usr" "@LIBDIR@") + :name "libpq" + :type "so") + :module "postgresql" + :supporting-libraries *postgresql-supporting-libraries*) (setq *postgresql-library-loaded* t)) (clsql-sys:database-type-load-foreign :postgresql) diff -ur clsql-3.6.3.orig/uffi/clsql-uffi-loader.lisp clsql-3.6.3/uffi/clsql-uffi-loader.lisp
What is RESOLVED TEST-REQUEST? The help text doesn't say. I've verified that your patch works for me, both with my original software set: cl-sql: (upgraded to 3.6.3) sbcl: 0.9.13 cl-uffi: 1.5.11 and with yours: cl-sql-3.6.3 sbcl-0.9.14 cl-uffi-1.5.14 (Sorry I took some time reporting back; I had some "stale fasls" which were giving me a headache.)