Skip to content

Commit 6e7b0a3

Browse files
committed
Add note about ext/tokenizer bug
When building with larg(er) number of CPU cores (32+) there is an error in Autotools every once in a while.
1 parent b40e5a2 commit 6e7b0a3

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

docs/cmake/differences.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,3 +141,23 @@ build system:
141141
142142
* The libmbfl configuration header (`config.h`).
143143
See: https://github.com/php/php-src/pull/13713
144+
145+
* Building with large number of CPU cores might emit errors.
146+
147+
When building PHP with Autotools in parallel with large number of CPU cores
148+
(`make -j32`) there might happen error like this with very small
149+
reproducibility:
150+
151+
```
152+
...tokenizer_data.c:22:10: fatal error: zend_language_parser.h: No such file
153+
or directory
154+
```
155+
156+
There might be some misconfigured dependencies between some files in Makefile.
157+
For example, the `Zend/zend_language_parser.h` and all other Zend language
158+
parser files must be generated before the `ext/tokenizer` files start to
159+
build, otherwise error happens because Bison might generate header with slight
160+
delay.
161+
162+
In CMake, this is bypassed by having entire extension dependent on the
163+
`Zend::Zend` target (which also includes the parser and scanner).

0 commit comments

Comments
 (0)