Author Topic: Pysqlite Ipk?  (Read 5463 times)

wheaties.box

  • Newbie
  • *
  • Posts: 4
    • View Profile
Pysqlite Ipk?
« on: November 04, 2007, 11:36:12 pm »
Hi!  I'm new to this site (obviously).  I've recently installed python on my sl-5500 and I'm looking to develop some programs using sqlite.  I've also installed the sqlite3_8.0.6.ipk (or something along those lines).  Each time I try to do anything with sqlite, I'm told that I don't have pysqlite2.  I know this is required, but I can't seem to find any ipk's for it anymore.

Does anyone have access to one or can you tell me where/how to get/build one?

Thanks!

freizugheit

  • Sr. Member
  • ****
  • Posts: 409
    • View Profile
    • http://
Pysqlite Ipk?
« Reply #1 on: November 05, 2007, 01:54:34 am »
Try downloading sqlite-3.2.2 from http://www.killefiz.de/zaurus/showdetail.php?app=3874.

If it does not work, sqlite-3.0.8 from http://pyqplayer.sourceforge.net/cgi-bin/b...qPlayerDownload should work with Sharp ROM.

wheaties.box

  • Newbie
  • *
  • Posts: 4
    • View Profile
Pysqlite Ipk?
« Reply #2 on: November 05, 2007, 09:06:49 am »
Thanks!  I'll have to try that first link when I get home from work.  The one I installed was from the second link.  I hope it works!  Even though I've had my Z since the day they were released, I'm still amazed at what it can do (and so are my friends  )

Thanks again

wheaties.box

  • Newbie
  • *
  • Posts: 4
    • View Profile
Pysqlite Ipk?
« Reply #3 on: November 05, 2007, 08:47:46 pm »
Quote from: freizugheit
Try downloading sqlite-3.2.2 from http://www.killefiz.de/zaurus/showdetail.php?app=3874.

If it does not work, sqlite-3.0.8 from http://pyqplayer.sourceforge.net/cgi-bin/b...qPlayerDownload should work with Sharp ROM.
Dang it!!! The first link has a dead link to the ipk, and the second one doesn't seem to allow my python to use sqlite.  Any ideas?

freizugheit

  • Sr. Member
  • ****
  • Posts: 409
    • View Profile
    • http://
Pysqlite Ipk?
« Reply #4 on: November 05, 2007, 09:14:48 pm »
Sqlite-3.2.2. is attached.

wheaties.box

  • Newbie
  • *
  • Posts: 4
    • View Profile
Pysqlite Ipk?
« Reply #5 on: November 05, 2007, 09:41:58 pm »
Quote from: freizugheit
Sqlite-3.2.2. is attached.
thanks!  I'm still having issues getting it all to work, but my wife won't let me play with it any more tonight...  maybe I'll be able to post more details tomorrow.

misha

  • Newbie
  • *
  • Posts: 7
    • View Profile
Pysqlite Ipk?
« Reply #6 on: February 10, 2008, 02:31:25 am »
Hello,

I've been playing with libsqlite3 and pysqlite2.  I've tried two approaches:

1) Use existing IPK for libsqlite3
2) Build my own

First, let me describe my endeavours with option 1.  I used the IPK from here.  This IPK (and the others I have seen around) don't seem to include pysqlite2, so I decided to cross-compile it myself.  When I was done, and moved everything across to the Zaurus, I wasn't able to run the tests from pysqlite2.  I got this error:

Code: [Select]
ImportError:  /opt/QtPalmtop/lib/python2.4/site-packages/pysqlite2/_sqlite.so: undefined symbol: sqlite3_enable_shared_cache
I decided to have a peek at the libsqlite3.so and see what symbols are there:

Code: [Select]
misha@poseidon:~/Desktop/package$ nm opt/QtPalmtop/lib/libsqlite3.so | grep enable_shared_code
The symbol isn't there.   It's not part of the .so that was in the IPK that freizugheit attached to this post, either.  Can someone explain why this symbol missing?  Is it something that's really needed -- I can't seem to run the tests without it.

At this stage, I decided to try option 2.  I built libsqlite3 with:

Code: [Select]
./configure --disable-tcl --disable-readline --host=arm
It wasn't able to pick up my cross-compiler by default, but I was able to modify the output Makefile to point it to the right location.  After moving libsqlite3 libs and includes to the proper location, it all built.  The one thing I found curious is that it built libsqlite3.a and libsqlite3.la files instead of an .so -- this means it's building as a static library, as opposed to dynamically loaded, right?  I'm not 100% clear on what needs to happen here -- could someone clear it up?

I was able to build pysqlite2 against the libsqlite3.a and deploy it all to the Zaurus.  The tests work partially, hanging after a little while:

Code: [Select]
$ /opt/QtPalmtop/bin/python            
from Python 2.4 (#1, Jan  5 2005, 19:21:20)
[GCC 2.95.1 19990816 (release)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from pysqlite2 import test
>>> test.test()
...............................................................

At this stage it hangs indefinitely.

Can someone suggest what the problem may be here?  Thanks in advance.

Cheers and regards,
Misha

PS.  wheaties.box, did you end up getting this to work?

rolf

  • Full Member
  • ***
  • Posts: 105
    • View Profile
    • http://home.arcor.de/leggewie/
Pysqlite Ipk?
« Reply #7 on: February 10, 2008, 09:58:00 am »
I suggest using openembedded.org for compilation