Skip to contentSkip to conversation

yajl: disable parallel build

PATCH New Jörg Krause 2 participants 3 messages Mar 31, 2016 – Apr 1, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 yajl: disable parallel build

The yajl build system contains a race condition, which gets triggered by high BR2_JLEVEL settings - It tries to link the executable gen-extra-close against libyajl before it is created:

[ 21%] Linking C executable gen-extra-close
[ 26%] Building C object src/CMakeFiles/yajl_s.dir/yajl_buf.c.o /home/test/autobuild/instance-3/output/host/opt/ext-toolchain/bfin-uclinux/bfin-uclinux/bin/ld.real: cannot find -lyajl

Fix it by disabling parallel build.

Fixes:
http://autobuild.buildroot.net/results/a9b/a9b5209377acb51e69f376e0c008ee71fe00397a/
http://autobuild.buildroot.net/results/55f/55fe22463d49addb42b635d10be5176522f4a561/
http://autobuild.buildroot.net/results/808/808acca0cfed93465845c2aa055a7a4fc56a8a17/
http://autobuild.buildroot.net/results/b92/b92a9c84b71a8a2d022d307245ca6be36a000e6c/
http://autobuild.buildroot.net/results/55d/55df698ab53f7d94235166e8576eb681ed68668e/
.. and more.

---
 package/yajl/yajl.mk | 3 +++
 1 file changed, 3 insertions(+)
package/yajl/yajl.mk +3 -0
index 7770e86..4346e42 100644
@@ -11,4 +11,7 @@ YAJL_LICENSE = ISC
 YAJL_LICENSE_FILES = COPYING
 YAJL_PATCH = https://github.com/vriera/yajl/commit/6d09f11b8fd358cab0e31b965327e64a599f9ce9.patch
 
+# Parallel build is broken
+YAJL_MAKE = $(MAKE1)
+
 $(eval $(cmake-package))
Signature · 1 line
2.8.0
#1 lore raw

PATCH 1/1 yajl: disable parallel build

Hello,

Quoted 18 lines · J?rg Krause

The yajl build system contains a race condition, which gets triggered by high BR2_JLEVEL settings - It tries to link the executable gen-extra-close against libyajl before it is created:

[ 21%] Linking C executable gen-extra-close
[ 26%] Building C object src/CMakeFiles/yajl_s.dir/yajl_buf.c.o /home/test/autobuild/instance-3/output/host/opt/ext-toolchain/bfin-uclinux/bfin-uclinux/bin/ld.real: cannot find -lyajl

Fix it by disabling parallel build.

Fixes:
http://autobuild.buildroot.net/results/a9b/a9b5209377acb51e69f376e0c008ee71fe00397a/
http://autobuild.buildroot.net/results/55f/55fe22463d49addb42b635d10be5176522f4a561/
http://autobuild.buildroot.net/results/808/808acca0cfed93465845c2aa055a7a4fc56a8a17/
http://autobuild.buildroot.net/results/b92/b92a9c84b71a8a2d022d307245ca6be36a000e6c/
http://autobuild.buildroot.net/results/55d/55df698ab53f7d94235166e8576eb681ed68668e/
.. and more.

Quoted 1 line

yajl is using a reasonable build system, so there should be a reasonable way of getting parallel build to work.

Can you try the following patch:

test/api/CMakeLists.txt +1 -0
index cd65a54..f7b6be1 100644
@@ -22,4 +22,5 @@ FOREACH (test ${TESTS})
   GET_FILENAME_COMPONENT(testProg ${test} NAME_WE)
   ADD_EXECUTABLE(${testProg} ${test})
   TARGET_LINK_LIBRARIES(${testProg} yajl)
+  ADD_DEPENDENCIES(${testProg} yajl)
 ENDFOREACH()

And see if it helps ?

Note: this is only fixing the dependency of the gen-extra-close test program against the yajl library. Probably other ADD_DEPENDENCIES() invocations need to be added.

Thanks,

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 yajl: disable parallel build

Dear Thomas,

Quoted 47 lines · Thomas Petazzoni

Hello,

Quoted 27 lines · J?rg Krause

The yajl build system contains a race condition, which gets triggered by
high BR2_JLEVEL settings - It tries to link the executable gen- extra-close
against libyajl before it is created:

[ 21%] Linking C executable gen-extra-close
[ 26%] Building C object src/CMakeFiles/yajl_s.dir/yajl_buf.c.o /home/test/autobuild/instance-3/output/host/opt/ext-toolchain/bfin- uclinux/bfin-uclinux/bin/ld.real: cannot find -lyajl

Fix it by disabling parallel build.

Fixes:
http://autobuild.buildroot.net/results/a9b/a9b5209377acb51e69f376e0
c008ee71fe00397a/
http://autobuild.buildroot.net/results/55f/55fe22463d49addb42b635d1
0be5176522f4a561/
http://autobuild.buildroot.net/results/808/808acca0cfed93465845c2aa
055a7a4fc56a8a17/
http://autobuild.buildroot.net/results/b92/b92a9c84b71a8a2d022d3072
45ca6be36a000e6c/
http://autobuild.buildroot.net/results/55d/55df698ab53f7d94235166e8
576eb681ed68668e/
.. and more.

Quoted 1 line

yajl is using a reasonable build system, so there should be a reasonable way of getting parallel build to work.

Can you try the following patch:

test/api/CMakeLists.txt +1 -0
index cd65a54..f7b6be1 100644
@@ -22,4 +22,5 @@ FOREACH (test ${TESTS})
 ???GET_FILENAME_COMPONENT(testProg ${test} NAME_WE)
 ???ADD_EXECUTABLE(${testProg} ${test})
 ???TARGET_LINK_LIBRARIES(${testProg} yajl)
+??ADD_DEPENDENCIES(${testProg} yajl)
 ?ENDFOREACH()
Quoted 5 lines

And see if it helps ?

Note: this is only fixing the dependency of the gen-extra-close test program against the yajl library. Probably other ADD_DEPENDENCIES() invocations need to be added.

This was my first try and it did not work. However, after having a closer look the dependency is yajl_s.

I'll sent a v2 for this. Many thanks for looking into this!

J?rg