app-admin/sysklogd: "Fixed" parallel build issue
authorLars Wendler <polynomial-c@gentoo.org>
Mon, 9 Dec 2019 10:55:38 +0000 (11:55 +0100)
committerLars Wendler <polynomial-c@gentoo.org>
Mon, 9 Dec 2019 10:56:02 +0000 (11:56 +0100)
Closes: https://bugs.gentoo.org/701894
Package-Manager: Portage-2.3.81, Repoman-2.3.20
Signed-off-by: Lars Wendler <polynomial-c@gentoo.org>
app-admin/sysklogd/files/sysklogd-2.0.3-no_parallel_build.patch [new file with mode: 0644]
app-admin/sysklogd/sysklogd-2.0.3.ebuild

diff --git a/app-admin/sysklogd/files/sysklogd-2.0.3-no_parallel_build.patch b/app-admin/sysklogd/files/sysklogd-2.0.3-no_parallel_build.patch
new file mode 100644 (file)
index 0000000..fa0f96c
--- /dev/null
@@ -0,0 +1,40 @@
+From 9cf1f97cef04fed81c2407f7207795d7592ccb96 Mon Sep 17 00:00:00 2001
+From: Joachim Nilsson <troglobit@gmail.com>
+Date: Fri, 6 Dec 2019 18:19:05 +0100
+Subject: [PATCH] Fix nasty parallel build problem reported by Gentoo and
+ Westermo
+
+Independently of each other both the Gentoo project and Westermo found
+an issue with massively parallel builds on monster-core-machines.  At
+Westermo there are 40 core Xeon monsters that stumble when building
+sysklogd.
+
+The Gentoo bug report is here:
+
+    https://bugs.gentoo.org/701894
+
+The problem stems from strlcat.c and strlcpy.c being used for both
+the libcompat convenience library built for libsyslog and als for
+syslogd when the system does not have either of the APIs in libc,
+i.e. most Linux systems with GLIBC or musl libc.
+
+I can either rewrite the Makefile.am files to handle dependencies
+better, or we just disable parallel build like this patch. There's
+too few source files to gain anything from parallel build anyway.
+
+Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
+---
+ Makefile.am | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/Makefile.am b/Makefile.am
+index c4cc80f..7e2b854 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -46,3 +46,6 @@ release: distcheck
+ # Workaround for systemd unit file duing distcheck
+ DISTCHECK_CONFIGURE_FLAGS = --with-systemd=$$dc_install_base/$(systemd) --with-klogd
++# Disable parallel build in top Makefile, we might otherwise get a very
++# bizarre build problem with strlcpy.o in libcompat and for syslogd.
++.NOTPARALLEL:
index 9ebf2a750136258b13d5e8a6e34f6855e6544ef6..be89e5f845c6c1391a3e2b05f360d161e5c7892b 100644 (file)
@@ -3,7 +3,7 @@
 
 EAPI=7
 
-inherit flag-o-matic systemd toolchain-funcs
+inherit autotools flag-o-matic systemd toolchain-funcs
 
 DESCRIPTION="Standard log daemons"
 HOMEPAGE="https://troglobit.com/sysklogd.html https://github.com/troglobit/sysklogd"
@@ -25,11 +25,20 @@ RDEPEND="${DEPEND}"
 
 DOCS=( ChangeLog.md README.md )
 
+PATCHES=(
+       "${FILESDIR}"/${P}-no_parallel_build.patch #701894
+)
+
 pkg_setup() {
        append-lfs-flags
        tc-export CC
 }
 
+src_prepare() {
+       default
+       eautoreconf
+}
+
 src_configure() {
        local myeconfargs=(
                --runstatedir="${EPREFIX}"/run