Building from source -- zlib/binascii problems 2.5.2/2.6.1

peter s. psftw1 at gmail.com
Sun Dec 14 17:09:07 EST 2008


On Dec 14, 5:03 pm, "peter s." <psf... at gmail.com> wrote:
> On Dec 14, 4:54 pm, "Martin v. Löwis" <mar... at v.loewis.de> wrote:
>
>
>
> > > Target: x86_64-redhat-linux
> > > gcc -pthread -shared build/temp.linux-x86_64-2.5/location/of/
> > > Python-2.5.2/Modules/zlibmodule.o -L/usr/local/lib -lz -o build/
> > > lib.linux-x86_64-2.5/zlib.so
> > > /usr/bin/ld: skipping incompatible /usr/lib/libz.so when searching for
> > > -lz
>
> > Do
>
> >   file /usr/lib/libz.so
>
> > It might be a 32-bit library, in which case you can check whether
> > /usr/lib64 has a 64-bit library. I'm puzzled why it only
> > happens for -lz; perhaps you are better of compiling with a 32-bit
> > compiler.
>
> > Regards,
> > Martin
>
> $ file /usr/lib/libz.s*
> /usr/lib/libz.so:       symbolic link to `libz.so.1.2.3'
> /usr/lib/libz.so.1:     symbolic link to `libz.so.1.2.3'
> /usr/lib/libz.so.1.2.3: ELF 32-bit LSB shared object, Intel 80386,
> version 1 (SYSV), stripped

I meant to also add

$ file /usr/lib64/libz.s*
/usr/lib64/libz.so.1:     symbolic link to `libz.so.1.2.3'
/usr/lib64/libz.so.1.2.3: ELF 64-bit LSB shared object, AMD x86-64,
version 1 (SYSV), stripped

So.. it seems as though I need to get it to point to the 64 bit
version (or compile the zlib that comes with Python source).  I'm not
sure how to override that.



More information about the Python-list mailing list