Skip to contentSkip to conversation

lirc-tools: add patch to fix parallel build issue

PATCH New Thomas Petazzoni 2 participants 3 messages May 25, 2016 – May 26, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 lirc-tools: add patch to fix parallel build issue

The lirc-tools package fails to build once in a while in the autobuilders. Some quick analysis of the problematic Makefile.am has revealed one issue. However, since the issue is difficult to reproduce, we could only check that the new solution continue to work, and we're not 100% sure it fixes the entire problem: only the autobuilders can say, over time.

Supposedly fixes:

http://autobuild.buildroot.org/results/eb47d57de8182d25b1dacbf0ac3726ed20063d04/

---
 ...per-linking-method-to-avoid-parallel-buil.patch | 46 ++++++++++++++++++++++
 package/lirc-tools/lirc-tools.mk                   |  2 +
 2 files changed, 48 insertions(+)
 create mode 100644 package/lirc-tools/0001-lib-use-proper-linking-method-to-avoid-parallel-buil.patch
package/lirc-tools/0001-lib-use-proper-linking-method-to-avoid-parallel-buil.patch new file +46 -0
new file mode 100644
index 0000000..5863128
@@ -0,0 +1,46 @@
+From f2fc8c48e5e55a91b309225f377b6cb3783fc6f6 Mon Sep 17 00:00:00 2001
+From: Thomas Petazzoni <[email protected]>
+Date: Wed, 25 May 2016 15:21:57 +0200
+Subject: [PATCH] lib: use proper linking method to avoid parallel build issue
+
+Using <foo>_LDFLAGS = -l<library> is correct when <library> is an
+external library. However, when it is built by the same package, and
+especially in the same directory, this is wrong and can cause parallel
+build issues. In lib/Makefile.am, there was:
+
+libirrecord_la_LDFLAGS      = -llirc
+
+But the liblirc library is built in the same directory. Or, due to the
+using of <foo>_LDFLAGS, make is not aware of the build dependency
+between libirrecord and liblirc.
+
+To solve this, <foo>_LIBADD should be used instead, as follows:
+
+libirrecord_la_LIBADD       = liblirc.la
+
+This fixes parallel build issues seen by automated build tests
+conducted by the Buildroot project, such as:
+
+  http://autobuild.buildroot.org/results/eb4/eb47d57de8182d25b1dacbf0ac3726ed20063d04/build-end.log
+
+Signed-off-by: Thomas Petazzoni <[email protected]>
+---
+ lib/Makefile.am | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/lib/Makefile.am b/lib/Makefile.am
+index ce5c94c..8780f88 100644
+--- a/lib/Makefile.am
++++ b/lib/Makefile.am
+@@ -29,7 +29,7 @@ liblirc_la_SOURCES          = config_file.c \
+                               transmit.c \
+                               util.c
+ 
+-libirrecord_la_LDFLAGS      = -llirc
++libirrecord_la_LIBADD       = liblirc.la
+ libirrecord_la_SOURCES      = irrecord.c
+ 
+ liblirc_client_la_LDFLAGS   = -version-info 4:0:4
+-- 
+2.7.4
+
package/lirc-tools/lirc-tools.mk +2 -0
index 46886a9..289b9ed 100644
@@ -11,6 +11,8 @@ LIRC_TOOLS_LICENSE = GPLv2+
 LIRC_TOOLS_LICENSE_FILES = COPYING
 LIRC_TOOLS_DEPENDENCIES = host-libxslt host-pkgconf host-python3
 LIRC_TOOLS_INSTALL_STAGING = YES
+# 0001-lib-use-proper-linking-method-to-avoid-parallel-buil.patch
+LIRC_TOOLS_AUTORECONF = YES
 
 LIRC_TOOLS_CONF_ENV = XSLTPROC=yes
 LIRC_TOOLS_CONF_OPTS = --without-x
Signature · 1 line
2.7.4
#1 lore raw

PATCH 1/1 lirc-tools: add patch to fix parallel build issue

Hello,

Quoted 1 line · Thomas Petazzoni
 ...per-linking-method-to-avoid-parallel-buil.patch | 46 ++++++++++++++++++++++

FWIW, this patch has been accepted and merged upstream.

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
#2 lore raw

PATCH 1/1 lirc-tools: add patch to fix parallel build issue

In reply to Thomas Petazzoni
Quoted 9 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Thomas" == Thomas Petazzoni <[email protected]> writes:

The lirc-tools package fails to build once in a while in the autobuilders. Some quick analysis of the problematic Makefile.am has revealed one issue. However, since the issue is difficult to reproduce, we could only check that the new solution continue to work, and we're not 100% sure it fixes the entire problem: only the autobuilders can say, over time.

Quoted 5 lines

Supposedly fixes:

http://autobuild.buildroot.org/results/eb47d57de8182d25b1dacbf0ac3726ed20063d04/

Committed, thanks.

Signature · 1 line
Bye, Peter Korsgaard