Fix libjson parallel build race condition#55
Merged
laijx03 merged 1 commit intoopen64-compiler:developfrom Mar 3, 2026
Merged
Conversation
Force serial build (-j1) for the libjson CMake sub-build and add '+' prefix to properly propagate the jobserver. The libjson CMake-based build has race conditions under parallel make that cause intermittent link failures. Forcing -j1 for this small sub-build is a minimal fix with negligible impact on overall build time. Co-Authored-By: Claude Opus 4.6 <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.
Summary
-j1) for the libjson CMake sub-build and add+prefix for jobserver propagationMotivation
The libjson target invokes CMake internally, which has race conditions with GNU Make's jobserver under parallel builds (
make -j8). This causes intermittent link failures during the libjson build step.Forcing
-j1for this small sub-build eliminates the race with negligible impact on overall build time. The+prefix ensures proper jobserver propagation to the recursive make call.Changes
Makefile.in: Change$(MAKE) -C $(NATIVE_BUILD_DIR)/libjsonto+$(MAKE) -j1 -C $(NATIVE_BUILD_DIR)/libjsonTest plan
make -j8 buildcompletes without intermittent libjson failuresmake -j1 buildstill works (no regression for serial builds)🤖 Generated with Claude Code