Patchwork [1/1] systemd: fix do_compile failed in parallel builds with system's make 3.28

login
register
mail settings
Submitter Hongxu Jia
Date April 25, 2013, 8:16 a.m.
Message ID <6471223fe7c0d17e2a3209b58f1b1ebdba165a9f.1366802026.git.hongxu.jia@windriver.com>
Download mbox | patch
Permalink /patch/48853/
State New
Headers show

Comments

Hongxu Jia - April 25, 2013, 8:16 a.m.
The error log:
...
./x86_64-poky-linux-libtool --mode=execute x86_64-poky-linux-objcopy -O binary -j introspect.Target systemd org.freedesktop.systemd1.Target.xml.tmp && \
        x86_64-poky-linux-strings org.freedesktop.systemd1.Target.xml.tmp | gawk -f /buildarea2/hongxujia/build-20130417-systemd-exlusive-multilib/tmp/work/x86_64-poky-linux/systemd/1_199-r5/systemd-199/introspect.awk | \
        x86_64-poky-linux-cpp  --sysroot=/buildarea2/hongxujia/build-20130417-systemd-exlusive-multilib/tmp/sysroots/qemux86-64    -m64 -P -O2 -pipe -g -feliminate-unused-debug-types -I/buildarea2/hongxujia/build-20130417-systemd-exlusive-multilib/tmp/sysroots/qemux86-64/usr/include/dbus-1.0 -I/buildarea2/hongxujia/build-20130417-systemd-exlusive-multilib/tmp/sysroots/qemux86-64/usr/lib/dbus-1.0/include   -imacros dbus/dbus-protocol.h -o org.freedesktop.systemd1.Target.xml - && rm org.freedesktop.systemd1.Target.xml.tmp
x86_64-poky-linux-objcopy: 'systemd': No such file
make[2]: *** [org.freedesktop.systemd1.Manager.xml] Error 1
make[2]: *** Waiting for unfinished jobs....
x86_64-poky-linux-objcopy: 'systemd': No such file
make[2]: *** [org.freedesktop.systemd1.Job.xml] Error 1
x86_64-poky-linux-objcopy: 'systemd': No such file
make[2]: *** [org.freedesktop.systemd1.Unit.xml] Error 1
x86_64-poky-linux-objcopy: 'systemd': No such file
make[2]: *** [org.freedesktop.systemd1.Socket.xml] Error 1
x86_64-poky-linux-objcopy: 'systemd': No such file
make[2]: *** [org.freedesktop.systemd1.Target.xml] Error 1
x86_64-poky-linux-objcopy: 'systemd': No such file
make[2]: *** [org.freedesktop.systemd1.Service.xml] Error 1
x86_64-poky-linux-objcopy: 'systemd': No such file
make[2]: *** [org.freedesktop.systemd1.Timer.xml] Error 1
...

1, The error is about parallel make race, see:
http://savannah.gnu.org/bugs/?30653

2, The system's make 3.28 didn't add patch to fix this defect,
but Yocto's make 3.28 has fixed. See oe-core:
meta/recipes-devtools/make/make-3.82/intermediate-target-bugfix.patch

3, Add `make-native' to systemd's `DEPENDS' to use Yocto's make rather
than system's to compile systemd.

[YOCTO #4410]

Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
---
 meta/recipes-core/systemd/systemd_199.bb |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
Ross Burton - April 25, 2013, 9:54 a.m.
On 25 April 2013 09:16, Hongxu Jia <hongxu.jia@windriver.com> wrote:
> 3, Add `make-native' to systemd's `DEPENDS' to use Yocto's make rather
> than system's to compile systemd.

NACK.

Installing make-native during a build will lead to races over the make
binary, causing strange and non-obvious build failures.

A unpatched 3.82 in certain distros (F16 is the only culprit that I'm
aware of) is a known issue and we'll be adding to the release notes
that if you have a broken make, run "bitbake make-native" *first*.

Opensuse 12.1 has the patches required to fix this
(https://build.opensuse.org/package/show?package=make&project=openSUSE%3A12.1%3AUpdate,
make-parallel-build.patch, added 5 weeks ago) so please update your
distro and this will fix itself.

I'm also told that 12.1 will be EOL in 21 days from now, so you should
consider upgrading to 12.3.

Ross
Hongxu Jia - April 26, 2013, 1:16 a.m.
On 04/25/2013 05:54 PM, Burton, Ross wrote:
> On 25 April 2013 09:16, Hongxu Jia <hongxu.jia@windriver.com> wrote:
>> 3, Add `make-native' to systemd's `DEPENDS' to use Yocto's make rather
>> than system's to compile systemd.
> NACK.
>
> Installing make-native during a build will lead to races over the make
> binary, causing strange and non-obvious build failures.
>
> A unpatched 3.82 in certain distros (F16 is the only culprit that I'm
> aware of) is a known issue and we'll be adding to the release notes
> that if you have a broken make, run "bitbake make-native" *first*.
>
> Opensuse 12.1 has the patches required to fix this
> (https://build.opensuse.org/package/show?package=make&project=openSUSE%3A12.1%3AUpdate,
> make-parallel-build.patch, added 5 weeks ago) so please update your
> distro and this will fix itself.
>
> I'm also told that 12.1 will be EOL in 21 days from now, so you should
> consider upgrading to 12.3.
>
> Ross
Got it

Hongxu

Patch

diff --git a/meta/recipes-core/systemd/systemd_199.bb b/meta/recipes-core/systemd/systemd_199.bb
index 159dfd8..71839c2 100644
--- a/meta/recipes-core/systemd/systemd_199.bb
+++ b/meta/recipes-core/systemd/systemd_199.bb
@@ -9,9 +9,9 @@  LIC_FILES_CHKSUM = "file://LICENSE.GPL2;md5=751419260aa954499f7abaabaa882bbe \
 PROVIDES = "udev"
 
 PE = "1"
-PR = "r3"
+PR = "r4"
 
-DEPENDS = "kmod docbook-sgml-dtd-4.1-native intltool-native gperf-native acl readline dbus libcap libcgroup tcp-wrappers glib-2.0"
+DEPENDS = "kmod docbook-sgml-dtd-4.1-native intltool-native gperf-native acl readline dbus libcap libcgroup tcp-wrappers glib-2.0 make-native"
 DEPENDS += "${@base_contains('DISTRO_FEATURES', 'pam', 'libpam', '', d)}"
 
 SECTION = "base/shell"