Lisp HUG Maillist Archive

MySQL database using LWM 5.0 Academic

Hello all,

I'm wondering if anyone has connected using MySQL on
LWM 5.0 Academic.

I've followed the instructions in 18.2.8.4 in the LW User guide
("Special Instructions on MySQL on Mac OS X") and I've
generated the libmysql_r.dylib.

Here's what I'm trying to do:

(require "mysql")
(setf sql:*default-database-type* :mysql)
(sql:initialize-database-type)
(sql:connect "barbara.cs.rpi.edu:9000")

but on the last line, I get

CL-USER 4 > (sql:connect "barbara.cs.rpi.edu:9000")

Error: Foreign function Sql::Mysql-Get-Client-Info trying to call to
unresolved external function "_mysql_get_client_info".
  1 (abort) Return to level 0.
  2 Return to top loop level 0.

Looking at the dylib using nm I don't see such a function, though nm does reveal
it in the static (.a) library. That's about as much as I know how to
do with libraries
though.

Any thoughts?

Here's a transcript:

CL-USER 1 > (require "mysql")
; Loading /Applications/LispWorks5.0Academic/Library/lib/5-0-0-0/load-on-demand/sql/mysql/defsys.lisp
on demand...
;; Creating system Mysql

; Loading fasl file
/Applications/LispWorks5.0Academic/Library/lib/5-0-0-0/load-on-demand/sql/mysql/mysql-c-types.nfasl
; Loading /Applications/LispWorks5.0Academic/Library/lib/5-0-0-0/load-on-demand/sql/sql-defsys.lisp
on demand...
;; Loading from
#P"/Applications/LispWorks5.0Academic/Library/lib/5-0-0-0/load-on-demand/sql/sql-defsys.lisp"
;; Creating system New-Sql
;; Creating system Clos-Sql

;  Loading text file
/Applications/LispWorks5.0Academic/Library/lib/5-0-0-0/load-on-demand/sql/requires.lisp
; Loading /Applications/LispWorks5.0Academic/Library/lib/5-0-0-0/load-on-demand/sql/sql-common-defsys.lisp
on demand...
;; Creating system Sql-Common

;   Loading text file
/Applications/LispWorks5.0Academic/Library/lib/5-0-0-0/load-on-demand/sql/sql-common-pkg.lisp
;   Loading fasl file
/Applications/LispWorks5.0Academic/Library/lib/5-0-0-0/load-on-demand/sql/sql-common.nfasl
;   Loading fasl file
/Applications/LispWorks5.0Academic/Library/lib/5-0-0-0/load-on-demand/sql/common-class.nfasl
;  Loading text file
/Applications/LispWorks5.0Academic/Library/lib/5-0-0-0/load-on-demand/sql/new-sql-pkg.lisp
;  Loading fasl file
/Applications/LispWorks5.0Academic/Library/lib/5-0-0-0/load-on-demand/utilities/match.nfasl
;  Loading fasl file
/Applications/LispWorks5.0Academic/Library/lib/5-0-0-0/load-on-demand/sql/init.nfasl
;  Loading fasl file
/Applications/LispWorks5.0Academic/Library/lib/5-0-0-0/load-on-demand/sql/utils.nfasl
;  Loading fasl file
/Applications/LispWorks5.0Academic/Library/lib/5-0-0-0/load-on-demand/sql/sql-generic.nfasl
;  Loading fasl file
/Applications/LispWorks5.0Academic/Library/lib/5-0-0-0/load-on-demand/sql/loop.nfasl
;  Loading fasl file
/Applications/LispWorks5.0Academic/Library/lib/5-0-0-0/load-on-demand/sql/gen-init.nfasl
;  Loading fasl file
/Applications/LispWorks5.0Academic/Library/lib/5-0-0-0/load-on-demand/sql/gen-class.nfasl
;  Loading fasl file
/Applications/LispWorks5.0Academic/Library/lib/5-0-0-0/load-on-demand/sql/exec-sql.nfasl
;  Loading fasl file
/Applications/LispWorks5.0Academic/Library/lib/5-0-0-0/load-on-demand/sql/db-connect.nfasl
;  Loading fasl file
/Applications/LispWorks5.0Academic/Library/lib/5-0-0-0/load-on-demand/sql/schema.nfasl
;  Loading fasl file
/Applications/LispWorks5.0Academic/Library/lib/5-0-0-0/load-on-demand/sql/gen-stuff.nfasl
;  Loading fasl file
/Applications/LispWorks5.0Academic/Library/lib/5-0-0-0/load-on-demand/sql/select.nfasl
;  Loading fasl file
/Applications/LispWorks5.0Academic/Library/lib/5-0-0-0/load-on-demand/sql/drop.nfasl
;  Loading fasl file
/Applications/LispWorks5.0Academic/Library/lib/5-0-0-0/load-on-demand/sql/create.nfasl
;  Loading fasl file
/Applications/LispWorks5.0Academic/Library/lib/5-0-0-0/load-on-demand/sql/insert.nfasl
;  Loading fasl file
/Applications/LispWorks5.0Academic/Library/lib/5-0-0-0/load-on-demand/sql/update.nfasl
;  Loading fasl file
/Applications/LispWorks5.0Academic/Library/lib/5-0-0-0/load-on-demand/sql/delete.nfasl
;  Loading fasl file
/Applications/LispWorks5.0Academic/Library/lib/5-0-0-0/load-on-demand/sql/rename.nfasl
;  Loading fasl file
/Applications/LispWorks5.0Academic/Library/lib/5-0-0-0/load-on-demand/sql/saving.nfasl
;  Loading fasl file
/Applications/LispWorks5.0Academic/Library/lib/5-0-0-0/load-on-demand/sql/explain-plan.nfasl
;  Loading fasl file
/Applications/LispWorks5.0Academic/Library/lib/5-0-0-0/load-on-demand/sql/clos/class-function.nfasl
;  Loading fasl file
/Applications/LispWorks5.0Academic/Library/lib/5-0-0-0/load-on-demand/sql/clos/macros.nfasl
;  Loading fasl file
/Applications/LispWorks5.0Academic/Library/lib/5-0-0-0/load-on-demand/sql/clos/canon-db.nfasl
;  Loading fasl file
/Applications/LispWorks5.0Academic/Library/lib/5-0-0-0/load-on-demand/sql/clos/meta-db.nfasl
;  Loading fasl file
/Applications/LispWorks5.0Academic/Library/lib/5-0-0-0/load-on-demand/sql/clos/create-view.nfasl
;  Loading fasl file
/Applications/LispWorks5.0Academic/Library/lib/5-0-0-0/load-on-demand/sql/clos/drop-view.nfasl
;  Loading fasl file
/Applications/LispWorks5.0Academic/Library/lib/5-0-0-0/load-on-demand/sql/clos/new-utils.nfasl
;  Loading fasl file
/Applications/LispWorks5.0Academic/Library/lib/5-0-0-0/load-on-demand/sql/clos/utilities.nfasl
; Loading /Applications/LispWorks5.0Academic/Library/lib/5-0-0-0/load-on-demand/ccl/inspector-values.nfasl
on demand...
; Loading /Applications/LispWorks5.0Academic/Library/lib/5-0-0-0/load-on-demand/ffi/types/inspector.nfasl
on demand...
;  Loading fasl file
/Applications/LispWorks5.0Academic/Library/lib/5-0-0-0/load-on-demand/sql/clos/structs.nfasl
;  Loading fasl file
/Applications/LispWorks5.0Academic/Library/lib/5-0-0-0/load-on-demand/sql/clos/remote-joins.nfasl
;  Loading fasl file
/Applications/LispWorks5.0Academic/Library/lib/5-0-0-0/load-on-demand/sql/clos/make-objects.nfasl
;  Loading fasl file
/Applications/LispWorks5.0Academic/Library/lib/5-0-0-0/load-on-demand/sql/clos/generate-sql.nfasl
;  Loading fasl file
/Applications/LispWorks5.0Academic/Library/lib/5-0-0-0/load-on-demand/sql/clos/template.nfasl
;  Loading fasl file
/Applications/LispWorks5.0Academic/Library/lib/5-0-0-0/load-on-demand/sql/clos/update.nfasl
;  Loading fasl file
/Applications/LispWorks5.0Academic/Library/lib/5-0-0-0/load-on-demand/sql/clos/types.nfasl
;  Loading fasl file
/Applications/LispWorks5.0Academic/Library/lib/5-0-0-0/load-on-demand/sql/clos/delete.nfasl
;  Loading fasl file
/Applications/LispWorks5.0Academic/Library/lib/5-0-0-0/patches/sql/0001/0001.nfasl
; Loaded public patch Sql 1.1

;  Loading fasl file
/Applications/LispWorks5.0Academic/Library/lib/5-0-0-0/patches/sql/0001/0002.nfasl
; Loaded public patch Sql 1.2

;  Loading fasl file
/Applications/LispWorks5.0Academic/Library/lib/5-0-0-0/patches/sql/0001/0003.nfasl
; Loaded public patch Sql 1.3

; Loading fasl file
/Applications/LispWorks5.0Academic/Library/lib/5-0-0-0/load-on-demand/sql/mysql/macros-and-utils.nfasl
; Loading fasl file
/Applications/LispWorks5.0Academic/Library/lib/5-0-0-0/load-on-demand/sql/mysql/mysql-c-funcs.nfasl
; Loading fasl file
/Applications/LispWorks5.0Academic/Library/lib/5-0-0-0/load-on-demand/sql/mysql/top.nfasl
; Loading fasl file
/Applications/LispWorks5.0Academic/Library/lib/5-0-0-0/load-on-demand/sql/mysql/cursor.nfasl
; Loading fasl file
/Applications/LispWorks5.0Academic/Library/lib/5-0-0-0/patches/mysql/0001/0001.nfasl
; Loaded public patch Mysql 1.1

; Loading fasl file
/Applications/LispWorks5.0Academic/Library/lib/5-0-0-0/patches/mysql/0001/0002.nfasl
; Loaded public patch Mysql 1.2

; Loading fasl file
/Applications/LispWorks5.0Academic/Library/lib/5-0-0-0/patches/mysql/0001/0003.nfasl
; Loaded public patch Mysql 1.3

T

CL-USER 2 > (setf sql:*default-database-type* :mysql)
:Mysql

CL-USER 3 > (sql:initialize-database-type)
(:Mysql)

CL-USER 4 > (sql:connect "barbara.cs.rpi.edu:9000")

Error: Foreign function Sql::Mysql-Get-Client-Info trying to call to
unresolved external function "_mysql_get_client_info".
  1 (abort) Return to level 0.
  2 Return to top loop level 0.

Type :b for backtrace, :c <option number> to proceed,  or :? for other options

CL-USER 5 : 1 > :b
Call to Error
Call to Sql::Mysql-Get-Client-Info
Call to (Method Sql::Open-Database-Type ((Eql :Mysql) T T))
Call to Sql:Force-Connect
Call to Sql::In-Connect
Call to Sql:Connect
Call to Eval
Call to Capi::Capi-Top-Level-Function
Call to Capi::Interactive-Pane-Top-Loop
Call to (Subfunction Mp::Process-Sg-Function Mp::Initialize-Process-Stack)

CL-USER 6 : 1 > :bb
#<The COMMON-LISP-USER package, 25/32 internal, 0/4 external>
#<Mp:Process Name "CAPI Execution Listener 1" Priority 0 State "Running">

Condition: Foreign function Sql::Mysql-Get-Client-Info trying to call
to unresolved external function "_mysql_get_client_info".
Call to ERROR (offset 104)
  SYSTEM::ESTRING : "Foreign function ~S trying to call to unresolved
external function ~S."
  SYSTEM::EARGS   : (SQL::MYSQL-GET-CLIENT-INFO "_mysql_get_client_info")

Call to SQL::MYSQL-GET-CLIENT-INFO (offset 204)

Call to (METHOD SQL::OPEN-DATABASE-TYPE ((EQL :MYSQL) T T)) (offset 1656)
  SQL::DATABASE-TYPE   : :DONT-KNOW
  SQL::CONNECTION-SPEC : "barbara.cs.rpi.edu:9000"
  SQL::PROPERTIES      : NIL

Call to SQL:FORCE-CONNECT (offset 252)
  SQL::DATABASE-TYPE   : :MYSQL
  SQL::CONNECTION-SPEC : "barbara.cs.rpi.edu:9000"
  SQL::PROPS           : NIL
  DBG::|rest-|         : (:DATABASE-TYPE :MYSQL)

Binding frame:
  SQL::*DIALOG-INTERFACE* : NIL

Call to SQL::IN-CONNECT (offset 1672)
  SQL::IF-EXISTS                   : :ERROR
  SQL::DATABASE-TYPE               : :MYSQL
  SQL::ALLOW-MULTIPLE              : T
  SQL::NAME                        : "barbara.cs.rpi.edu:9000"
  SQL::INTERFACE                   : NIL
  SQL::DEFAULT-TABLE-TYPE          : NIL
  SQL::DEFAULT-TABLE-EXTRA-OPTIONS : NIL
  SQL::CONNECTION-SPEC             : "barbara.cs.rpi.edu:9000"
  SQL::PROPS                       : NIL

Call to SQL:CONNECT (offset 264)
  SQL::CONNECTION-SPEC : "barbara.cs.rpi.edu:9000"
  SQL::PROPS           : NIL

Call to SYSTEM::%EVAL (offset 372)
  EXP : (SQL:CONNECT "barbara.cs.rpi.edu:9000")


SYSTEM::%EVAL <- EVAL <- SYSTEM::DO-EVALUATION <-
SYSTEM::%TOP-LEVEL-INTERNAL <- SYSTEM::%TOP-LEVEL
<- SYSTEM::LISTENER-TOP-LEVEL <- CAPI::CAPI-TOP-LEVEL-FUNCTION <-
CAPI::INTERACTIVE-PANE-TOP-LOOP
<- (SUBFUNCTION MP::PROCESS-SG-FUNCTION MP::INITIALIZE-PROCESS-STACK)
<- SYSTEM::%%FIRST-CALL-TO-STACK
T

-- 
=====================
Joshua Taylor
tayloj@rpi.edu

"A lot of good things went down one time,
     back in the goodle days."
               John Hartford


Re: MySQL database using LWM 5.0 Academic

Unable to parse email body. Email id is 6464

Re: MySQL database using LWM 5.0 Academic

On 3/8/07, Martin Simmons <martin@lispworks.com> wrote:
> >>>>> On Wed, 7 Mar 2007 19:50:23 -0500, Taylor, Joshua said:
> >
> > Hello all,
> >
> > I'm wondering if anyone has connected using MySQL on
> > LWM 5.0 Academic.
> >
> > I've followed the instructions in 18.2.8.4 in the LW User guide
> > ("Special Instructions on MySQL on Mac OS X") and I've
> > generated the libmysql_r.dylib.
>
> Just to be sure, that is libmysqlclient_r.dylib, right?

Ah yes, just a typo in the email. (Though I did have my share of typos
in getting the file built. gcc mixes hyphens and underscores, e.g.,
-fno-HYPEN-common and -all_UNDERSCORE_load which are easy
to miss.) But yes, the dylib has the name libmysqlclient_r.dylib

> > Here's what I'm trying to do:
> >
> > (require "mysql")
> > (setf sql:*default-database-type* :mysql)
> > (sql:initialize-database-type)
> > (sql:connect "barbara.cs.rpi.edu:9000")
> >
> > but on the last line, I get
> >
> > CL-USER 4 > (sql:connect "barbara.cs.rpi.edu:9000")
> >
> > Error: Foreign function Sql::Mysql-Get-Client-Info trying to call to
> > unresolved external function "_mysql_get_client_info".
> >   1 (abort) Return to level 0.
> >   2 Return to top loop level 0.
> >
> > Looking at the dylib using nm I don't see such a function, though nm does reveal
> > it in the static (.a) library. That's about as much as I know how to
> > do with libraries
> > though.
> >
> > Any thoughts?
>
> Does nm show any symbols beginning with _mysql in the dylib?

None. I.e.,

nm libmysqlclient_r.dylib  | grep _mysql

produces no output.

> What does nm show in the static library for _mysql_get_client_info?

nm libmysqlclient_r.a  | grep get_client_info
0000000000001934 T _mysql_get_client_info

> Which version of MySQL and obtained from where?

:/usr/local/mysql$ ./bin/mysql --version
../bin/mysql  Ver 14.12 Distrib 5.0.27, for apple-darwin8.6.0 (powerpc)
using readline 5.0

and I downloaded the Mac OS X 10.4, (PowerPC, 64-bit)  Standard
(Standard is one of the
three available, viz. Standard, Max, Debug) from:

http://dev.mysql.com/downloads/mysql/5.0.html#downloads

> --
> Martin Simmons
> LispWorks Ltd
> http://www.lispworks.com/
>


-- 
=====================
Joshua Taylor
tayloj@rpi.edu

"A lot of good things went down one time,
     back in the goodle days."
               John Hartford


Re: MySQL database using LWM 5.0 Academic

Unable to parse email body. Email id is 6469

Re: MySQL database using LWM 5.0 Academic

Ah, great; the 32-bit version does the trick! Thanks!

On 3/8/07, Martin Simmons <martin@lispworks.com> wrote:
> >>>>> On Thu, 8 Mar 2007 08:30:43 -0500, Taylor, Joshua said:
> > DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed;
> >
> > On 3/8/07, Martin Simmons <martin@lispworks.com> wrote:
> > > >>>>> On Wed, 7 Mar 2007 19:50:23 -0500, Taylor, Joshua said:
> > > >
> > > > Hello all,
> > > >
> > > > I'm wondering if anyone has connected using MySQL on
> > > > LWM 5.0 Academic.
> > > >
> > > > I've followed the instructions in 18.2.8.4 in the LW User guide
> > > > ("Special Instructions on MySQL on Mac OS X") and I've
> > > > generated the libmysql_r.dylib.
> > >
> > > Just to be sure, that is libmysqlclient_r.dylib, right?
> >
> > Ah yes, just a typo in the email. (Though I did have my share of typos
> > in getting the file built. gcc mixes hyphens and underscores, e.g.,
> > -fno-HYPEN-common and -all_UNDERSCORE_load which are easy
> > to miss.) But yes, the dylib has the name libmysqlclient_r.dylib
>
> Right, it is rather confusing.  I think the all_load option is passed straight
> through to ld, which consistenty uses underscores.  Cut-and-paste is the best
> way :-)
>
>
> > > > Here's what I'm trying to do:
> > > >
> > > > (require "mysql")
> > > > (setf sql:*default-database-type* :mysql)
> > > > (sql:initialize-database-type)
> > > > (sql:connect "barbara.cs.rpi.edu:9000")
> > > >
> > > > but on the last line, I get
> > > >
> > > > CL-USER 4 > (sql:connect "barbara.cs.rpi.edu:9000")
> > > >
> > > > Error: Foreign function Sql::Mysql-Get-Client-Info trying to call to
> > > > unresolved external function "_mysql_get_client_info".
> > > >   1 (abort) Return to level 0.
> > > >   2 Return to top loop level 0.
> > > >
> > > > Looking at the dylib using nm I don't see such a function, though nm does reveal
> > > > it in the static (.a) library. That's about as much as I know how to
> > > > do with libraries
> > > > though.
> > > >
> > > > Any thoughts?
> > >
> > > Does nm show any symbols beginning with _mysql in the dylib?
> >
> > None. I.e.,
> >
> > nm libmysqlclient_r.dylib  | grep _mysql
> >
> > produces no output.
> >
> > > What does nm show in the static library for _mysql_get_client_info?
> >
> > nm libmysqlclient_r.a  | grep get_client_info
> > 0000000000001934 T _mysql_get_client_info
> >
> > > Which version of MySQL and obtained from where?
> >
> > :/usr/local/mysql$ ./bin/mysql --version
> > ./bin/mysql  Ver 14.12 Distrib 5.0.27, for apple-darwin8.6.0 (powerpc)
> > using readline 5.0
> >
> > and I downloaded the Mac OS X 10.4, (PowerPC, 64-bit)  Standard
> > (Standard is one of the
> > three available, viz. Standard, Max, Debug) from:
> >
> > http://dev.mysql.com/downloads/mysql/5.0.html#downloads
>
> Ah, looks like the problem.  You need the 32-bit one to match the LispWorks
> you are running.  We will add this to the manual.
>
> --
> Martin Simmons
> LispWorks Ltd
> http://www.lispworks.com/
>


-- 
=====================
Joshua Taylor
tayloj@rpi.edu

"A lot of good things went down one time,
     back in the goodle days."
               John Hartford


Updated at: 2020-12-10 08:46 UTC