summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
authorChangqing Li <changqing.li@windriver.com>2020-09-28 13:25:17 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2020-09-30 15:01:51 +0100
commit86a22e0d5dfce8771b505665b0dde8655eda12f2 (patch)
treeb779116e405fdaec78fb7525cc451e76321141d3 /meta
parentceefa75ac0836bf603c1c713af2e59f68c5a4f83 (diff)
downloadpoky-86a22e0d5dfce8771b505665b0dde8655eda12f2.tar.gz
sysklogd: fix parallel build issue
fix below errors which caused by race condition: do_package: ERROR: dwarfsrcfiles failed with exit code 1 (cmd was ['dwarfsrcfiles', 'TOPDIR/tmp-glibc/work/ppc7400-oe-linux/sysklogd/2.1.2-r0/package/usr/lib/libsyslog.a']): dwarfsrcfiles: TOPDIR/tmp-glibc/work/ppc7400-oe-linux/sysklogd/2.1.2-r0/package/usr/lib/libsyslog.a: not a valid ELF file do_compile: arm-oe-linux-gnueabi-libtool: link: (cd ".libs" && rm -f "libsyslog.so.0" && ln -s "libsyslog.so.0.0.0" "libsyslog.so.0") arm-oe-linux-gnueabi-libtool: link: (cd ".libs" && rm -f "libsyslog.so" && ln -s "libsyslog.so.0.0.0" "libsyslog.so") arm-oe-linux-gnueabi-libtool: link: arm-oe-linux-gnueabi-gcc-ar cru .libs/libsyslog.a libsyslog_la-syslog.o ../lib/pidfile.o ../lib/strlcpy.o ../lib/strlcat.o TOPDIR/tmp-glibc/work/armv7vet2hf-neon-oe-linux-gnueabi/sysklogd/2.1.2-r0/recipe-sysroot-native/usr/bin/arm-oe-linux-gnueabi/../../libexec/arm-oe-linux-gnueabi/gcc/arm-oe-linux-gnueabi/10.1.0/ar: `u' modifier ignored since `D' is the default (see `U') TOPDIR/tmp-glibc/work/armv7vet2hf-neon-oe-linux-gnueabi/sysklogd/2.1.2-r0/recipe-sysroot-native/usr/bin/arm-oe-linux-gnueabi/../../libexec/arm-oe-linux-gnueabi/gcc/arm-oe-linux-gnueabi/10.1.0/ar: ../lib/strlcat.o: No such file or directory (From OE-Core rev: 3bab002a3fe4f15529a4771fb982f921a77eedfe) Signed-off-by: Changqing Li <changqing.li@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r--meta/recipes-extended/sysklogd/files/0001-Makefile.am-fixup-issue-17.patch43
-rw-r--r--meta/recipes-extended/sysklogd/sysklogd.inc1
2 files changed, 44 insertions, 0 deletions
diff --git a/meta/recipes-extended/sysklogd/files/0001-Makefile.am-fixup-issue-17.patch b/meta/recipes-extended/sysklogd/files/0001-Makefile.am-fixup-issue-17.patch
new file mode 100644
index 0000000000..96365648d7
--- /dev/null
+++ b/meta/recipes-extended/sysklogd/files/0001-Makefile.am-fixup-issue-17.patch
@@ -0,0 +1,43 @@
1From a4a472c19eaaf03cc0e70797b2d24b540d6424e1 Mon Sep 17 00:00:00 2001
2From: Changqing Li <changqing.li@windriver.com>
3Date: Wed, 3 Jun 2020 13:39:18 +0800
4Subject: [PATCH] Makefile.am: fixup issue #17
5
6only make $(LIBOBJS) depend on $(LTLIBOBJS) still have race condition,
7library like pidfile.o may be changed when compile or link for
8libsyslog_la_LIBADD, which will cause problem like below:
9
10ERROR: dwarfsrcfiles failed with exit code 1 (cmd was ['dwarfsrcfiles', /tmp/work/ppc7400-oe-linux/sysklogd/2.1.2-r0/package/usr/lib/libsyslog.a']):
11dwarfsrcfiles: tmp/work/ppc7400-oe-linux/sysklogd/2.1.2-r0/package/usr/lib/libsyslog.a: not a valid ELF file
12
13arm-oe-linux-gnueabi-libtool: link: arm-oe-linux-gnueabi-gcc -march=armv7ve -mthumb -mfpu=neon -mfloat-abi=hard --sysroot=TOPDIR/tmp-glibc/work/armv7vet2hf-neon-oe-linux-gnueabi/sysklogd/2.1.2-r0/recipe-sysroot -shared -fPIC -DPIC .libs/libsyslog_la-syslog.o ../lib/.libs/pidfile.o ../lib/.libs/strlcpy.o ../lib/.libs/strlcat.o -march=armv7ve -mthumb -mfpu=neon -mfloat-abi=hard --sysroot=TOPDIR/tmp-glibc/work/armv7vet2hf-neon-oe-linux-gnueabi/sysklogd/2.1.2-r0/recipe-sysroot -O2 -g -Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed -Wl,-soname -Wl,libsyslog.so.0 -o .libs/libsyslog.so.0.0.0
14arm-oe-linux-gnueabi-libtool: link: (cd ".libs" && rm -f "libsyslog.so.0" && ln -s "libsyslog.so.0.0.0" "libsyslog.so.0")
15arm-oe-linux-gnueabi-libtool: link: (cd ".libs" && rm -f "libsyslog.so" && ln -s "libsyslog.so.0.0.0" "libsyslog.so")
16arm-oe-linux-gnueabi-libtool: link: arm-oe-linux-gnueabi-gcc-ar cru .libs/libsyslog.a libsyslog_la-syslog.o ../lib/pidfile.o ../lib/strlcpy.o ../lib/strlcat.o
17TOPDIR/tmp-glibc/work/armv7vet2hf-neon-oe-linux-gnueabi/sysklogd/2.1.2-r0/recipe-sysroot-native/usr/bin/arm-oe-linux-gnueabi/../../libexec/arm-oe-linux-gnueabi/gcc/arm-oe-linux-gnueabi/10.1.0/ar: `u' modifier ignored since `D' is the default (see `U')
18TOPDIR/tmp-glibc/work/armv7vet2hf-neon-oe-linux-gnueabi/sysklogd/2.1.2-r0/recipe-sysroot-native/usr/bin/arm-oe-linux-gnueabi/../../libexec/arm-oe-linux-gnueabi/gcc/arm-oe-linux-gnueabi/10.1.0/ar: ../lib/strlcat.o: No such file or directory
19
20Upstream-Status: Submitted [https://github.com/troglobit/sysklogd/pull/23/commits/e684939559341cb1c6373dfc6469b59e580d80af]
21
22Signed-off-by: Changqing Li <changqing.li@windriver.com>
23---
24 src/Makefile.am | 7 ++++---
25 1 file changed, 4 insertions(+), 3 deletions(-)
26
27diff --git a/src/Makefile.am b/src/Makefile.am
28index f8a6820..f45c773 100644
29--- a/src/Makefile.am
30+++ b/src/Makefile.am
31@@ -66,6 +66,7 @@ libsyslog_la_LIBADD = $(LTLIBOBJS)
32 # ld: syslogd-syslogd.o: in function `main': syslogd.c:417: undefined
33 # reference to `__pidfile'
34 #
35-# Work around the problem by building one .o from lib at a time, this
36-# can be achieved by making LIBOBJS depend on LTLIBOBJS.
37-$(LIBOBJS): $(LTLIBOBJS)
38+# Work around the problem by make LIBOBJS depend on libsyslog.la,
39+# so that LIBOBJS/syslogd/logger will start compile after libsyslog.la
40+# is completed
41+$(LIBOBJS): $(lib_LTLIBRARIES)
42--
432.17.1
diff --git a/meta/recipes-extended/sysklogd/sysklogd.inc b/meta/recipes-extended/sysklogd/sysklogd.inc
index 2e3d9831b1..162260f000 100644
--- a/meta/recipes-extended/sysklogd/sysklogd.inc
+++ b/meta/recipes-extended/sysklogd/sysklogd.inc
@@ -12,6 +12,7 @@ inherit update-rc.d update-alternatives systemd autotools
12 12
13SRC_URI = "git://github.com/troglobit/sysklogd.git;nobranch=1 \ 13SRC_URI = "git://github.com/troglobit/sysklogd.git;nobranch=1 \
14 file://sysklogd \ 14 file://sysklogd \
15 file://0001-Makefile.am-fixup-issue-17.patch \
15 " 16 "
16S = "${WORKDIR}/git" 17S = "${WORKDIR}/git"
17 18