Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm trying to install Python 2.7.3 on my CentOS 5.50 machine. Download, extract, configure (with --prefix=/usr/local) are fine. Its the make that throws this error:

gcc -pthread -c -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes  -I. -IInclude -I./Include   -DPy_BUILD_CORE \
      -DSVNVERSION="\"`LC_ALL=C svnversion .`\"" \
      -DHGVERSION="\"`LC_ALL=C `\"" \
      -DHGTAG="\"`LC_ALL=C `\"" \
      -DHGBRANCH="\"`LC_ALL=C `\"" \
      -o Modules/getbuildinfo.o ./Modules/getbuildinfo.c
gcc.orig: directory": No such file or directory
./Modules/getbuildinfo.c: In function '_Py_svnversion':
./Modules/getbuildinfo.c:63: error: missing terminating " character
./Modules/getbuildinfo.c:63: error: expected expression before ';' token
make-3.79.1-p7: *** [Modules/getbuildinfo.o] Error 1

I have been scouring the web for a few days now in an attempt to self-solve this one, but I've come up empty. One suggestion I came across was regarding "Developer Tools" being installed on the system, which I believe are properly installed, but I am not 100% sure.

If anyone has any information regarding this issue, I'd appreciate the assistance.



I've compiled and installed Python 3.3 without a hitch. The issue definitely lies with SVN. Although the packages I'm using are supported in Python 3.3, I'd still like to get 2.7.3 on there, so I'm still looking for assistance.

share|improve this question
Not sure if this is important or not, but svn is version 1.7.4 on the machine. – Honus Wagner Mar 11 '13 at 12:51
I think it is important... I installed Python 2.7.3 successfully on another box a few months ago without issues and its running svn version 1.4.2. – Honus Wagner Mar 11 '13 at 12:58
The reason why 3.3 compiles without problems is that that source was probably never under Subversion and doesn't try to call svnversion at all. – Anthon Mar 11 '13 at 15:59

You should cd to the Modules directory and look at the output of

svnversion .

on my system, with my svn version (1.6.17) it just says exported to stdout. This output sets SVNVERSION as if it is with #define in the C code and actually used to define a char array. If there is garbage in there that will throw the error.

static const char svnversion[] = SVNVERSION;

I suggest you just rename the svnversion command temporarily while you compile. Or if that doesn't work edit the function _PY_svnversion in Modules/getbuildinfo.c to:

const char *
    return "Unversioned directory";

It would be interesting to see what svnversion actually gives back on your system.

share|improve this answer
In the Modules directory, svnversion . returns Unversioned directory. – Honus Wagner Mar 11 '13 at 14:29
Also, I'm on a corporate system and those bin paths are not editable. I did double-check this. – Honus Wagner Mar 11 '13 at 14:31
I added the alternative of editing the getbuildinfo.c file, I assume you can edit that if you can compile your own Python – Anthon Mar 11 '13 at 14:39

I renamed svnversion (as suggested) after finding it by using 'which svnversion' and then ran 'make' again on Python3.0 and it worked.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .