Bug List: (This bug is not in your last search results)   Show last search results      Search page      Enter new bug
Bug#: 139208
Alias:
Product:
Component:
Status: RESOLVED
Resolution: TEST-REQUEST
Assigned To: Common Lisp Bugs <common-lisp@gentoo.org>
Hardware:
OS:
Version:
Priority:
Severity:
Reporter: David Andrews <dba@redbug.org>
Add CC:
CC:
URL:
Summary:
Status Whiteboard:
Keywords:

Filename Description Type Creator Created Size Actions
Create a New Attachment (proposed patch, testcase, etc.) View All

Bug 139208 depends on: Show dependency tree
Bug 139208 blocks:
Votes: 0    Show votes for this bug    Vote for this bug

Additional Comments: (this is where you put emerge --info)


Not eligible to see or edit group visibility for this bug.






View Bug Activity   |   Format For Printing   |   XML   |   Clone This Bug


Description:   Opened: 2006-07-04 10:01 0000
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

------- Comment #1 From Matthew Kennedy (RETIRED) 2006-07-09 09:07:07 0000 -------
Thanks for the note.  I tend to screw this up everytime.  I should get
to this before the weekend end.

------- Comment #2 From Matthew Kennedy (RETIRED) 2006-07-09 23:40:29 0000 -------
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

------- Comment #3 From David Andrews 2006-07-14 12:24:23 0000 -------
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.)

Bug List: (This bug is not in your last search results)   Show last search results      Search page      Enter new bug