- Joined
- Jan 24, 2006
- Location
- South Dakota
HowTo: Setting up Python Freeze on AIX 5.3
HowTo: Since I have spent such a large amount of time to get this to work I thought I would do a write-up of what I can remember doing to get this to work.
You will need the following rpms available at IBM's AIX Toolbox
and readline from Perlz
and python, devel, and tools from Bazaar Unix Packages
You will also need to update bos.adt to version 5.3.7 if you are using xlc 11 (found here)
XLC is available for trial download here
Step 1
Install all of the RPMs (you can try to do an rpm -Uhv *.rpm).
If I missed some dependencies you will have to hunt them up yourself. But please post back so I can update this post
Step 2
install the bos.adt update
go into the inst.images directory. For example I extracted it to xlc so
once inside that directory do the following
Step 3
Confirm that the files have installed correctly. This is important, you need to know which files it failed on, and which ones succeeded.
The sample output below is from a C++ install
From this I can see that some of the documentation was not installed, (earlier output indicated that my bos.adt.uft.EN_US file was not current. I briefly looked for it but was unable to turn up the updated files on the IBM website. But this is very trivial anyways.
Step 4
If you did a default location install, you either need to adjust your $PATH variable to include /usr/vac/bin and /usr/vacpp/bin or you can create sym links to /usr/bin/. If you choose to do sym links issue the following commands
[/u]Step 5[/u]
Test the install by testing freeze.py. In this example you will most likely find freeze.py here:
We need to make a test python program so create a file "hello.py" with the following contents
now run freeze (I suggest making an empty directory and running from there since freeze creates a lot of files during this process)
If this fails with
It means something in AIX is not picking up the files properly.
Confirm that they exist
if they exist issue
If you encounter
Or very similar output, this indicates a bug in in makeconfig.py
As per the Bug Report
Erase everything in the directory, rerun
You should now have a working python install on AIX 5.3 which can create python binaries for other AIX machines which do not have python installed
HowTo: Since I have spent such a large amount of time to get this to work I thought I would do a write-up of what I can remember doing to get this to work.
You will need the following rpms available at IBM's AIX Toolbox
Code:
autoconf-2.59-1.aix5.1.noarch.rpm
automake-1.8.5-1.aix5.1.noarch.rpm
bash-3.2-1.aix5.2.ppc.rpm
gcc-4.2.0-3.aix5.3.ppc.rpm
gcc-cplusplus-4.2.0-3.aix5.3.ppc.rpm
gdbm-1.8.3-5.aix5.2.ppc.rpm
info-4.6-1.aix5.1.ppc.rpm
libgcc-4.2.0-3.aix5.3.ppc.rpm
libstdcplusplus-4.2.0-3.aix5.3.ppc.rpm
libtool-1.5.8-2.aix5.1.ppc.rpm
m4-1.4.1-1.aix5.1.ppc.rpm
make-3.80-1.aix5.1.ppc.rpm
wget-1.9.1-1.aix5.1.ppc.rpm
and readline from Perlz
Code:
readline-5.2-3.aix5.1.ppc.rpm
readline-devel-5.2-3.aix5.1.ppc.rpm
and python, devel, and tools from Bazaar Unix Packages
Code:
python-2.6.6-1.aix5.3.ppc.rpm
python-devel-2.6.6-1.aix5.3.ppc.rpm
python-tools-2.6.6-1.aix5.3.ppc.rpm
You will also need to update bos.adt to version 5.3.7 if you are using xlc 11 (found here)
XLC is available for trial download here
Step 1
Install all of the RPMs (you can try to do an rpm -Uhv *.rpm).
If I missed some dependencies you will have to hunt them up yourself. But please post back so I can update this post
Step 2
install the bos.adt update
go into the inst.images directory. For example I extracted it to xlc so
Code:
cd xlc/usr/sys/inst.images
once inside that directory do the following
Code:
Run "smitty install"
Select "Install and Update Software"
Select "Install Software"
Specify directory containing the images (in this case "." without the quotation marks)
Hit ESC-4 to select packages
Select the packages required
Hit enter, and then again to confirm
Step 3
Confirm that the files have installed correctly. This is important, you need to know which files it failed on, and which ones succeeded.
The sample output below is from a C++ install
Code:
+-----------------------------------------------------------------------------+
Summaries:
+-----------------------------------------------------------------------------+
Pre-installation Failure/Warning Summary
----------------------------------------
Name Level Pre-installation Failure/Warning
-------------------------------------------------------------------------------
vacpp.msg.EN_US.cmp.tools 11.1.0.1 Requisite failure
vacpp.msg.EN_US.cmp.core 11.1.0.1 Requisite failure
vacpp.man.EN_US 11.1.0.1 Requisite failure
vacpp.cmp.aix53.tools 11.1.0.1 Already installed
vacpp.cmp.rte 11.1.0.1 Already installed
vacpp.cmp.tools 11.1.0.1 Already installed
vacpp.html.common 11.1.0.1 Already installed
vacpp.html.en_US 11.1.0.1 Already installed
vacpp.memdbg.aix53.rte 11.1.0.1 Already installed
vacpp.memdbg.rte 11.1.0.1 Already installed
vacpp.ndi 11.1.0.1 Already installed
vacpp.pdf.en_US 11.1.0.1 Already installed
vacpp.tnb 11.1.0.1 Already installed
xlC.adt.include 11.1.0.0 Already installed
xlC.aix50.rte 11.1.0.1 Already installed
xlC.rte 11.1.0.1 Already installed
xlsmp.aix53.rte 2.1.0.1 Already installed
xlsmp.rte 2.1.0.1 Already installed
Installation Summary
--------------------
Name Level Part Event Result
-------------------------------------------------------------------------------
vacpp.memdbg.aix53.lib 11.1.0.1 USR APPLY SUCCESS
vacpp.cmp.aix53.lib 11.1.0.1 USR APPLY SUCCESS
vacpp.cmp.lib 11.1.0.1 USR APPLY SUCCESS
vacpp.cmp.include 11.1.0.1 USR APPLY SUCCESS
vacpp.cmp.core 11.1.0.1 USR APPLY SUCCESS
vacpp.cmp.core 11.1.0.1 ROOT APPLY SUCCESS
vacpp.samples.ansicl 11.1.0.1 USR APPLY SUCCESS
vacpp.memdbg.lib 11.1.0.1 USR APPLY SUCCESS
From this I can see that some of the documentation was not installed, (earlier output indicated that my bos.adt.uft.EN_US file was not current. I briefly looked for it but was unable to turn up the updated files on the IBM website. But this is very trivial anyways.
Step 4
If you did a default location install, you either need to adjust your $PATH variable to include /usr/vac/bin and /usr/vacpp/bin or you can create sym links to /usr/bin/. If you choose to do sym links issue the following commands
Code:
ln -s /usr/vacpp/bin/xlC_r /usr/bin/xlC_r
ln -s /usr/bin/gcc /usr/bin/xlc_r
[/u]Step 5[/u]
Test the install by testing freeze.py. In this example you will most likely find freeze.py here:
Code:
/opt/freeware/lib/python2.6/Tools/freeze/freeze.py
We need to make a test python program so create a file "hello.py" with the following contents
Code:
#!/usr/bin/python
print "hello world!"
now run freeze (I suggest making an empty directory and running from there since freeze creates a lot of files during this process)
Code:
python /opt/freeware/lib/python2.6/Tools/freeze/freeze.py hello.py
make
If this fails with
Code:
/bin/sh: ./Modules/makexp_aix: not found.
It means something in AIX is not picking up the files properly.
Confirm that they exist
Code:
ls /opt/freeware/lib/python2.6/config/
if they exist issue
Code:
ln -s /opt/freeware/lib/python2.6/config/ Modules
If you encounter
Code:
undefined reference to `init_warnings'
As per the Bug Report
In order to get freeze to work, it should be enough to add '_warnings'
to the list never in makeconfig.py of the freeze tool.
Erase everything in the directory, rerun
Code:
python /opt/freeware/lib/python2.6/Tools/freeze/freeze.py hello.py
make
You should now have a working python install on AIX 5.3 which can create python binaries for other AIX machines which do not have python installed
Last edited: