Compiling Python 2.7a2 on AIX6.1 (also pycrypto)

Josh Volchko joshmotron at gmail.com
Wed Jan 13 12:45:45 EST 2010


On Jan 13, 6:13 am, knipknap <knipk... at gmail.com> wrote:
> Hi,
>
> 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
> needs it:
>
> #######
> First, I installed the following dependencies:
>
> 1. readline-6.1;
> 2. tcl8.4.19/unix/
> 3. tk8.4.19/unix/
> 4. zlib-1.2.3
>
> 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:
>
> http://pastebin.com/f1569d184
>
> 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 /
> usr/local
>
> Hope this helps,
> -Samuel


I love you so much it hurts right now.  Installing 2.6 on AIX 5.3 was
a terrifying experience and this will most certainly help when we
upgrade to 6.1 and if we decide to go to Python 2.7.  Everyone with
AIX should post stuff like this. :)



More information about the Python-list mailing list