473,391 Members | 1,522 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,391 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 2752
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: David McNab | last post by:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi, I'm working on a python plugin for someone else's code written in C. On the whole, I'm successfully embedding the python interpreter,...
43
by: Dan Perl | last post by:
Here is a python feature that I would like: to be able to import modules from an archive like the jar files in Java. Maybe a regular tar file? Maybe a python specific file type, let's call it a...
3
by: Alan Toppen | last post by:
I was unable to use the ZipFile class in the zipfile module in Python2.4. I got an error that zlib could not be found. Comparing my Python 2.2 installation I noticed Python 2.4 was missing a...
5
by: Daniel | last post by:
Hello from Brazil :-) I'm trying to bring cx_Oracle alive on my Python 2.4.1 @ HP-UX 11 (suckz) and Oracle 10.1.0 64bits without success I've already tryied the suggestions from Bernard Delmée...
1
by: SkyBlue | last post by:
I am trying to copy updated tables from a DB on a remote SQL server to my pc using import wizard. I choose "copy objects and data between SQL Server databases". On the screen "Select objects to...
0
by: PiBi | last post by:
hi, i try to embed some python code in C, namely: ---------------------------- import zlib def fun(s): return zlib.compress(s) ----------------------------
6
by: Laszlo Zsolt Nagy | last post by:
Sorry, I realized that the import zlib was not executed from my (working) service. So here is the question: why can't I use zlib from a win32 service? Is there any way to make it working? ...
2
by: Tod Olson | last post by:
Anyone have advice for importing the logging module using MacPython 2.4.3? MacPython installs the logging module in: /Library/Frameworks/Python.framework/Versions/2.4/lib/logging/ There's an...
2
by: rajevar | last post by:
hi, i have seen various post related to this topic but i couldnt resolve my issue yet. Im using python version 2.5 on Linux environment this is the error im getting if i try to import zlib ...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

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.