[New-bugs-announce] [issue19027] undefined symbol: _PyParser_Grammar
Armin Rigo
report at bugs.python.org
Sun Sep 15 19:20:48 CEST 2013
New submission from Armin Rigo:
It is possible to get the working copy of Python 2.7 in a state such that any attempt to do "make" ends with the error shown in the title. The working copy is perfectly valid; it is a matter of getting the wrong timestamps on the files.
(Despite the error message, this is not directly related to issue10013 or "make -j".)
I didn't try Python 3.x, but the same issue might apply.
How to reproduce:
- get your checkout, let's say in python/src/
- go to your build directory, say python/build/, and run "../src/configure; make".
- then, in the src dir, give Include/graminit.h a more recent timestamp than Python/graminit.c, for example by saying "touch Include/graminit.h" (this is the crux: a common mercurial checkout will order them the other way, just because of alphabetical ordering).
- remove your python/build/ directory completely, create it anew, and run again "../src/configure; make".
The cause of the message is that the Makefile rule for $(GRAMMAR_C) runs, because the GRAMMAR_H file is more recent; but the GRAMMAR_H rule does nothing, because the latter is already up-to-date. So the only thing that runs is "touch $(GRAMMAR_C)". But this creates an empty file build/Python/graminit.c!
----------
components: Interpreter Core
messages: 197797
nosy: arigo
priority: normal
severity: normal
status: open
title: undefined symbol: _PyParser_Grammar
type: compile error
versions: Python 2.7
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue19027>
_______________________________________
More information about the New-bugs-announce
mailing list