Sunday, October 19, 2008

Building Python 2.3.5 on Ubuntu Intrepid (8.10)

I'm working on Testoob again, and I want to test its compatibility with different Python versions.

Usually it's no sweat - all I need is to download the sources and then

./configure --prefix=...
make install

But when building Python 2.3.5 on Ubuntu Intrepid I get a neat little error:

*** buffer overflow detected ***: ./python terminated

I've been out of gcc land for a while, and it seems several security compiler flags are now enabled by default. For some reason Python 2.3.5's configure ignores CFLAGS, but BASECFLAGS is honored:

./configure BASECFLAGS=-U_FORTIFY_SOURCE --prefix=...
make install

And Python 2.3.5 installs correctly.


  1. I met the same problem. Very useful, thanks

  2. Hi Ori!
    I fought for a while with this same problem until I found your post. It works fine, thanks for posting!

  3. Thanks!

    I think I was goner when I had to open Real Old Project and Python 2.3 didn't install.. you saved me

  4. Thanks!

    Adding one line for cleanup, in case it is needed..

    sudo make distclean
    sudo ./configure BASECFLAGS=-U_FORTIFY_SOURCE
    sudo make