New submission from Graeme Winter <xia2.supp...@gmail.com>: 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.000000000 +0100 +++ ./Python-2.7.1/Modules/getbuildinfo.c 2010-05-09 15:46:46.000000000 +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))]; - const char *revision = _Py_hgversion(); + static char buildinfo[50]; + const char *revision = Py_SubversionRevision(); const char *sep = *revision ? ":" : ""; - const char *hgid = _Py_hgidentifier(); - if (!(*hgid)) - hgid = "default"; + const char *branch = Py_SubversionShortBranch(); PyOS_snprintf(buildinfo, sizeof(buildinfo), - "%s%s%s, %.20s, %.9s", hgid, sep, revision, + "%s%s%s, %.20s, %.9s", branch, sep, revision, DATE, TIME); return buildinfo; } @@ -65,21 +50,3 @@ return svnversion; /* it was interpolated, or passed on command line */ return "Unversioned directory"; } - -const char * -_Py_hgversion(void) -{ - return HGVERSION; -} - -const char * -_Py_hgidentifier(void) -{ - const char *hgtag, *hgid; - hgtag = HGTAG; - if ((*hgtag) && strcmp(hgtag, "tip") != 0) - hgid = hgtag; - else - hgid = HGBRANCH; - return hgid; -} ---------- components: Build messages: 138417 nosy: Graeme.Winter priority: normal severity: normal status: open title: Python 2.7.2 source code build (release) depends on mercurial type: compile error versions: Python 2.7 _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue12346> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com