jfd4
Posts: 1
Joined: Fri Aug 09, 2013 9:50 pm

python2.5 with the Raspberry Pi

Fri Aug 09, 2013 10:06 pm

I had been working on a project using some legacy python code. Because of the liquid nature of the language, many things either become depracated or worse, totally unavailable with later releases. For part of the project, python2.5 was needed and there was no package from the given mirrors. Deciding to install from source, I ran into the following error when running 'make'.

Code: Select all

gcc -pthread -c -fno-strict-aliasing -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes  -I. -IInclude -I./Include   -DPy_BUILD_CORE -DSVNVERSION=\"`LC_ALL=C svnversion .`\" -o Modules/getbuildinfo.o ./Modules/getbuildinfo.c
gcc: error: directory": No such file or directory
make: *** [Modules/getbuildinfo.o] Error 1
I spent quite some time frustratingly trying to figure out the problem of the error and found that svnversion has changed its output with newer versions and the subversion installed with Raspbian has a different expected output than the subversion that was available when python2.5 was released. Specifically, svnversion returns 'Unversioned directory' rather than 'exported'. This causes the build to fail.

After much searching, I found a thread discussing a workaround here...https://github.com/yyuu/pyenv/issues/14

Basically, creat a file called svnversion with the following contents and place it somewhere early in your $PATH variable (before it appears normally - use 'which svnversion' to find this location). Then run 'make' and 'make altinstall' and once the build has completed, remove this "fake" version of svnversion.

Code: Select all

#!/bin/sh
echo exported
This is not exactly a problem needing to be fixed, but rather something that caused me much headache and I'd like to help others avoid the same problem. Enjoy :D

Return to “Python”