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

K

knipknap

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
 
J

Josh Volchko

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. :)
 
T

Terry Reedy

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.

You meant the *above* patch (this fooled me, at first).

If you think any of your patch is generic as opposed to site specific
and belongs in the file distributed with Python, please submit an issue
on bugs.python.org. Ditto if you think any of the docs should be modified.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,011
Latest member
AjaUqq1950

Latest Threads

Top