collectd: fix parallel build issues
PATCH 1/1 collectd: fix parallel build issues
For version 5.5.x a reorganization was made and some common funtionality was moved to libraries, however proper dependency accounting isn't handled in the Makefile thus causing build breakage on some parallel builds. Fixes:
http://autobuild.buildroot.net/results/a5e/a5e6891e9ea66ac8216d3302da3702770ef7247b/
--- ...-libavltree-libcommon-libheap-dependencies.patch | 21 +++++++++++++++++++++ package/collectd/collectd.mk | 2 ++ 2 files changed, 23 insertions(+) create mode 100644 package/collectd/0001-build-add-libavltree-libcommon-libheap-dependencies.patch
package/collectd/0001-build-add-libavltree-libcommon-libheap-dependencies.patch new file +21 -0
@@ -0,0 +1,21 @@ +build: add libavltree, libcommon & libheap dependencies + +Otherwise it can break on very parallel builds since collectd link time +arrives before one or more of these were built. + +Status: requested github pull (patch slightly different for newer rev). + +Signed-off-by: Gustavo Zacarias <[email protected]> + +diff -Nura collectd-5.5.0.orig/src/daemon/Makefile.am collectd-5.5.0/src/daemon/Makefile.am +--- collectd-5.5.0.orig/src/daemon/Makefile.am 2015-07-06 10:01:17.820506239 -0300 ++++ collectd-5.5.0/src/daemon/Makefile.am 2015-07-06 10:02:03.364054763 -0300 +@@ -49,7 +49,7 @@ + collectd_CFLAGS = $(AM_CFLAGS) + collectd_LDFLAGS = -export-dynamic + collectd_LDADD = libavltree.la libcommon.la libheap.la -lm +-collectd_DEPENDENCIES = ++collectd_DEPENDENCIES = libavltree.la libcommon.la libheap.la + + # Link to these libraries.. + if BUILD_WITH_LIBRT
package/collectd/collectd.mk +2 -0
@@ -11,6 +11,8 @@ COLLECTD_CONF_ENV = ac_cv_lib_yajl_yajl_alloc=yes COLLECTD_INSTALL_STAGING = YES COLLECTD_LICENSE = GPLv2 LGPLv2.1 COLLECTD_LICENSE_FILES = COPYING +# For 0001-build-add-libavltree-libcommon-libheap-dependencies.patch +COLLECTD_AUTORECONF = YES # These require unmet dependencies, are fringe, pointless or deprecated COLLECTD_PLUGINS_DISABLE = \
Signature · 1 line
2.3.6
PATCH 1/1 collectd: fix parallel build issues
Dear Gustavo Zacarias,
Quoted 9 lines · Gustavo Zacarias
+diff -Nura collectd-5.5.0.orig/src/daemon/Makefile.am collectd-5.5.0/src/daemon/Makefile.am
+--- collectd-5.5.0.orig/src/daemon/Makefile.am 2015-07-06 10:01:17.820506239 -0300
++++ collectd-5.5.0/src/daemon/Makefile.am 2015-07-06 10:02:03.364054763 -0300
+@@ -49,7 +49,7 @@
+collectd_CFLAGS= $(AM_CFLAGS)
+collectd_LDFLAGS= -export-dynamic
+collectd_LDADD= libavltree.la libcommon.la libheap.la -lm +-collectd_DEPENDENCIES =
++collectd_DEPENDENCIES = libavltree.la libcommon.la libheap.la
Can you try instead to get rid of the empty collectd_DEPENDENCIES definition? Because when undefined foo_DEPENDENCIES automatically contains the contents of foo_LDADD.
From
http://www.gnu.org/software/automake/manual/html_node/Program-and-Library-Variables.html:
"""
If _DEPENDENCIES is not supplied, it is computed by Automake. The automatically-assigned value is the contents of _LDADD or _LIBADD, with most configure substitutions, -l, -L, -dlopen and -dlpreopen options removed. The configure substitutions that are left in are only ?$(LIBOBJS)? and ?$(ALLOCA)?; these are left because it is known that they will not cause an invalid value for _DEPENDENCIES to be generated. """
Best regards,
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com
PATCH 1/1 collectd: fix parallel build issues
Quoted 30 lines · Thomas Petazzoni
Dear Gustavo Zacarias,
Quoted 9 lines · Gustavo Zacarias
+diff -Nura collectd-5.5.0.orig/src/daemon/Makefile.am collectd-5.5.0/src/daemon/Makefile.am
+--- collectd-5.5.0.orig/src/daemon/Makefile.am 2015-07-06 10:01:17.820506239 -0300
++++ collectd-5.5.0/src/daemon/Makefile.am 2015-07-06 10:02:03.364054763 -0300
+@@ -49,7 +49,7 @@
+collectd_CFLAGS= $(AM_CFLAGS)
+collectd_LDFLAGS= -export-dynamic
+collectd_LDADD= libavltree.la libcommon.la libheap.la -lm +-collectd_DEPENDENCIES =
++collectd_DEPENDENCIES = libavltree.la libcommon.la libheap.laCan you try instead to get rid of the empty
collectd_DEPENDENCIESdefinition? Because when undefinedfoo_DEPENDENCIESautomatically contains the contents offoo_LDADD.From
http://www.gnu.org/software/automake/manual/html_node/Program-and-Library-Variables.html:"""
If_DEPENDENCIESis not supplied, it is computed by Automake. The automatically-assigned value is the contents of_LDADDor_LIBADD, with most configure substitutions, -l, -L, -dlopen and -dlpreopen options removed. The configure substitutions that are left in are only ?$(LIBOBJS)? and ?$(ALLOCA)?; these are left because it is known that they will not cause an invalid value for_DEPENDENCIESto be generated. """
Quoted 1 line
Best regards,
Hi.
That won't work in this case since it's added upon later (if BUILD_WITH_OWN_LIBOCONFIG ... ).
Regards.
PATCH 1/1 collectd: fix parallel build issues
Dear Gustavo Zacarias,
Quoted 9 lines · Gustavo Zacarias
Quoted 9 lines
"""
If_DEPENDENCIESis not supplied, it is computed by Automake. The automatically-assigned value is the contents of_LDADDor_LIBADD, with most configure substitutions, -l, -L, -dlopen and -dlpreopen options removed. The configure substitutions that are left in are only ?$(LIBOBJS)? and ?$(ALLOCA)?; these are left because it is known that they will not cause an invalid value for_DEPENDENCIESto be generated. """
Quoted 5 lines
Quoted 1 line
Best regards,
Hi.
That won't work in this case since it's added upon later (ifBUILD_WITH_OWN_LIBOCONFIG... ).
That same addition should be useless I believe:
collectd_LDADD += $(LIBLTDL) $(top_builddir)/src/liboconfig/liboconfig.la collectd_DEPENDENCIES += $(top_builddir)/src/liboconfig/liboconfig.la
So LDADD already contains $(top_builddir)/src/liboconfig/liboconfig.la, and LIBLTDL will be -lltdl, which will be ignored for foo_DEPENDENCIES.
But oh, well, maybe you don't want to fix the entire collectd build system :-)
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com
PATCH 1/1 collectd: fix parallel build issues
Quoted 9 lines · Thomas Petazzoni
That same addition should be useless I believe:
collectd_LDADD+= $(LIBLTDL) $(top_builddir)/src/liboconfig/liboconfig.lacollectd_DEPENDENCIES+= $(top_builddir)/src/liboconfig/liboconfig.laSo LDADD already contains $(top_builddir)/src/liboconfig/liboconfig.la, and LIBLTDL will be -lltdl, which will be ignored for
foo_DEPENDENCIES.But oh, well, maybe you don't want to fix the entire collectd build system :-)
In theory it should, but yes i didn't go on a rampage about it since they seem to want automatic dependencies but aren't consistent about it. Let's see what upstream says/applies.
Regards.
Thomas Petazzoni
AppliedPATCH 1/1 collectd: fix parallel build issues
In reply to Gustavo ZacariasDear Gustavo Zacarias,
Quoted 6 lines · Gustavo Zacarias
For version 5.5.x a reorganization was made and some common funtionality was moved to libraries, however proper dependency accounting isn't handled in the
Makefilethus causing build breakage on some parallel builds. Fixes:
http://autobuild.buildroot.net/results/a5e/a5e6891e9ea66ac8216d3302da3702770ef7247b/
Quoted 6 lines
Signed-off-by Gustavo Zacarias <[email protected]>--- ...-libavltree-libcommon-libheap-dependencies.patch | 21 +++++++++++++++++++++ package/collectd/collectd.mk | 2 ++ 2 files changed, 23 insertions(+) create mode 100644 package/collectd/0001-build-add-libavltree-libcommon-libheap-dependencies.patch
Applied, thanks.
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com