Compiling Python 2.7a2 on AIX6.1 (also pycrypto)
knipknap at gmail.com
Wed Jan 13 12:13:22 CET 2010
I have just successfully compiled Python 2.7a2 on AIX6.1, using the
IBM XL compiler (no gcc). I am documenting this here in case somebody
First, I installed the following dependencies:
All of these compiled without a problem using
./configure && make && make install
Second, the Python installation procedure. Here is the patch, see
below for comments:
1. cd Python-2.7a2
2. cp Modules/Setup.dist Modules/Setup
3. vi Modules/Setup
- Edit the path flags to the tcl and tk libraries (see the below
patch for an example)
- Add the following flags: -ltk8.4 -ltcl8.4 -lld -lX11
4. Apply the below patch to "configure". This adds AIX6 support.
5. vi Modules/ld_so_aix: Set the following CCOPT variable
CCOPT="$CCOPT -Wl,-bM:SRE -Wl,-T512 -Wl,-H512 -Wl,-brtl -Wl,-
bnortllib -lm -lbsd -o $objfile"
Note that the alternate CCOPT variable that is mentioned in the
comments of that file does NOT work, so just use this instead.
6. ./configure && make && make install
Done. Caveats: The following modules did not work:
_bsddb _ctypes bz2 gdbm.
However, since we do not need them I did not attempt to debug them.
Third, we also needed pycrypto. Here are the instructions:
- cd pycrypto-2.0.1
- In src/SHA256.c, remove all lines starting with "//".
- python2.7 setup.py build && python2.7 setup.py install --prefix /
Hope this helps,
More information about the Python-list