Bug 104945 - cl-sql-3.2.1 does not install clsql_mysql.so
Bug#: 104945 Product:  Gentoo Linux Version: 2005.1 Platform: All
OS/Version: Linux Status: RESOLVED Severity: normal Priority: P2
Resolution: FIXED Assigned To: common-lisp@gentoo.org Reported By: i@digash.com
Component: Development
URL: 
Summary: cl-sql-3.2.1 does not install clsql_mysql.so
Keywords:  
Status Whiteboard: 
Opened: 2005-09-05 13:21 0000
Description:   Opened: 2005-09-05 13:21 0000
cl-sql has an old .so name need to change to clsql_mysql.so
also need to add to the LDPATH the directory where clsql_uffi.so and
clsql_mysql.so are located. sbcl cannot find them.

Reproducible: Always
Steps to Reproduce:
1.sbcl
2.(require 'clsql-mysql)
3.

Actual Results:  
Couldn't load foreign libraries "clsql_uffi64",
#P"/usr/share/common-lisp/source/clsql-uffi/uffi/clsql_uffi64", "clsql_uffi",
#P"/usr/share/common-lisp/source$
   [Condition of type SIMPLE-ERROR]

WARNING: Error opening shared object "clsql_uffi64.so":                        
                                                                               
  clsql_uffi64.so: cannot open shared object file: No such file or directory.  
                                                                               
WARNING: Error opening shared object "clsql_uffi.so":                          
                                                                               
  clsql_uffi.so: cannot open shared object file: No such file or directory.    
                                                                               
WARNING: Error opening shared object "clsql_uffi64.a":                         
                                                                               
  clsql_uffi64.a: cannot open shared object file: No such file or directory.   
                                                                               
WARNING: Error opening shared object "clsql_uffi.a":                           
                                                                               
  clsql_uffi.a: cannot open shared object file: No such file or directory.     
                                                                               
WARNING: Error opening shared object "clsql_uffi64.o":                         
                                                                               
  clsql_uffiWARNING: Error opening shared object "clsql_uffi64.so":            
                                                                               
           
  clsql_uffi64.so: cannot open shared object file: No such file or directory.  
                                                                               
WARNING: Error opening shared object "clsql_uffi.so":                          
                                                                               
  clsql_uffi.so: cannot open shared object file: No such file or directory.    
                                                                               
WARNING: Error opening shared object "clsql_uffi64.a":                         
                                                                               
  clsql_uffi64.a: cannot open shared object file: No such file or directory.   
                                                                               
WARNING: Error opening shared object "clsql_uffi.a":                           
                                                                               
  clsql_uffi.a: cannot open shared object file: No such file or directory.     
                                                                               
WARNING: Error opening shared object "clsql_uffi64.o":                         
                                                                               
  clsql_uffi64.o: cannot open shared object file: No such file or directory.   
                                                                               
WARNING: Error opening shared object "clsql_uffi.o":                           
                                                                               
  clsql_uffi.o: cannot open shared object file: No such file or directory.     
                                                                              
64.o: cannot open shared object file: No such file or directory.               
                                                                   
WARNING: Error opening shared object "clsql_uffi.o":                           
                                                                               
  clsql_uffi.o: cannot open shared object file: No such file or directory.

------- Comment #1 From DiG 2005-09-05 13:59:37 0000 -------
Created an attachment (id=67698) [details]
new working ebuild

Just fixed my own bug.

------- Comment #2 From DiG 2005-09-05 14:04:18 0000 -------
Change hardware to all. Because this problem exists on x86 too. Could somebody
check in my fixed ebuild. Thanks.

------- Comment #3 From Matthew Kennedy (RETIRED) 2005-12-29 15:31:53 0000 -------
I committed a new ebuild for dev-lisp/cl-sql-3.5.2 which should fix any
multilib issues.  It goes about locating the shared libraries a little
differently
to how you have done it.  Please test.  If it works, I'll request arch testers
to
make it the new stable for x86.

------- Comment #4 From DiG 2005-12-30 17:27:24 0000 -------
(In reply to comment #3)
> I committed a new ebuild for dev-lisp/cl-sql-3.5.2 which should fix any
> multilib issues.  It goes about locating the shared libraries a little
> differently
> to how you have done it.  Please test.  If it works, I'll request arch testers
> to
> make it the new stable for x86.
> 

I tried it and it does not work on x86 or x86_64. I get this:
STYLE-WARNING: Undefined alien: "clsql_mysql_num_rows"
STYLE-WARNING: Undefined alien: "clsql_mysql_affected_rows"
STYLE-WARNING: Undefined alien: "clsql_mysql_insert_id"
STYLE-WARNING: Undefined alien: "clsql_mysql_data_seek"
Error Attempt to call an undefined alien function.

When I try to connect execute some SQL. The (connect ...) is succeeding.
Need to dig deeper.

------- Comment #5 From Matthew Kennedy (RETIRED) 2005-12-31 11:21:00 0000 -------
Here is the output of my test in SBCL for dev-lisp/cl-sql-3.5.2:

CL-USER> (asdf:oos 'asdf:load-op :clsql-mysql)
...
CL-USER> (defpackage #:test (:use #:common-lisp))
#<PACKAGE "TEST">
CL-USER> 
TEST> (clsql:connect '(nil "database01" "root" "..."))
#<CLSQL-MYSQL:MYSQL-DATABASE localhost/database01/root OPEN {A7DBD71}>
TEST> (clsql:query "select * from table01")
((1 "first"))
("field01" "field02")
TEST> 

Are you using the latest cl-sql ebuild? ie. 3.5.2?

It looks like the clsql_mysql.so is not being loaded. I'll check that out.

------- Comment #6 From Matthew Kennedy (RETIRED) 2005-12-31 11:49:48 0000 -------
I found a typo in the path to clsql_mysql.so which would prevent it from being
loaded.  I committed the fix to portage.  It should be available via rsync in
and hour or so (same ebuild version - 3.5.2)

------- Comment #7 From DiG 2006-01-01 15:06:56 0000 -------
(In reply to comment #6)

That did it. It works on the x86 and x86_64.

Happy New Year!

------- Comment #8 From Matthew Kennedy (RETIRED) 2006-01-01 17:19:31 0000 -------
Thanks. You too.