Skip to content

fix(build): avoid parallel-make (-j) race on generated parametersDefault.xxd#2692

Open
BenjaminDEMAILLE wants to merge 1 commit into
alexdobin:masterfrom
BenjaminDEMAILLE:fix/build-xxd-parallel-race
Open

fix(build): avoid parallel-make (-j) race on generated parametersDefault.xxd#2692
BenjaminDEMAILLE wants to merge 1 commit into
alexdobin:masterfrom
BenjaminDEMAILLE:fix/build-xxd-parallel-race

Conversation

@BenjaminDEMAILLE

Copy link
Copy Markdown

Problem

parametersDefault.xxd is generated by xxd -i parametersDefault and #included by Parameters.cpp and STAR.cpp. Under parallel builds (make -jN) those objects can be compiled before xxd has 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.xxd

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 gitignores the generated source/parametersDefault.xxd artifact.

Verification

Clean make STARforMac -j16 builds reliably; make -pn confirms the order-only edge on Parameters.o/STAR.o.

Closes #2672.

🤖 Generated with Claude Code

…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>
@BenjaminDEMAILLE BenjaminDEMAILLE marked this pull request as ready for review June 26, 2026 12:56
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

make fail star.cpp

1 participant