Repository navigation
Claude/upgrade ape c library mm z gd - #722
Merged
Merged
Conversation
RULE was `^[^=#]*:[A-Z]*:', which needs two colons -- an attribute rule like `install:V:' and nothing else. An ordinary `target: prereq' header was therefore not a rule, and the recipe lines under it were never read. 870 recipe lines before, 1859 after, with 0 findings both times: the tree is clean, and 989 lines of it were being reported clean without being looked at. That is the failure mode this file's own header warns about two paragraphs down, for backquotes. Found by control rather than by reading, and only because the control was planted twice. A bare `=' put in cmd/php/mkfile's `clean:V:' was duly reported -- which looks like proof the sweep works -- and the same `=' in one of that file's `ext/...$O: $PHPSRC/....c' rules was not. Planting the break in one place would have passed. So --control now covers the three ways mk hands text to rc: an attribute rule, a plain rule and a backquoted assignment. It also checks two things that must NOT be reported, a quoted `=' and a leading assignment, since widening a pattern is how a sweep starts crying wolf. Against the old two-colon regex the control fails on exactly the plain rule and passes the other two, which is what makes it a discriminator rather than a smoke test. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WGAwvvTwDg2yknFkmZ3qzs
TSRM/TSRM.h:20 includes <main/php_config.h> while Zend and opcache include <php_config.h>, so both spellings have to work. The hand-kept headers are under cmd/php/cfg/ now, with the answers in cfg/main/php_config.h and cfg/php_config.h a one-line redirect rather than a second copy that could drift. One -Icfg answers all four spellings, and the resolution was verified on the host: TSRM.c's whole include tree preprocesses with no missing file. -I. is deliberately absent, since the build writes its objects into main/, Zend/, TSRM/ and ext/ right there and `.' on the include path would put directories named after php's source trees in front of php's source trees. It is also why the headers are under cfg/ rather than a main/ beside the mkfile: clean does `rm -rf main'. Preprocessing all 513 sources on the host then found 31 with an unresolvable include, in two clusters that both want flags rather than files. pcre2's 28 need -DHAVE_CONFIG_H -DHAVE_MEMMOVE and its own pcre2lib on the include path; Keccak's 3 need the three -D..._excluded flags, which is why KeccakP-200-SnP.h was reported missing -- it is excluded by a flag, not absent. Those flags cannot go in the global CFLAGS, and that was measured rather than feared: -DHAVE_CONFIG_H together with -I.../pcre2lib would hand ext/json/json.c, json_encoder.c and main/php_odbc_utils.c -- each `#ifdef HAVE_CONFIG_H / #include <config.h>' -- pcre2's config.h. Not a failure, a different header, silently. The 32 rules are explicit rather than patterned because mk's precedence between a general and a specific meta-rule is something I would be recalling rather than reading, there is no mk on the build host to check it with, and a wrong guess costs a round trip. Explicit beats meta-rule in every mk. All 31 were found in one host pass rather than 31 VM round trips. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WGAwvvTwDg2yknFkmZ3qzs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.