Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > import zlib in 2.5 fails

Reply
Thread Tools

import zlib in 2.5 fails

 
 
stuntgoat
Guest
Posts: n/a
 
      01-04-2008
import zlib works in Python 2.4 (debian etch AMD64 - default python
version for that distro)

I built python 2.5 from source; zlib is not importable.

I am trying to compile MySQLdb.

any clues about how to get zlib able to be imported in 2.5?

-sg
 
Reply With Quote
 
 
 
 
stuntgoat
Guest
Posts: n/a
 
      01-04-2008
Modules/main.c:186: warning: function declaration isn't a prototype
/home/name/Desktop/webdl/Python-2.5.1/Modules/_ctypes/libffi/src/x86/
ffi64.c:45: warning: function declaration isn't a prototype
/home/name/Desktop/webdl/Python-2.5.1/Modules/_ctypes/libffi/src/x86/
ffi64.c:342: warning: function declaration isn't a prototype
/usr/bin/ld: /usr/local/lib/libz.a(adler32.o): relocation R_X86_64_32
against `a local symbol' can not be used when making a shared object;
recompile with -fPIC
/usr/local/lib/libz.a: could not read symbols: Bad value
collect2: ld returned 1 exit status

this error occurred at one point during a compilation of Python 2.5.
It seems related to my inability to import zlib now.

On Jan 4, 10:19 am, stuntgoat <hyperne...@gmail.com> wrote:
> import zlib works in Python 2.4 (debian etch AMD64 - default python
> version for that distro)
>
> I built python 2.5 from source; zlib is not importable.
>
> I am trying to compile MySQLdb.
>
> any clues about how to get zlib able to be imported in 2.5?
>
> -sg


 
Reply With Quote
 
 
 
 
Zentrader
Guest
Posts: n/a
 
      01-04-2008
On Jan 4, 2:19 am, stuntgoat <hyperne...@gmail.com> wrote:
> import zlib works in Python 2.4 (debian etch AMD64 - default python
> version for that distro)
>
> I built python 2.5 from source; zlib is not importable.


2.5 has been available for some time in the Debian repositories.
Installing the .deb may provide better results. Note that you might
also have to upgrade the dependencies to a newer version. apt-get
will do all of this for you - "man apt-get" for all of the details.
http://packages.debian.org/etch/python2.5
 
Reply With Quote
 
stuntgoat
Guest
Posts: n/a
 
      01-05-2008
I was able to recompile zlib

$./configure --shared

then recompile Python 2.5.1; I am now able to import the zlib module.

cheers

-sg

I was able to recompile zlib

$./configure --shared

then recompile Python 2.5.1; I am now able to import the zlib module.

cheers

-sg



On Jan 4, 5:17 pm, Zentrader <zentrad...@gmail.com> wrote:
> On Jan 4, 2:19 am, stuntgoat <hyperne...@gmail.com> wrote:
>
> > import zlib works in Python 2.4 (debian etch AMD64 - default python
> > version for that distro)

>
> > I built python 2.5 from source; zlib is not importable.

>
> 2.5 has been available for some time in the Debian repositories.
> Installing the .deb may provide better results. Note that you might
> also have to upgrade the dependencies to a newer version. apt-get
> will do all of this for you - "man apt-get" for all of the details.http://packages.debian.org/etch/python2.5


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Most simple usage of zlib or pr-zlib Nicholas Wieland Ruby 4 03-10-2011 04:48 AM
zlib.decompress fails, zlib.decompressobj succeeds - bug or feature? Matthew Brett Python 4 05-09-2010 09:19 PM
[ANN] pr-zlib 1.0.0 - A Pure Ruby zlib library Daniel Berger Ruby 5 06-21-2009 02:07 AM
zlib question (compression/uncompression fails) - demo atatched Anonymous C Programming 4 08-19-2007 08:02 PM
zlib decode fails with -5 Paul Watson Python 2 09-29-2005 08:56 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57