471,342 Members | 1,735 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,342 software developers and data experts.

import zlib in 2.5 fails

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
Jan 4 '08 #1
3 2651
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.comwrote:
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
Jan 4 '08 #2
On Jan 4, 2:19 am, stuntgoat <hyperne...@gmail.comwrote:
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
Jan 4 '08 #3
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.comwrote:
On Jan 4, 2:19 am, stuntgoat <hyperne...@gmail.comwrote:
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
Jan 5 '08 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by David McNab | last post: by
43 posts views Thread by Dan Perl | last post: by
3 posts views Thread by Alan Toppen | last post: by
5 posts views Thread by Daniel | last post: by
1 post views Thread by SkyBlue | last post: by
reply views Thread by PiBi | last post: by
6 posts views Thread by Laszlo Zsolt Nagy | last post: by
2 posts views Thread by Tod Olson | last post: by
2 posts views Thread by rajevar | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.