Skip to content

Commit

Permalink
protobuf-c: disable parallelism to avoid race condition
Browse files Browse the repository at this point in the history
Unfortunately 489d3b4 did not completely
fix the problem - if you try cleaning and rebuilding protobuf-c-native it
doesn't take long to reproduce the issue on a 32-core machine. I spent
some time trying to debug this but failed, there is still a race between
generating t.test-full.pb.h and compiling cxx_generate_packed_data.c
despite BUILT_SOURCES and explicit dependencies. I even tried converting
the multiple target rules to use grouped targets (&:), that didn't fix it
either. Disabling parallelism as a workaround only costs ~20s and it
turns out that upstream is switching to Meson soon anyway:

  protobuf-c/protobuf-c#340

Signed-off-by: Paul Eggleton <paul.eggleton@linux.microsoft.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
  • Loading branch information
bluelightning authored and kraj committed Jun 15, 2020
1 parent 12072f8 commit 3251fe2
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions meta-oe/recipes-devtools/protobuf/protobuf-c_1.3.3.bb
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,11 @@ S = "${WORKDIR}/git"

inherit autotools pkgconfig

# After several fix attempts there is still a race between generating
# t.test-full.pb.h and compiling cxx_generate_packed_data.c despite
# BUILT_SOURCES and explicit dependencies.
PARALLEL_MAKE = ""

PACKAGE_BEFORE_PN = "${PN}-compiler"

FILES_${PN}-compiler = "${bindir}"
Expand Down

0 comments on commit 3251fe2

Please sign in to comment.