Jonathon McKitrick | 9 Jun 2006 22:01

Problem finding library paths on Intel Mac


Hi all,

I have CLSQL running fine on 2 Linux boxes, but I cannot get it to find the pq
library on my MacBook.

I added the snippet Edi suggested for adding the path after asdf loads clsql.
I've also tried pushing the path onto the clsql-sys special variable for
foreign library paths.  But this last approach only works when I do it after
the debugger breaks on not finding the library.

How can I fix this?

Jonathon McKitrick
--
My other computer is your Windows box.
Mark Meyer | 9 Jun 2006 22:59
Picon

Problems compiling 3.6.1

Hi,

I tried installing 3.6.1 on sbcl 0.9.13. My MySQL 5 build went to
/usr/local and the db-mysql/Makefile doesn't honor the lib path. After
fixing this and putting /usr/local/lib/mysql on the
*FOREIGN-LIBRARY-SEARCH-PATHS* I get the following error:

WARNING: Error opening shared object "clsql_mysql.so":
  clsql_mysql.so: cannot open shared object file: No such file or directory.

debugger invoked on a TYPE-ERROR in thread
#<THREAD "initial thread" {A6985B1}>:
  The value #P"/home/mark/.sbcl/site/clsql-3.6.1/db-mysql/clsql_mysql"
  is not of type
    (OR (VECTOR CHARACTER)
        (VECTOR NIL)
        BASE-STRING
        SB-IMPL::PATTERN
        (MEMBER :WILD :UNSPECIFIC NIL)).

The backtrace includes

0: (MAKE-PATHNAME)
1: (FIND-AND-LOAD-FOREIGN-LIBRARY
    #<unavailable argument>
    :MODULE
    "clsql-mysql"
    :SUPPORTING-LIBRARIES
    ("c")
    :ERRORP
(Continue reading)

GP lisper | 10 Jun 2006 06:43

Re: Problems compiling 3.6.1

On Fri, 9 Jun 2006 22:59:07 +0200,
<4meyer@...> wrote:
>
> I tried installing 3.6.1 on sbcl 0.9.13. My MySQL 5 build went to
> /usr/local and the db-mysql/Makefile doesn't honor the lib path. After
> fixing this and putting /usr/local/lib/mysql on the
> *FOREIGN-LIBRARY-SEARCH-PATHS* I get the following error:
>
> WARNING: Error opening shared object "clsql_mysql.so":
>   clsql_mysql.so: cannot open shared object file: No such file or directory.

I see that in cmucl for version 3.5.6.  The debugger offers an option
to continue, assuming that the problem will be resolved later.  After
choosing that and running my code, I don't have any problems, so I
assume that it is no more than a warning.

--

-- 
Reply-To email is ignored.
Fred the Lisper | 14 Jun 2006 16:33

Tips on getting CLSQL working with MySQL 5.0 Under Linux

I've been running into problems with getting CLSQL to work with MySQL 5.0 
under Linux -- AMD64, FC5. I also need to get it working on 32-bit Linux 
platforms as well.

I just got back from a conference, and can(will) supply more details. But I 
was thinking if others had problems in this regard and how you solved them.

I am looking to use CLSQL in a BIG way for an online application, so this 
becomes very critical for me.

Thanks for any tips you can fling my way!

--

-- 
--Fred the Lisper
Lou Vanek | 14 Jun 2006 19:15

Re: Tips on getting CLSQL working with MySQL 5.0 Under Linux

Fred the Lisper wrote:

> I've been running into problems with getting CLSQL to work with MySQL 5.0 
> under Linux -- AMD64, FC5. I also need to get it working on 32-bit Linux 
> platforms as well.
> 
> I just got back from a conference, and can(will) supply more details. But I 
> was thinking if others had problems in this regard and how you solved them.
> 
> I am looking to use CLSQL in a BIG way for an online application, so this 
> becomes very critical for me.
> 
> Thanks for any tips you can fling my way!

Hello Fred the Lisper,

I had problems, too.
I'm using a different platform (cygwin), but I fixed bugs that probably apply
to linux, as well. I posted the patched code at RubyForge but RubyForge
is refusing to serve the code at the moment. So, if you
are interested I can direct-mail it to you if you let me know where I
can mail it. (The code was also run on unixy Mac OSX, but not by me,
and never run against MySQL 5.0--just MySQL 4.1.)

BR

Lou Vanek
--
illegal immigrants=undocumented immigrants
bank robber=undocumented financial redistribution manager
(Continue reading)

Kevin Rosenberg | 14 Jun 2006 22:12
Favicon

Re: Tips on getting CLSQL working with MySQL 5.0 Under Linux

Fred the Lisper wrote:
> I've been running into problems with getting CLSQL to work with MySQL 5.0 
> under Linux -- AMD64, FC5. I also need to get it working on 32-bit Linux 
> platforms as well.

On debian 32-bit and 64-bit, I just type "apt-get install clsql-mysql"
which ensures all dependencies are loaded. I've never used Fedora.

Kevin
Andrew Gavin | 17 Jun 2006 03:42

join problem on postgres / acl configuration

I have spent about 24 hours banging my head against the wall with what appears to be about 2 related clsql bugs.   We are using clsql 3.6.1 on a linux 32 based ACL 8.0 and the postgres (version 8.x) socket library.  We have a mac version of the same ACL and the bugs are consistent between the two.

 

Basically the bugs all have to do with creating joins and immediate join slots.

 

We have a many to many table (with a little data of its own):

 

(def-view-class subscription ()

  ((id

    :reader id

    :initform (clsql:sequence-next 'subscription-id)

    :type integer

    ;; :db-kind :key

    :db-constraints (:not-null :unique)

    )

   (publication-id

    :initarg :publication-id

    :reader publication-id

    :type integer

    :db-kind :key

    :db-constraints :not-null

    )

   (sessionid

    :initarg :sessionid

    :reader sessionid

    :type integer

    :db-kind :key

    :db-constraints :not-null

    )

   (user-fid

    :initarg :user-fid

    :reader user-fid

    :type string

    :db-constraints :not-null

    )

   (publication

    :reader publication

    :db-kind :join

    :db-info (:join-class publication

                                      :home-key publication-id

                                      :foreign-key id

                                      :set nil

                                      :retrieval :immediate

                                      )

    )

   (session

    :reader session

    :db-kind :join

    :db-info (:join-class session

                                      :home-key sessionid

                                      :foreign-key id

                                      :set nil

                                      :retrieval :immediate

                                      )

    )

   )

  )

 

Which has 2 immediate join’s to the attached “publication” and “session” tables.  This itself works fine.  The problems all come when I try and create joins from those tables into this table with its immediate fields.

 

For example in the publications table:

 

   (subscriptions                ; improper join 6/13

    :reader subscriptions

    :db-kind :join

    :db-info (:join-class subscription

                                      :home-key id

                                      :foreign-key publication-id

                                      :set t

                                      )

    )

 

This should return a list of subscription objects matching the id binding.  However it does a select on the fields of publication, session, and subscription tables (fine) but with a loose where and no join:

 

;; 2006-06-13 19:48:07,,0 flektor-db1/flektor/flektor => SELECT subscription.user_fid,subscription.sessionid,subscription.publication_id,subscription.id,publication.maxsequencenumber,publication.cursequencenumber,publication.name,publication.id,session.cm_port,session.cm_address,session.user_id,session.id FROM subscription,session,publication WHERE ((subscription.publication_id = 5))

 

This is totally incorrect and pretty much a meaningless select (with the multiple tables and the single where constraint).  Correct versions could either use an explicit join or could bind the pairs of ids in the where (i.e. subscription.publication_id=publication.id and … etc.).

 

In addition if I use a target slot (say in publication again):

 

   (subscriber-fids

    :reader subscriber-fids

    :db-kind :join

    :db-info (:join-class subscription

                                      :home-key id

                                      :foreign-key publication-id

                                      :target-slot user-fid

                                      :set t

                                      )

    )

 

If I try this I get a mysterious “nil is not of expected type hash-table”

 

If I try a :set nil I get another bogus identical select to the first one (with all the fields and the loose join).

 

The closest I can get is:

 

   (subscribers

    :reader subscribers

    :db-kind :join

    :db-info (:join-class subscription            ; the list of (session subscription) pairs

                                      :home-key id

                                      :foreign-key publication-id

                                      :target-slot session

                                      :set t

                                      )

    )

 

Where I properly get a list of pairs of sessions and subscriptions.  And the query uses a inner join!

 

;; 2006-06-13 19:54:52,,0 flektor-db1/flektor/flektor => SELECT session.cm_port,session.cm_address,session.user_id,session.id FROM session INNER JOIN subscription ON session.id = subscription.sessionid WHERE (subscription.publication_id = 5)

 

But the fields of subscription are not fetched, so while it returns an object of this type, all/most of the slots are bogus (unbound for objects, stale #’s for numbers).

 

If I change the :set here to nil I get the bad unconstrained where which gives me a bunch of properly constructed subscriptions (as desired), but with the 3 tables and the single loose where there are many copies of the same object (depending on dataset).

 

I have tried digging through the code for a bit, nothing obvious.  Am I missing something?  Am I setting things up correctly?  It seems about the same as in the employee test.

 

Andy Gavin

Flektor, Inc.

 

 

_______________________________________________
CLSQL-Help mailing list
CLSQL-Help@...
http://lists.b9.com/mailman/listinfo/clsql-help
Pupeno | 21 Jun 2006 19:04
Favicon

(varchar n), n is ignored

I have a field defined this way:
(email    :accessor email    :type (varchar 320)  :initarg :email)
when I create the table from the view, it gets translated into "email
VARCHAR UNIQUE NOT NULL". Shouldn't it get translated into "email
VARCHAR(320) UNIQUE NOT NULL" ? Am I doing something wrong ?
My backend is PostgreSQL 8.1.
Thank you.
--

-- 
Pupeno <pupeno@...> http://pupeno.com
_______________________________________________
CLSQL-Help mailing list
CLSQL-Help@...
http://lists.b9.com/mailman/listinfo/clsql-help
Pupeno | 21 Jun 2006 21:41
Favicon

Re: (varchar n), n is ignored

If I instead specify (email :accessor email :type (clsql:varchar
320) :initarg :email) then it works. I am not sure why or how.

On Wed, 2006-06-21 at 19:04 +0200, Pupeno wrote:
> I have a field defined this way:
> (email    :accessor email    :type (varchar 320)  :initarg :email)
> when I create the table from the view, it gets translated into "email
> VARCHAR UNIQUE NOT NULL". Shouldn't it get translated into "email
> VARCHAR(320) UNIQUE NOT NULL" ? Am I doing something wrong ?
> My backend is PostgreSQL 8.1.
> Thank you.
> _______________________________________________
> CLSQL-Help mailing list
> CLSQL-Help@...
> http://lists.b9.com/mailman/listinfo/clsql-help
--

-- 
Pupeno <pupeno@...> http://pupeno.com
_______________________________________________
CLSQL-Help mailing list
CLSQL-Help@...
http://lists.b9.com/mailman/listinfo/clsql-help
Pupeno | 21 Jun 2006 22:23
Favicon

Re: (varchar n), n is ignored

On Wed, 2006-06-21 at 21:41 +0200, Pupeno wrote:
> If I instead specify (email :accessor email :type (clsql:varchar
> 320) :initarg :email) then it works. I am not sure why or how.
My mistake, I miss-understood how importing packages work; sorry.
--

-- 
Pupeno <pupeno@...> http://pupeno.com
_______________________________________________
CLSQL-Help mailing list
CLSQL-Help@...
http://lists.b9.com/mailman/listinfo/clsql-help

Gmane