This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: whitespace in `svnversion .`
Type: Stage:
Components: Build Versions: Python 2.5
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: georg.brandl Nosy List: ascotan, georg.brandl, schmaller
Priority: low Keywords: patch

Created on 2006-10-15 19:33 by schmaller, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
svnversion_whitespace.patch schmaller, 2006-12-07 23:59
Messages (6)
msg51256 - (view) Author: Daniel Stränger (schmaller) Date: 2006-10-15 19:33
gcc (version 3.4.4) fails to compile
Modules/getbuildinfo.c,
since it works as documented and cuts the definition of
SVNVERSION at the first newline and so there is an
unbalanced double quote.

citation of the gcc manpage:
-D name=definition
  Predefine name as a macro, with definition definition.
  The contents of definition are tokenized and processed
  as if they appeared during translation phase three in
  a #define directive.  In particular, the definition
  will be truncated by embedded newline characters.
msg51257 - (view) Author: Daniel Stränger (schmaller) Date: 2006-10-15 21:12
Logged In: YES 
user_id=922469

The patch don't fix it and i think it's not a problem of Python.
I apologize for spamming the patch system.
msg51258 - (view) Author: Daniel Stränger (schmaller) Date: 2006-12-07 23:59
Now I've found the error (and the solution).
The culprit is the german version of svnversion: it returns the string "exportiert ".
Notice the trailing space character.
This leads to the following expansion for #> gcc -DSVNVERSION=\"`svnversion -n .`\" ...
    gcc -DSVNVERSION=\"exportiert \" ...
    and so SVNVERSION gets the value: <"exportiert>.
To solve this problem, the value of the macro SVNVERSION must again be enclosed by double-quotes,
as you can see in the patch file.

Best regards,
Daniel
File Added: svnversion_whitespace.patch
msg51259 - (view) Author: Georg Brandl (georg.brandl) * (Python committer) Date: 2006-12-08 20:47
German output shouldn't have happened. It turns out that LANG=C isn't the correct env var to force English output, now using LC_ALL=C in rev. 52970, 52971 (2.5).
msg51260 - (view) Author: ascotan (ascotan) Date: 2007-03-21 15:36
This problem popped up in the python2.5 tarball that is publicly available through python.org when I was building on a 64-bit linux machine. The quotations are unbalanced still in the Makefile producing a compiler error. 
msg51261 - (view) Author: Georg Brandl (georg.brandl) * (Python committer) Date: 2007-03-23 18:00
The fix wasn't in 2.5, but it will be in 2.5.1.
History
Date User Action Args
2022-04-11 14:56:20adminsetgithub: 44133
2006-10-15 19:33:35schmallercreate