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.

classification
Title: parallel make test or make install can fail building pgen when configure --enable-optimizations is used
Type: compile error Stage:
Components: Build Versions: Python 3.7, Python 3.6, Python 2.7
process
Status: open Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: gregory.p.smith, xiang.zhang
Priority: normal Keywords:

Created on 2017-01-25 02:30 by gregory.p.smith, last changed 2022-04-11 14:58 by admin.

Messages (3)
msg286223 - (view) Author: Gregory P. Smith (gregory.p.smith) * (Python committer) Date: 2017-01-25 02:30
If you do a make -j12 test or make install before having run a separate 'make all' the build _can_ fail trying to build pgen.  (it seems to be parallel make related, it won't always fail)

Even if you have run a separate 'make all', the make test and make install steps are likely to rebuild a ton of stuff and rerun the profile generation stage.  Making the suggested "make, make test, make install" process effectively useless or at least take 3x longer than it should.

something along the lines of:

oss/cpython$ make -j12 install
gcc -pthread -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes  Parser/acceler.o Parser/grammar1.o Parser/listnode.o Parser/node.o Parser/parser.o Parser/parsetok.o Parser/bitset.o Parser/metagrammar.o Parser/firstsets.o Parser/grammar.o Parser/pgen.o Objects/obmalloc.o Python/mysnprintf.o Python/pyctype.o Parser/tokenizer_pgen.o Parser/printgrammar.o Parser/pgenmain.o -lpthread -ldl  -lutil -o Parser/pgen
Parser/grammar1.o: In function `PyGrammar_LabelRepr':
/home/gps/oss/cpython/build27/../2.7/Parser/grammar1.c:35: undefined reference to `__gcov_indirect_call_profiler'
Parser/grammar1.o: In function `PyGrammar_FindDFA':
/home/gps/oss/cpython/build27/../2.7/Parser/grammar1.c:13: undefined reference to `__gcov_indirect_call_profiler'
Parser/grammar1.o:(.data+0x80): undefined reference to `__gcov_merge_add'
Parser/grammar1.o: In function `_GLOBAL__sub_I_65535_0_PyGrammar_FindDFA':
/home/gps/oss/cpython/build27/../2.7/Parser/grammar1.c:57: undefined reference to `__gcov_init'
... a bunch more similar errors omitted ...
Parser/pgenmain.o: In function `_GLOBAL__sub_I_65535_0_Py_Exit':
/home/gps/oss/cpython/build27/../2.7/Parser/pgenmain.c:173: undefined reference to `__gcov_init'
collect2: error: ld returned 1 exit status
make: *** [Parser/pgen] Error 1
make: *** Waiting for unfinished jobs....
Parser/pgen ../2.7/Grammar/Grammar Include/graminit.h Python/graminit.c
make[2]: Parser/pgen: Command not found
make[2]: *** [Include/graminit.h] Error 127
make[2]: *** Waiting for unfinished jobs....
make[2]: Leaving directory `/home/gps/oss/cpython/build27'
make[1]: *** [build_all_generate_profile] Error 2
make[1]: Leaving directory `/home/gps/oss/cpython/build27'
make: *** [profile-opt] Error 2
msg286224 - (view) Author: Xiang Zhang (xiang.zhang) * (Python committer) Date: 2017-01-25 02:35
> Making the suggested "make, make test, make install" process effectively useless or at least take 3x longer than it should.

About this, I once opened #29243.
msg286228 - (view) Author: Gregory P. Smith (gregory.p.smith) * (Python committer) Date: 2017-01-25 06:18
great, the issue you filed covers my second paragraph comment which really should be its own issue. :)
History
Date User Action Args
2022-04-11 14:58:42adminsetgithub: 73551
2017-01-25 06:18:45gregory.p.smithsetmessages: + msg286228
2017-01-25 02:35:00xiang.zhangsetnosy: + xiang.zhang
messages: + msg286224
2017-01-25 02:30:14gregory.p.smithcreate