SEO

vBulletin Search Engine Optimization


Go Back   UnixAdminTalk.com > Unix Operating Systems > AIX Operating System

Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 01-17-2008, 06:23 AM
Hajo Ehlers
 
Posts: n/a
Default Enable md5 support for python 2.5.1 on AIX 5.3

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
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT. The time now is 05:25 PM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0