import zlib in 2.5 fails

Discussion in 'Python' started by stuntgoat, Jan 4, 2008.

  1. stuntgoat

    stuntgoat Guest

    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
    stuntgoat, Jan 4, 2008
    #1
    1. Advertising

  2. stuntgoat

    stuntgoat Guest

    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 <> 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
    stuntgoat, Jan 4, 2008
    #2
    1. Advertising

  3. stuntgoat

    Zentrader Guest

    On Jan 4, 2:19 am, stuntgoat <> 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
    Zentrader, Jan 4, 2008
    #3
  4. stuntgoat

    stuntgoat Guest

    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 <> wrote:
    > On Jan 4, 2:19 am, stuntgoat <> 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
    stuntgoat, Jan 5, 2008
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Paul Watson

    zlib decode fails with -5

    Paul Watson, Sep 27, 2005, in forum: Python
    Replies:
    2
    Views:
    336
    Paul Watson
    Sep 29, 2005
  2. Anonymous
    Replies:
    4
    Views:
    439
    Keith Thompson
    Aug 19, 2007
  3. Matthew Brett
    Replies:
    4
    Views:
    1,077
    Matthew Brett
    May 9, 2010
  4. Daniel Berger
    Replies:
    5
    Views:
    224
    Roger Pack
    Jun 21, 2009
  5. Nicholas Wieland

    Most simple usage of zlib or pr-zlib

    Nicholas Wieland, Mar 9, 2011, in forum: Ruby
    Replies:
    4
    Views:
    295
    Jeremy Bopp
    Mar 10, 2011
Loading...

Share This Page