Author Topic: Missing Zlib ?  (Read 8836 times)

fpp

  • Full Member
  • ***
  • Posts: 187
    • View Profile
    • http://
Missing Zlib ?
« on: March 13, 2005, 05:07:34 pm »
Kopsis,

I just tried out a nice PyQt app ( http://www.bellz.org/treeline/ ) that looks just right for running on a Z ! The windows version works fine on my PC, but I have a problem with the Linux version :

The installer says all dependencies are OK, but when I try to run it fails when the gzip module tries to "import zlib" (I can't import it manually from the interpreter either).

Is there anything I can do about this ?

TIA,
fp

fpp

  • Full Member
  • ***
  • Posts: 187
    • View Profile
    • http://
Missing Zlib ?
« Reply #1 on: March 16, 2005, 12:26:29 pm »
Up ! :-)

Anyone ? Stoopid question maybe, or is Kopsis just away for a while ?
« Last Edit: March 16, 2005, 12:27:00 pm by fpp »

kopsis

  • Sr. Member
  • ****
  • Posts: 329
    • View Profile
    • http://kopsisengineering.com
Missing Zlib ?
« Reply #2 on: March 17, 2005, 09:06:18 am »
Sorry for not posting sooner ... I've been slammed with work lately. Cost growth estimates on a $50M embedded system development ... blech!

There used to be a zlib package on Sourceforge (ZSI has links to it) but it looks like the project that housed it has been terminated. Unfortunately I don't have a copy of the IPK to post.

The libz.so that I use actually comes from a Debain devel package. If you know your way around Debian, you can download the appropriate ARM .deb file, extract its contents, and move the .so file to your Z. If not, I can probably whip up an IPK but not before this weekend. In the mean time you may want to post in the General Software forum to see if anyone has a copy of (or knows a feed for) the zlib package.

fpp

  • Full Member
  • ***
  • Posts: 187
    • View Profile
    • http://
Missing Zlib ?
« Reply #3 on: March 17, 2005, 05:07:23 pm »
Quote
Sorry for not posting sooner ... I've been slammed with work lately. Cost growth estimates on a $50M embedded system development ... blech!
No sweat, that's life for you : priorities all wrong, most of the time
Quote
The libz.so that I use actually comes from a Debain devel package. If you know your way around Debian, you can download the appropriate ARM .deb file, extract its contents, and move the .so file to your Z. If not, I can probably whip up an IPK but not before this weekend. In the mean time you may want to post in the General Software forum to see if anyone has a copy of (or knows a feed for) the zlib package.
[div align=\"right\"][a href=\"index.php?act=findpost&pid=71112\"][{POST_SNAPBACK}][/a][/div]
Kopsis, I guess I must have misunderstood something here, sorry.

The reason I posted in this forum, and to you in particular, is because I was under the impression that the problem was with your python 2.3.4 image for the Z, i.e. some missing item from the standard Python distribution. After all, the offending script fails specifically on "import zlib", the traceback ending with :
ImportErro: No module named zlib

On my Windows box there is a zlib.pyd in python/DLLs. On my gentoo (sort-of-debian) box there is a zlib.so in /usr/lib/python/lib-dynload. On my Z there is no zlib-something anywhere, so I thought it was just a Python problem.

I hadn't realised that under Linux (Windows seems to different, heh) you also need a system package (Gentoo has a lot of other zlib pieces all over the place). What I'm wondering is, if I find an arm version of zlib, will symlinking that zlib.so to the python lib-dynload dir be enough, or is there more involved ?

If you can save time by not creating a proper IPK, a plain copy of the relevant file(s) with some hints on where to copy/link them would do just as nicely for a start. And it's not like I'm in a hurry, either :-)

TIA,
fp

mars

  • Full Member
  • ***
  • Posts: 145
    • View Profile
Missing Zlib ?
« Reply #4 on: March 17, 2005, 05:12:41 pm »
It doesn't seem as easy as pulling zlib from debian-arm.

I tried it by extracting the libraries out of zlib1g and zlib1g-dev in testing and putting the resulting libz.a, libz.so, libz.so.1, libz.so.1.2.2 in various places (/usr/lib, /opt/QtPalmtop/lib, $PYTHONPATH). Importing zlib in python still doesn't work.

BTW, The latest Cacko ROM already has zlib installed:

     /usr/lib.rom/libz.so
     /usr/lib.rom/libz.so.1
     /usr/lib.rom/libz.so.1.2.2

Anyway, I've exhausted my meager abilities on this.
C-3100 (reaquainting myself with Cacko) / Nokia 810 / Nokia N800 / Asus eeePC
Previously owned: SL-5500 / SL-5600 / SL-6000L / C-860 / Nokia 770 / Pepperpad 3

fpp

  • Full Member
  • ***
  • Posts: 187
    • View Profile
    • http://
Missing Zlib ?
« Reply #5 on: March 17, 2005, 05:57:32 pm »
Well, you're still way ahead of me, I didn't even know that some pervert had called the actual zlib-related files "libz" :-)

I've tried symlinking libz.so (the one in the Cacko ROM, and another I found somewhere) to zlib.so in the lib-dynload dir for python.

In both cases the ImportError changes :
dynamic module does not define init function (initzlib)

Think I'm gonna stop guessing right here and wait for the expert(s) - it's late over here in GMT anyway :-)

Optogeek

  • Newbie
  • *
  • Posts: 48
    • View Profile
    • http://optogeek.homelinux.net
Missing Zlib ?
« Reply #6 on: March 18, 2005, 06:58:36 am »
Try putting this file your lib-dynload (or anywhere in your PYTHONPATH) and rename it "zlib.so".  I extracted it from the Debian arm Python 2.3 package and have tried in on the 2.4 image it imports and returns a sane __doc__ but have not tested it further.

 [ Invalid Attachment ]
remeber to rename zlib.so
« Last Edit: March 18, 2005, 07:22:49 am by Optogeek »
SL-C860 running Cacko 1.23
SL-5500UK with 3.13 Sharp ROM + Cacko Kernel
Origo WLAN and BlueMonkey BT CFs
1GB Crucial SD
1GB Crucial CF

Optogeek

  • Newbie
  • *
  • Posts: 48
    • View Profile
    • http://optogeek.homelinux.net
Missing Zlib ?
« Reply #7 on: March 18, 2005, 07:20:19 am »
I have just extracted the same file from the debian 2.4 package and the zlib.so file is the same in both  (the 2.3 version was compiled on one day and the 2.4 on the next).
SL-C860 running Cacko 1.23
SL-5500UK with 3.13 Sharp ROM + Cacko Kernel
Origo WLAN and BlueMonkey BT CFs
1GB Crucial SD
1GB Crucial CF

mars

  • Full Member
  • ***
  • Posts: 145
    • View Profile
Missing Zlib ?
« Reply #8 on: March 18, 2005, 12:17:04 pm »
Optogeek --

Using the zlib.so from the base python packge on Debian Arm worked like a charm.

Thanks!  
C-3100 (reaquainting myself with Cacko) / Nokia 810 / Nokia N800 / Asus eeePC
Previously owned: SL-5500 / SL-5600 / SL-6000L / C-860 / Nokia 770 / Pepperpad 3

fpp

  • Full Member
  • ***
  • Posts: 187
    • View Profile
    • http://
Missing Zlib ?
« Reply #9 on: March 18, 2005, 03:51:14 pm »
Quote
Try putting this file your lib-dynload (or anywhere in your PYTHONPATH) and rename it "zlib.so".  I extracted it from the Debian arm Python 2.3 package and have tried in on the 2.4 image it imports and returns a sane __doc__ but have not tested it further.
Thanks for your help Optogeek, that worked just fine !

(Under Cacko 1.21, though, it didn't seem to agree with the libz files present in the ROM, and complained about libz.so.1... after I installed a separate zlib ipk the python module finally imported successfully...)