[OE-core] [PATCH 1/1] telepathy-mission-control: do_compile failed (race issue)

Robert Yang liezhi.yang at windriver.com
Sat Sep 14 08:49:11 UTC 2013


There might be an error when parallel build:

[snip]
Traceback (most recent call last):
  File "/path/to/tools/glib-gtypes-generator.py", line 304, in <module>
    GTypesGenerator(dom, argv[1], argv[2])()
  File "/path/to/tools/glib-gtypes-generator.py", line 295, in __call__
    file_set_contents(self.output + '.h', ''.join(self.header))
  File "/path/to/tools/libtpcodegen.py", line 42, in file_set_contents
    os.rename(filename + '.tmp', filename)
OSError: [Errno 2] No such file or directory
[snip]

This is a race issue, the _gen/gtypes.h and _gen/gtypes-body.h may
write(remove/rename) _gen/gtypes.tmp at the same time, then there would
be the error.

Use ".NOTPARALLEL: _gen/gtypes.h _gen/gtypes-body.h" will fix the
problem.

[YOCTO #5184]

Signed-off-by: Robert Yang <liezhi.yang at windriver.com>
---
 .../tmc-Makefile-fix-race.patch                    |   47 ++++++++++++++++++++
 .../telepathy/telepathy-mission-control_5.15.0.bb  |    5 ++-
 2 files changed, 51 insertions(+), 1 deletion(-)
 create mode 100644 meta/recipes-connectivity/telepathy/telepathy-mission-control/tmc-Makefile-fix-race.patch

diff --git a/meta/recipes-connectivity/telepathy/telepathy-mission-control/tmc-Makefile-fix-race.patch b/meta/recipes-connectivity/telepathy/telepathy-mission-control/tmc-Makefile-fix-race.patch
new file mode 100644
index 0000000..537e1d7
--- /dev/null
+++ b/meta/recipes-connectivity/telepathy/telepathy-mission-control/tmc-Makefile-fix-race.patch
@@ -0,0 +1,47 @@
+From 029fcd600707f25a73b0171497140dab264f56b7 Mon Sep 17 00:00:00 2001
+From: Robert Yang <liezhi.yang at windriver.com>
+Date: Sat, 14 Sep 2013 04:26:46 -0400
+Subject: [PATCH] src/Makefile.am: let _gen/gtypes.h and _gen/gtypes-body.h run serially
+
+There might be an error when parallel build:
+
+[snip]
+Traceback (most recent call last):
+  File "/path/to/tools/glib-gtypes-generator.py", line 304, in <module>
+    GTypesGenerator(dom, argv[1], argv[2])()
+  File "/path/to/tools/glib-gtypes-generator.py", line 295, in __call__
+    file_set_contents(self.output + '.h', ''.join(self.header))
+  File "/path/to/tools/libtpcodegen.py", line 42, in file_set_contents
+    os.rename(filename + '.tmp', filename)
+OSError: [Errno 2] No such file or directory
+[snip]
+
+This is a race issue, the _gen/gtypes.h and _gen/gtypes-body.h may
+write(remove/rename) _gen/gtypes.tmp at the same time, then there would
+be the error.
+
+Use ".NOTPARALLEL: _gen/gtypes.h _gen/gtypes-body.h" will fix the
+problem.
+
+Upstream-Status: Pending
+
+Signed-off-by: Robert Yang <liezhi.yang at windriver.com>
+---
+ src/Makefile.am |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/Makefile.am b/src/Makefile.am
+--- a/src/Makefile.am
++++ b/src/Makefile.am
+@@ -293,7 +293,7 @@ _gen/gtypes.h _gen/gtypes-body.h: _gen/mcd.xml \
+ 	$(AM_V_GEN)$(PYTHON) $(top_srcdir)/tools/glib-gtypes-generator.py \
+ 		$< _gen/gtypes mc
+ 
+-
++.NOTPARALLEL: _gen/gtypes.h _gen/gtypes-body.h
+ 
+ # Generated files which must be generated per "class".
+ # (Currently the only "class" is nmc4, but the new API will need "classes"
+-- 
+1.7.10.4
+
diff --git a/meta/recipes-connectivity/telepathy/telepathy-mission-control_5.15.0.bb b/meta/recipes-connectivity/telepathy/telepathy-mission-control_5.15.0.bb
index b2736ca..91159e1 100644
--- a/meta/recipes-connectivity/telepathy/telepathy-mission-control_5.15.0.bb
+++ b/meta/recipes-connectivity/telepathy/telepathy-mission-control_5.15.0.bb
@@ -6,7 +6,10 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=d8045f3b8f929c1cb29a1e3fd737b499 \
 SECTION = "libs"
 DEPENDS = "libtelepathy dbus-glib gconf libxslt-native"
 
-SRC_URI = "http://telepathy.freedesktop.org/releases/telepathy-mission-control/telepathy-mission-control-${PV}.tar.gz"
+SRC_URI = "http://telepathy.freedesktop.org/releases/telepathy-mission-control/telepathy-mission-control-${PV}.tar.gz \
+	   file://tmc-Makefile-fix-race.patch \
+	"
+
 SRC_URI[md5sum] = "0efd7d9043f6e189e8ed8111d043b52c"
 SRC_URI[sha256sum] = "88800d1b5f385e94b34721319ff4fe65c493632954d7229b36e57af5b4a7e1b5"
 
-- 
1.7.10.4




More information about the Openembedded-core mailing list