find-and-load-foreign-library and Oracle

"Ricardo Boccato Alves" <[email protected]> Mon, 16 Jul 2007 23:20:28 -0300
Newsgroups gmane.lisp.clsql.devel
Message-ID <[email protected]>
--===============1913167479==
Content-Type: multipart/alternative; 
	boundary="----=_Part_60479_2693934.1184638828704"

------=_Part_60479_2693934.1184638828704
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

Hi,

I am using Oracle on Linux and it gives a type error (on SBCL, CMUCL and
CLISP) if I try:

(asdf:oos 'asdf:load-op :clsql-oracle)

It happens during the loading of oracle's library and I believe the problem
is that the paths are expected to be strings (and some are pathnames).

I did a naive change in the function find-and-load-foreign-library and it
now works fine.

If it is of any help, the change I did follows.

--- old-clsql/uffi/clsql-uffi-loader.lisp       2007-07-16 23:15:
04.000000000 -0300
+++ new-clsql/uffi/clsql-uffi-loader.lisp       2007-07-16 23:15:
04.000000000 -0300
@@ -33,7 +33,13 @@
      (loop for type in (uffi:foreign-library-types)
           thereis
           (loop for name in filenames
-                for pn = (make-pathname :name name :type type)
+                for pn = (if (pathnamep name)
+                             (make-pathname :host (pathname-host name)
+                                            :device (pathname-device name)
+                                            :directory (pathname-directory
name)
+                                            :name (pathname-name name)
+                                            :type type)
+                             (make-pathname :name name :type type))
                 thereis (or
                           (try-load pn)
                          (loop for search-path in
clsql:*foreign-library-search-paths*

Obs.: It works fine with SBCL on Windows.

[]s,
Ricardo Boccato Alves.

------=_Part_60479_2693934.1184638828704
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

Hi,<br><br>I am using Oracle on Linux and it gives a type error (on SBCL, CMUCL and CLISP) if I try:<br><br>(asdf:oos &#39;asdf:load-op :clsql-oracle)<br><br>It happens during the loading of oracle&#39;s library and I believe the problem is that the paths are expected to be strings (and some are pathnames).
<br><br>I did a naive change in the function find-and-load-foreign-library and it now works fine.<br><br>If it is of any help, the change I did follows.<br><br>--- old-clsql/uffi/clsql-uffi-loader.lisp&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 2007-07-16 23:15:
04.000000000 -0300<br>+++ new-clsql/uffi/clsql-uffi-loader.lisp&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 2007-07-16 23:15:04.000000000 -0300<br>@@ -33,7 +33,13 @@<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(loop for type in (uffi:foreign-library-types)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; thereis<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (loop for name in filenames
<br>-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;for pn = (make-pathname :name name :type type)<br>+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;for pn = (if (pathnamep name)<br>+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (make-pathname :host (pathname-host name)<br>+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n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&nbsp;&nbsp;&nbsp;&nbsp; (make-pathname :name name :type type))<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; thereis (or<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (try-load pn)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(loop for search-path in clsql:*foreign-library-search-paths*
<br><br>Obs.: It works fine with SBCL on Windows.<br><br>[]s,<br>Ricardo Boccato Alves.<br>

------=_Part_60479_2693934.1184638828704--

--===============1913167479==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
CLSQL-Devel mailing list
[email protected]
http://lists.b9.com/mailman/listinfo/clsql-devel

--===============1913167479==--