fix(build): avoid parallel-make (-j) race on generated parametersDefault.xxd#2692
Open
BenjaminDEMAILLE wants to merge 1 commit into
Open
fix(build): avoid parallel-make (-j) race on generated parametersDefault.xxd#2692BenjaminDEMAILLE wants to merge 1 commit into
BenjaminDEMAILLE wants to merge 1 commit into
Conversation
…xd (alexdobin#2672) parametersDefault.xxd is generated by 'xxd -i parametersDefault' and #include'd by Parameters.cpp and STAR.cpp. Under 'make -jN' those two objects could be compiled before xxd had produced the header, causing intermittent build failures. Add an order-only prerequisite '$(OBJECTS): | parametersDefault.xxd' so the header is always generated before any object is compiled. Order-only avoids forcing a full rebuild when only the header timestamp changes; the real content dependency for Parameters.o/STAR.o is still supplied by Depend.list. Also gitignore the generated source/parametersDefault.xxd build artifact. Verified with a clean 'make STARforMac -j16' build. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This was referenced Jun 26, 2026
birdingman0626
added a commit
to birdingman0626/STAR-Cross
that referenced
this pull request
Jun 29, 2026
Under make -jN, Parameters.o/STAR.o could be compiled before xxd had generated the parametersDefault.xxd header they #include, causing intermittent build failures (upstream issue alexdobin#2672). Add an order-only prerequisite so the header is always generated before any object is compiled, without forcing a rebuild on timestamp-only changes. Ported from upstream PR alexdobin#2692 (.gitignore entry already present). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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.
Problem
parametersDefault.xxdis generated byxxd -i parametersDefaultand#included byParameters.cppandSTAR.cpp. Under parallel builds (make -jN) those objects can be compiled beforexxdhas produced the header, causing intermittent build failures.Fix
Add an order-only prerequisite so the generated header always exists before any object is compiled:
$(OBJECTS): | parametersDefault.xxdOrder-only (
|) avoids forcing a full rebuild when only the header timestamp changes; the real content dependency forParameters.o/STAR.ois still supplied byDepend.list. Also gitignores the generatedsource/parametersDefault.xxdartifact.Verification
Clean
make STARforMac -j16builds reliably;make -pnconfirms the order-only edge onParameters.o/STAR.o.Closes #2672.
🤖 Generated with Claude Code