Skip to content

Fix libjson parallel build race condition#55

Merged
laijx03 merged 1 commit intoopen64-compiler:developfrom
noafroboy:fix/libjson-parallel-build
Mar 3, 2026
Merged

Fix libjson parallel build race condition#55
laijx03 merged 1 commit intoopen64-compiler:developfrom
noafroboy:fix/libjson-parallel-build

Conversation

@noafroboy
Copy link
Contributor

Summary

  • Force serial build (-j1) for the libjson CMake sub-build and add + prefix for jobserver propagation

Motivation

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 -j1 for 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)/libjson to +$(MAKE) -j1 -C $(NATIVE_BUILD_DIR)/libjson

Test plan

  • make -j8 build completes without intermittent libjson failures
  • make -j1 build still works (no regression for serial builds)

🤖 Generated with Claude Code

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>
@laijx03 laijx03 merged commit e944c86 into open64-compiler:develop Mar 3, 2026
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.

2 participants