Message132440
| 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:36 | dmalcolm | set | recipients:
+ dmalcolm |
| 2011年03月28日 22:41:36 | dmalcolm | set | messageid: <1301352096.18.0.757647939561.issue11706@psf.upfronthosting.co.za> |
| 2011年03月28日 22:41:34 | dmalcolm | link | issue11706 messages |
| 2011年03月28日 22:41:34 | dmalcolm | create |
|