Issue 19027: undefined symbol: _PyParser_Grammar (original) (raw)
Issue19027
Created on 2013-09-15 17:20 by arigo, last changed 2022-04-11 14:57 by admin. This issue is now closed.
Messages (5) | ||
---|---|---|
msg197797 - (view) | Author: Armin Rigo (arigo) * ![]() |
Date: 2013-09-15 17:20 |
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 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 (GRAMMARC)runs,becausetheGRAMMARHfileismorerecent;buttheGRAMMARHruledoesnothing,becausethelatterisalreadyup−to−date.Sotheonlythingthatrunsis"touch(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 (GRAMMARC)runs,becausetheGRAMMARHfileismorerecent;buttheGRAMMARHruledoesnothing,becausethelatterisalreadyup−to−date.Sotheonlythingthatrunsis"touch(GRAMMAR_C)". But this creates an empty file build/Python/graminit.c! | ||
msg199803 - (view) | Author: Ned Deily (ned.deily) * ![]() |
Date: 2013-10-13 21:07 |
It looks like this was caused by the changes for Issue14321 to not run pgen for cross builds. | ||
msg199824 - (view) | Author: Ned Deily (ned.deily) * ![]() |
Date: 2013-10-13 23:40 |
BTW, this can be worked around (for non cross-builds at least) by running "make touch" on the source directory, e.g.: make -C python/src -f python/build/Makefile touch But it should be fixed. Doko? | ||
msg270291 - (view) | Author: Martin Panter (martin.panter) * ![]() |
Date: 2016-07-13 02:55 |
The same $(GRAMMAR_H) dependency and touch command still exists today, so I suspect this is still valid (though I didn’t try to reproduce it). I think we need to figure out if you can write a proper makefile rule that handles a single command that updates two targets at once. FWIW I don’t think “make touch” will currently help on Python 2, because it only affects two files that are generated by pgen (see also my comment in Issue 19142). | ||
msg400468 - (view) | Author: Irit Katriel (iritkatriel) * ![]() |
Date: 2021-08-28 10:58 |
We no longer have GRAMMAR_H or _PyParser_Grammar in the code. |
History | |||
---|---|---|---|
Date | User | Action | Args |
2022-04-11 14:57:51 | admin | set | github: 63227 |
2021-08-28 10:58:53 | iritkatriel | set | status: open -> closednosy: + iritkatrielmessages: + resolution: out of datestage: needs patch -> resolved |
2016-07-13 02:55:17 | martin.panter | set | nosy: + martin.pantermessages: + stage: needs patch |
2013-10-13 23:40:50 | ned.deily | set | messages: + |
2013-10-13 21:07:10 | ned.deily | set | nosy: + dokomessages: + |
2013-10-13 20:50:54 | ned.deily | set | nosy: + ned.deilycomponents: + Buildversions: + Python 3.3, Python 3.4 |
2013-09-15 19:38:11 | Arfrever | set | nosy: + Arfrever |
2013-09-15 17:20:48 | arigo | create |