[issue12346] Python 2.7.2 source code build (release) depends on mercurial

2011-06-16 Thread Graeme Winter

New submission from Graeme Winter :

Trying to build 2.7.2 from source on RHEL5 32 bit get errors:

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 hg id -i .`\"" \
  -DHGTAG="\"`LC_ALL=C hg id -t .`\"" \
  -DHGBRANCH="\"`LC_ALL=C hg id -b .`\"" \
  -o Modules/getbuildinfo.o ./Modules/getbuildinfo.c
hg identify: option -i not recognized
hg identify: option -t not recognized
hg identify: option -b not recognized
./Modules/getbuildinfo.c: In function ‘Py_GetBuildInfo’:
./Modules/getbuildinfo.c:45: error: missing terminating " character
./Modules/getbuildinfo.c:45: error: expected expression before ‘)’ token
./Modules/getbuildinfo.c:46: error: missing terminating " character
./Modules/getbuildinfo.c:46: error: missing terminating " character
./Modules/getbuildinfo.c:47: error: missing terminating " character
./Modules/getbuildinfo.c:47: error: missing terminating " character
./Modules/getbuildinfo.c:53: error: ‘buildinfo’ undeclared (first use in this 
function)
./Modules/getbuildinfo.c:53: error: (Each undeclared identifier is reported 
only once
./Modules/getbuildinfo.c:53: error: for each function it appears in.)
./Modules/getbuildinfo.c: In function ‘_Py_hgversion’:
./Modules/getbuildinfo.c:72: error: missing terminating " character
./Modules/getbuildinfo.c:72: warning: ‘return’ with no value, in function 
returning non-void
./Modules/getbuildinfo.c: In function ‘_Py_hgidentifier’:
./Modules/getbuildinfo.c:79: error: missing terminating " character
./Modules/getbuildinfo.c:79: error: expected expression before ‘;’ token
./Modules/getbuildinfo.c:83: error: missing terminating " character
./Modules/getbuildinfo.c:83: error: expected expression before ‘;’ token
make: *** [Modules/getbuildinfo.o] Error 1
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 hg id -i .`\"" \
  -DHGTAG="\"`LC_ALL=C hg id -t .`\"" \
  -DHGBRANCH="\"`LC_ALL=C hg id -b .`\"" \
  -o Modules/getbuildinfo.o ./Modules/getbuildinfo.c
hg identify: option -i not recognized
hg identify: option -t not recognized
hg identify: option -b not recognized
./Modules/getbuildinfo.c: In function ‘Py_GetBuildInfo’:
./Modules/getbuildinfo.c:45: error: missing terminating " character
./Modules/getbuildinfo.c:45: error: expected expression before ‘)’ token
./Modules/getbuildinfo.c:46: error: missing terminating " character
./Modules/getbuildinfo.c:46: error: missing terminating " character
./Modules/getbuildinfo.c:47: error: missing terminating " character
./Modules/getbuildinfo.c:47: error: missing terminating " character
./Modules/getbuildinfo.c:53: error: ‘buildinfo’ undeclared (first use in this 
function)
./Modules/getbuildinfo.c:53: error: (Each undeclared identifier is reported 
only once
./Modules/getbuildinfo.c:53: error: for each function it appears in.)
./Modules/getbuildinfo.c: In function ‘_Py_hgversion’:
./Modules/getbuildinfo.c:72: error: missing terminating " character
./Modules/getbuildinfo.c:72: warning: ‘return’ with no value, in function 
returning non-void
./Modules/getbuildinfo.c: In function ‘_Py_hgidentifier’:
./Modules/getbuildinfo.c:79: error: missing terminating " character
./Modules/getbuildinfo.c:79: error: expected expression before ‘;’ token
./Modules/getbuildinfo.c:83: error: missing terminating " character
./Modules/getbuildinfo.c:83: error: expected expression before ‘;’ token
make: *** [Modules/getbuildinfo.o] Error 1

Would assume it is bad form for a release source bundle to depend on mercurial?

Diffs against version of getbuildinfo.c from 2.7.1 indicate that this is a new 
dependency:

$ find . -name 'getbuildinfo.c'  | xargs diff -u
--- ./Python-2.7.2/Modules/getbuildinfo.c   2011-06-11 16:46:27.0 
+0100
+++ ./Python-2.7.1/Modules/getbuildinfo.c   2010-05-09 15:46:46.0 
+0100
@@ -28,30 +28,15 @@
 #define SVNVERSION "$WCRANGE$$WCMODS?M:$"
 #endif

-/* XXX Only unix build process has been tested */
-#ifndef HGVERSION
-#define HGVERSION ""
-#endif
-#ifndef HGTAG
-#define HGTAG ""
-#endif
-#ifndef HGBRANCH
-#define HGBRANCH ""
-#endif
-
 const char *
 Py_GetBuildInfo(void)
 {
-static char buildinfo[50 + sizeof(HGVERSION) +
-  ((sizeof(HGTAG) > sizeof(HGBRANCH)) ?
-   sizeof(HGTAG) : sizeof(HGBRANCH

[issue12346] Python 2.7.2 source code build (release) depends on mercurial

2011-06-16 Thread Graeme Winter

Graeme Winter  added the comment:

Some more information:

It has picked up that I have mercurial installed:


[gw56@ws050 Python-2.7.2_cci]$ cat config.log | grep HG
ac_cv_prog_HAS_HG=found
HAS_HG='found'
HGBRANCH='hg id -b $(srcdir)'
HGTAG='hg id -t $(srcdir)'
HGVERSION='hg id -i $(srcdir)'


however it happens to be rather an old version:


[gw56@ws050 Python-2.7.2_cci]$ hg --version
Mercurial Distributed SCM (version 0.9.3)

Copyright (C) 2005, 2006 Matt Mackall 
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.


so does not recognise the command-line options that you are using.

--

___
Python tracker 
<http://bugs.python.org/issue12346>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com