[OE-core] [PATCH] automake: fix race in parallel builds

Hongxu Jia hongxu.jia at windriver.com
Thu Jul 26 08:42:14 UTC 2018


While native building, there is a parallel failure
[snip]
|: && mkdir -p doc && ./pre-inst-env /usr/bin/env perl
../automake-1.16.1/doc/help2man --output=doc/aclocal-1.16.1
aclocal-1.16
|help2man: can't get `--help' info from aclocal-1.16
|Try `--no-discard-stderr' if option outputs to stderr
Makefile:3693: recipe for target 'doc/aclocal-1.16.1' failed
[snip]

Correct Makefile rule to fix the issue

Signed-off-by: Hongxu Jia <hongxu.jia at windriver.com>
---
 .../0001-build-fix-race-in-parallel-builds.patch   | 65 ++++++++++++++++++++++
 meta/recipes-devtools/automake/automake_1.16.1.bb  |  1 +
 2 files changed, 66 insertions(+)
 create mode 100644 meta/recipes-devtools/automake/automake/0001-build-fix-race-in-parallel-builds.patch

diff --git a/meta/recipes-devtools/automake/automake/0001-build-fix-race-in-parallel-builds.patch b/meta/recipes-devtools/automake/automake/0001-build-fix-race-in-parallel-builds.patch
new file mode 100644
index 0000000..591fce1
--- /dev/null
+++ b/meta/recipes-devtools/automake/automake/0001-build-fix-race-in-parallel-builds.patch
@@ -0,0 +1,65 @@
+From 592eb55b248a765abfc796fccb68baa3d53745ac Mon Sep 17 00:00:00 2001
+From: Hongxu Jia <hongxu.jia at windriver.com>
+Date: Thu, 26 Jul 2018 00:58:12 -0700
+Subject: [PATCH] build: fix race in parallel builds
+
+The automake-$(APIVERSION) is a hardlink of automake, if it is
+created later than update_mans executing, there is a failure
+[snip]
+|: && mkdir -p doc && ./pre-inst-env /usr/bin/env perl
+../automake-1.16.1/doc/help2man --output=doc/aclocal-1.16.1
+aclocal-1.16
+|help2man: can't get `--help' info from aclocal-1.16
+|Try `--no-discard-stderr' if option outputs to stderr
+Makefile:3693: recipe for target 'doc/aclocal-1.16.1' failed
+[snip]
+
+The automake_script is required by update_mans and update_mans
+invokes automake-$(APIVERSION) rather than automake to generate
+doc, so we should assign `automake-$(APIVERSION)' to automake_script.
+
+The same reason to tweak aclocal_script.
+
+* bin/local.mk: correct automake_script/aclocal_script
+
+Upstream-Status: Submitted [automake-patches at gnu.org]
+
+Signed-off-by: Hongxu Jia <hongxu.jia at windriver.com>
+---
+ Makefile.in  | 4 ++--
+ bin/local.mk | 4 ++--
+ 2 files changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/Makefile.in b/Makefile.in
+index c3e934c..7cddb8d 100644
+--- a/Makefile.in
++++ b/Makefile.in
+@@ -691,8 +691,8 @@ bin_SCRIPTS = bin/automake bin/aclocal
+ # Used by maintainer checks and such.
+ automake_in = $(srcdir)/bin/automake.in
+ aclocal_in = $(srcdir)/bin/aclocal.in
+-automake_script = bin/automake
+-aclocal_script = bin/aclocal
++automake_script = bin/automake-$(APIVERSION)
++aclocal_script  = bin/aclocal-$(APIVERSION)
+ AUTOMAKESOURCES = $(automake_in) $(aclocal_in)
+ info_TEXINFOS = doc/automake.texi doc/automake-history.texi
+ doc_automake_TEXINFOS = doc/fdl.texi
+diff --git a/bin/local.mk b/bin/local.mk
+index 97b38db..058ca99 100644
+--- a/bin/local.mk
++++ b/bin/local.mk
+@@ -31,8 +31,8 @@ CLEANFILES += \
+ # Used by maintainer checks and such.
+ automake_in = $(srcdir)/%D%/automake.in
+ aclocal_in  = $(srcdir)/%D%/aclocal.in
+-automake_script = %D%/automake
+-aclocal_script  = %D%/aclocal
++automake_script = %D%/automake-$(APIVERSION)
++aclocal_script  = %D%/aclocal-$(APIVERSION)
+ 
+ AUTOMAKESOURCES = $(automake_in) $(aclocal_in)
+ TAGS_FILES += $(AUTOMAKESOURCES)
+-- 
+2.7.4
+
diff --git a/meta/recipes-devtools/automake/automake_1.16.1.bb b/meta/recipes-devtools/automake/automake_1.16.1.bb
index c64ee44..d82eed3 100644
--- a/meta/recipes-devtools/automake/automake_1.16.1.bb
+++ b/meta/recipes-devtools/automake/automake_1.16.1.bb
@@ -25,6 +25,7 @@ SRC_URI += "file://python-libdir.patch \
             file://new_rt_path_for_test-driver.patch \
             file://automake-replace-w-option-in-shebangs-with-modern-use-warnings.patch \
             file://0001-automake-Add-default-libtool_tag-to-cppasm.patch \
+            file://0001-build-fix-race-in-parallel-builds.patch \
             "
 
 SRC_URI[md5sum] = "83cc2463a4080efd46a72ba2c9f6b8f5"
-- 
2.7.4




More information about the Openembedded-core mailing list