[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.python

Enable md5 support for python 2.5.1 on AIX 5.3

Hajo Ehlers

1/16/2008 6:06:00 PM

Given
AIX 5.3 ML07 including
openssh.base.4.5.0.5301.I
openssl.base.0.9.8.4.I

Latest RPM packages from the AIX Toolbox 11/2007 including
- openssl-0.9.7l-2.aix5.1.ppc.rpm

Python 2.5.1

Problem:
$python
>>> import md5
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/lib/python2.5/md5.py", line 6, in <module>
from hashlib import md5
File "/usr/local/lib/python2.5/hashlib.py", line 133, in <module>
md5 = __get_builtin_constructor('md5')
File "/usr/local/lib/python2.5/hashlib.py", line 60, in
__get_builtin_constructor
import _md5

Remarks:
python 2.5.1 requires openssl
openssl libraries are provided from:
- openssl.base 0.9.8.4 from IBM in installp format for the latest
openssh version and goes to /usr/lib
- openssl-0.9.7l-2 from the AIX toolbox and goes to /opt/freeware/lib

Analyse:
$ dump -Hv /usr/local/lib/python2.5/lib-dynload/_hashlib.so
/usr/local/lib/python2.5/lib-dynload/_hashlib.so:
INDEX PATH BASE MEMBER
0 /opt/freeware/lib:/usr/local/lib:/usr/vac/lib:/usr/lib/threads:/
usr/lib:/lib
1 libcrypto.a libcrypto.so.
0.9.7
2 .

$ ls -l /usr/local/lib/python2.5/lib-dynload/ | grep md5

Build environment
export LDFLAGS=" -L/opt/freeware/lib "
export CPPFLAGS=" -I/opt/freeware/include"
export OPT="-O2 -qmaxmem=-1 $CFLAGS"

../configure CC=cc_r CXX=xlC_r --without-gcc --with-gcc=cc_r --disable-shared --with-thread --disable-ipv6 --mandir=/usr/local/man --infodir=/usr/local/info

Thus the build has been done with the openssl version from the Toolbox
which can be seen as well from the build environment and no md5.so or
_md5.so file exist.

Solution:
For people using openssl v0.9.7 they should unmark _md5 in ./Modules/
Setup after 'configure' and before 'make'
$ perl -p -i -e 's/^#_md5/_md5/' ./Modules/Setup

For people using the openssl v0.9.8 from the openssl.base fileset
should use the following settings: ( /usr/lib is in front )
export LDFLAGS="-L/usr/lib -L/opt/freeware/lib "
export CPPFLAGS="-I/usr/include/openssl -I/opt/freeware/include"

or apply the workaround of openssl v0.9.7

hth
Hajo
1 Answer

Andrew Schulman

5/21/2014 5:37:00 AM

0

Okay, this is getting out of hand and it's not my fault. Innocents may be reading this thread. So, no more hand jobs, okay?

Harold