CLSQL and MYSQL on OS X
Asked Answered
R

2

13

I'm working on OS X 10.6.4. I've been using clbuild to install supporting libraries for SBCL (including clsql), and I do all my work through Aquamacs. I installed MySQL using the excellent instructions over at Hive Logic. But when I call (require 'clsql) -- which seems to work fine -- and then try to execute (clsql:connect '(nil "lisp" "root" "") :database-type :mysql) to connect to my local running database, I get this error message:

erred while invoking #<COMPILE-OP (:VERBOSE NIL) {12096109}> on
#<CLSQL-MYSQL-SOURCE-FILE "clsql_mysql" {1208E071}>
   [Condition of type ASDF:OPERATION-ERROR]

From my research of this problem, I think it comes from me not having a compiled version of the libmysqlclient.dylib file, of which I have a copy in /usr/local/mysql/lib/, but I'm not clear on how to go about compiling it. This forum post seems to say that's exactly what I need to do, but there's no make file in that directory.

Rorrys answered 6/9, 2010 at 15:58 Comment(3)
Pray tell, how would sysadmins be able to help a programmer with setting up his compiler?Gait
I'm guessing you've never been a sysadmin, Frank.Drobman
@DanGrossman it belongs to ServerFault as it belongs to cooking. the author of the question tries to set up his development environment, not a server.Twinge
S
1

Nowadays, you should use homebrew for MySQL installation on Snow Leopard. Homebrew installs MySQL 5.5.10 which doesn't have the compiler problem that 5.5.8 had (AFAIK).

Selfpity answered 6/4, 2011 at 19:6 Comment(0)
B
0

I would guess you can download mysql-5.5.8-osx10.6-x86_64.dmg from http://dev.mysql.com/downloads/mysql/#downloads

I would expect that to include the precompiled client libs. I haven't tried it though.

If it really doesn't have the precompiled client libs, you'll probably need to download the MySQL source code from the same place (select "Source Code" from the "Select Platform" dropdown box) and compile it. Even though the description says "Generic Linux" I think mysql-5.5.8.tar.gz should work.

Having previously installed MySQL 5.0 on Leopard, I am sure it came with the client libs, but of course something could have changed. It just seems unlikely they would not provide them.

EDIT:

After installing the version for OS X 10.5, this is what I find in terms of client libs:

/usr/local/mysql-5.5.8-osx10.5-x86_64/lib/libmysqlclient.16.dylib
/usr/local/mysql-5.5.8-osx10.5-x86_64/lib/libmysqlclient.a
/usr/local/mysql-5.5.8-osx10.5-x86_64/lib/libmysqlclient.dylib
/usr/local/mysql-5.5.8-osx10.5-x86_64/lib/libmysqlclient_r.16.dylib
/usr/local/mysql-5.5.8-osx10.5-x86_64/lib/libmysqlclient_r.a
/usr/local/mysql-5.5.8-osx10.5-x86_64/lib/libmysqlclient_r.dylib

so they are indeed installed along with the server.

Bettiebettina answered 18/12, 2010 at 21:38 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.