Workaround for missing yacc/lex targets#6
Merged
onelson merged 1 commit intoonelson:masterfrom Sep 28, 2022
Merged
Conversation
Owner
|
@anrdnet thanks for the incredible detective work! I looked at this repeatedly and more or less figured the only thing I could do to improve this would be to unravel the jq build entirely so I could pare it down somehow. I'll take another look with fresh eyes but certainly this workaround is better than the status quo. Maybe there's an improvement that can be discovered before cutting the next release. |
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.
We have very consistently run into #1 in our CI environment, and I think I have a partial explanation and workaround.
Upstream uses code generation for some C-files in the repository, but since the checked in files are always up to date there's no need for users to update them. This is the reason "maintainer-mode" exists which stubs these rules when disabled. The stub rules can easily be spotted during build since they print "NOT building lexer.c!" or "NOT building parser.c!" respectively.
In our CI environment we always get the error from #1 whenever one of the stub rules run. The reason the failure is uncommon is that usually the
mtimeof the C-file and its source is identical, makingmakeskip the rule altogether. This is only a partial explanation since I don't know why the build fails when the stub rule is triggered or why this ordering ofmtimeis so uncommon in other environments.The workaround is to make sure the C-files are always newer than the files they're built from. I realize it's not the cleanest workaround so feel free to come up with something better, but this hack has been working for us.