Gear hpux up with GNU goodies and python
Some note on plug bash, python, and gcc into HPUX. Totally binary depots, not compiling from source :) Don't think gcc is better then aCC on production tasks but it adds possibilities.
- OS: HP-UX APP B.11.23 U ia64
- goal: ksh⇒bash; perl⇒python,ipython; cc,aCC ⇒ gcc,g++
GNUToolChain
Bringing gnu toolchains is quite easy and straight-forward. Just grab depots and install them. I'm just using
swinstall -s /path/to/depot/file
Only thing to mention is the requirements, obviously these depots are included:
- libiconv
- gettext
- termcap
- zlib
Then libgcc, gcc, make, less, bash. Yummy bash! Bye bye ksh!
Python
The most recent Python depot I found is Python 2.5.2. Py2.5 is a great pleasure for me over perl.:) Just grab the depot and use swinstall to gear the OS up with python.
swinstall -s /depots/python-2.5.2-ia64-11.23.depot
Like Perl, Python shines with humongous module library. Get a recent setuptools is prefered. Upon installing setuptools-0.6c11, I found that a critical package is lost in current python:
import error: no module named _md5
Some encryption lib is stripped(US export law?)… For this Python 2.5.2, this should be hashlib.Grab it and install:
python setup.py install ... ld: Can't find library or mismatched ABI for -lpython2.5 Fatal error. error: command 'ld' failed with exit status 1
Ahh to my suprise setuptools didn't include the python library path for C extensions! Trying to fix it:
export SHLIB_PATH=$SHLIB_PATH:/usr/local/lib/python2.5/config
Yet setup.py is not using SHLIB_PATH(wonder if it cares about LD_LIBRARY_PATH in Linux…)
Then my workaround is lil'bit brutal(not graceful but works):
export CFLAGS=-L/usr/local/lib/python2.5/config
And this let HPUX shipped cc builds c extensions with proper lib path I commanded. Get ipython installed and now I have a nice python enviroment!
This site provides sweet HPUX depots mentioned above.

Discussion