homepage

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.

Author dmalcolm
Recipients dmalcolm
Date 2011年03月28日.22:41:34
SpamBayes Score 5.551115e-17
Marked as misclassified No
Message-id <1301352096.18.0.757647939561.issue11706@psf.upfronthosting.co.za>
In-reply-to
Content
With hg/mercurial 0.9.3, the build of CPython fails with this error:
gcc -pthread -c -fno-strict-aliasing -g -O0 -Wall -Wstrict-prototypes -I. -IInclude -I./Include -DPy_BUILD_CORE \
	 -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:37: error: missing terminating " character
./Modules/getbuildinfo.c:37: error: expected expression before ‘)’ token
./Modules/getbuildinfo.c:38: error: missing terminating " character
./Modules/getbuildinfo.c:38: error: missing terminating " character
./Modules/getbuildinfo.c:39: error: missing terminating " character
./Modules/getbuildinfo.c:39: error: missing terminating " character
./Modules/getbuildinfo.c:45: error: ‘buildinfo’ undeclared (first use in this function)
./Modules/getbuildinfo.c:45: error: (Each undeclared identifier is reported only once
./Modules/getbuildinfo.c:45: error: for each function it appears in.)
./Modules/getbuildinfo.c:49: warning: control reaches end of non-void function
./Modules/getbuildinfo.c: In function ‘_Py_hgversion’:
./Modules/getbuildinfo.c:54: error: missing terminating " character
./Modules/getbuildinfo.c:54: warning: ‘return’ with no value, in function returning non-void
./Modules/getbuildinfo.c: In function ‘_Py_hgidentifier’:
./Modules/getbuildinfo.c:61: error: missing terminating " character
./Modules/getbuildinfo.c:61: error: expected expression before ‘;’ token
./Modules/getbuildinfo.c:65: error: missing terminating " character
./Modules/getbuildinfo.c:65: error: expected expression before ‘;’ token
make: *** [Modules/getbuildinfo.o] Error 1
What's happening is that "hg id" doesn't recognize the given options, and thus the various HG macros get set to insane multi-line strings containing usage information, but without quote characters, rather than to empty string literals [1]. This means that the post-processed code isn't valid C.
The workaround presumably is to upgrade to a more recent version of mercurial. I'm reporting this here in the bug tracker in case anyone else runs into this problem.
[1] Adding "-v" to the gcc invocation demonstrates that the values being passed are:
-DHGVERSION="hg identify
print information about the working copy
 Print a short summary of the current state of the repo.
 This summary identifies the repository state using one or two parent
 hash identifiers, followed by a "+" if there are uncommitted changes
 in the working directory, followed by a list of tags for this revision.
aliases: id" -DHGTAG="hg identify
print information about the working copy
 Print a short summary of the current state of the repo.
 This summary identifies the repository state using one or two parent
 hash identifiers, followed by a "+" if there are uncommitted changes
 in the working directory, followed by a list of tags for this revision.
aliases: id" -DHGBRANCH="hg identify
print information about the working copy
 Print a short summary of the current state of the repo.
 This summary identifies the repository state using one or two parent
 hash identifiers, followed by a "+" if there are uncommitted changes
 in the working directory, followed by a list of tags for this revision.
aliases: id"
History
Date User Action Args
2011年03月28日 22:41:36dmalcolmsetrecipients: + dmalcolm
2011年03月28日 22:41:36dmalcolmsetmessageid: <1301352096.18.0.757647939561.issue11706@psf.upfronthosting.co.za>
2011年03月28日 22:41:34dmalcolmlinkissue11706 messages
2011年03月28日 22:41:34dmalcolmcreate

AltStyle によって変換されたページ (->オリジナル) /