Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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.

Thanks.

UPDATE:

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
add comment

1 Answer

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 *
_Py_svnversion(void)
{                         
    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
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.