Skip to contentSkip to conversation

protobuf-c: disable parallelism to avoid race condition

PATCH New [email protected] 1 participant 1 message Jun 15, 2020

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 protobuf-c: disable parallelism to avoid race condition

Unfortunately 489d3b4b932ee8016d792341f8ea5836a9522cd4 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:

https://github.com/protobuf-c/protobuf-c/pull/340

---
 meta-oe/recipes-devtools/protobuf/protobuf-c_1.3.3.bb | 5 +++++
 1 file changed, 5 insertions(+)
meta-oe/recipes-devtools/protobuf/protobuf-c_1.3.3.bb +5 -0
index bb8aecd..6fef0be 100644
@@ -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}"
Signature · 1 line
1.8.3.1