Thursday, September 29, 2011

My first PyPy try-out

My first PyPy try-out was not so smooth.

I have a CentOS 5.6 64-bit server. Of course the OS comes with Python 64-bit. I, however, wanted to run some 32-bit modules so I compiled Python 2.6 32-bit on my own.

I grabbed PyPy 1.6 source and tried to translate the 32-bit Python installation. After about 12 hours, I had to hold Ctrl and type C to kill the process. But it wasn't terminated! A prejudice kill -9 was required.

The source installation was a no-go for me so I tried with a pre-built package. It didn't work out of the box on CentOS due to different library naming. Things such as libssl, libcrypto, libbz2 needed new symlinks. With those shiny new symlinks, pypy ran breezily through simple interactive tests.

Then I tried running Hsalf with PyPy. And it crashed! A new bug was filed https://bugs.pypy.org/issue887.  My initial investigation showed that PyPy missed out an opcode in its translation process. This opcode is used in Python Imaging Library to bridge between its Python module and its C extension.

Now, I'm waiting for a new PyPy build with that opcode plugged. A cursory look at PyPy source code shows many promises. I surely hope it delivers.

No comments:

Post a Comment