classification
Title: Python fails to build with Subversion 1.7
Type: compile error Stage:
Components: Build Versions: Python 3.0, Python 3.1, Python 2.7, Python 2.6, Python 2.5
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: Arfrever, benjamin.peterson, jcon, jimjjewett, ned.deily, suman_pas
Priority: normal Keywords: patch

Created on 2009-05-23 18:19 by Arfrever, last changed 2014-06-28 23:15 by ned.deily. This issue is now closed.

Files
File name Uploaded Description Edit
python-2.6.2-svnversion.patch Arfrever, 2009-05-23 18:19 python-2.6.2-svnversion.patch
python-2.6.2-svnversion.patch Arfrever, 2009-05-23 18:51 python-2.6.2-svnversion.patch
Messages (8)
msg88246 - (view) Author: Arfrever Frehtes Taifersar Arahesis (Arfrever) * Date: 2009-05-23 18:19
svnversion program from Subversion 1.7 (currently trunk), when invoked
on unversioned directory, prints "Unversioned directory" instead
"exported". This change in output is intentional and won't be reverted.

It causes build failure:
x86_64-pc-linux-gnu-gcc -pthread -c -fno-strict-aliasing -DNDEBUG -
-DSVNVERSION=\"`LC_ALL=C svnversion .`\" -o Modules/getbuildinfo.o
./Modules/getbuildinfo.c                                                                                                                                              
x86_64-pc-linux-gnu-gcc: directory": No such file or directory                                                                                               
<command-line>: warning: missing terminating " character                                                                                                     
./Modules/getbuildinfo.c: In function '_Py_svnversion':                                                                                                      
./Modules/getbuildinfo.c:48: error: missing terminating " character                                                                                          
./Modules/getbuildinfo.c:48: error: expected expression before ';'
token                                                                                     
make: *** [Modules/getbuildinfo.o] Error 1

I'm attaching the patch which fixes this problem and also updates
expected output of svnversion.
msg88248 - (view) Author: Arfrever Frehtes Taifersar Arahesis (Arfrever) * Date: 2009-05-23 18:51
I'm attaching improved patch.
msg88251 - (view) Author: Benjamin Peterson (benjamin.peterson) * (Python committer) Date: 2009-05-23 19:25
Fixed in r72871.
msg88586 - (view) Author: Jim Jewett (jimjjewett) Date: 2009-05-30 23:03
Would this patch mean that users of pre-1.7 subversion would get build 
failures?  Is it possible to support both forms of wording?
msg88587 - (view) Author: Benjamin Peterson (benjamin.peterson) * (Python committer) Date: 2009-05-30 23:11
2009/5/30 Jim Jewett <report@bugs.python.org>:
>
> Jim Jewett <jimjjewett@users.sourceforge.net> added the comment:
>
> Would this patch mean that users of pre-1.7 subversion would get build
> failures?  Is it possible to support both forms of wording?

Yes, and it does.
msg221440 - (view) Author: Suman (suman_pas) Date: 2014-06-24 09:11
I am trying to install Python 2.7.7 or 2.7.3 in one of my linux machine which has RHEL 6.4.

  I am getting the same error, that is mentioned in this bug. I am pasting it below. Please let me know, what should i do here. 

ser Python-2.7.7]# make
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 echo Unversioned directory`\"" \
              -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
<command-line>: warning: missing terminating " character
./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: *** [Modules/getbuildinfo.o] Error 1
msg221817 - (view) Author: John O'Connor (jcon) Date: 2014-06-28 21:35
I encountered the same problem w/ 2.7.7. 

Temporary workaround:
SVNVERSION="Unversioned directory" ./configure
make
...
msg221821 - (view) Author: Ned Deily (ned.deily) * (Python committer) Date: 2014-06-28 23:15
Suman, Jon:  This issue was closed five years ago and the fixes for it have long been out in the field.  Comments on closed issues are likely to be overlooked and not acted on.  If you are having a current problem, you should open a new issue, documenting in particular what OS versions and shell you are using, the pertinent values (SVNVERSION, HGVERSION) from the generated Makefile, and the output from:

echo `LC_ALL=C echo Unversioned directory`

FWIW, I was unable to reproduce the failure on a different Unix platform.
History
Date User Action Args
2014-06-28 23:15:48ned.deilysetnosy: + ned.deily
messages: + msg221821
2014-06-28 21:35:08jconsetnosy: + jcon
messages: + msg221817
2014-06-24 09:11:59suman_passetnosy: + suman_pas
messages: + msg221440
2009-05-30 23:11:11benjamin.petersonsetmessages: + msg88587
2009-05-30 23:03:45jimjjewettsetnosy: + jimjjewett
messages: + msg88586
2009-05-25 02:06:12Arfreversettype: compile error
versions: - Python 2.4
2009-05-23 19:25:11benjamin.petersonsetstatus: open -> closed

nosy: + benjamin.peterson
messages: + msg88251

resolution: fixed
2009-05-23 18:51:24Arfreversetfiles: + python-2.6.2-svnversion.patch

messages: + msg88248
2009-05-23 18:19:56Arfrevercreate