yajl: disable parallel build
PATCH v2 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 linking against the static library libyajl_s like all other targets of the yajl build system do.
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.
Upstream status: Pending
https://github.com/lloyd/yajl/pull/187
--- ...make-Fix-static-linking-in-parallel-build.patch | 39 ++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 package/yajl/0003-cmake-Fix-static-linking-in-parallel-build.patch
package/yajl/0003-cmake-Fix-static-linking-in-parallel-build.patch new file +39 -0
@@ -0,0 +1,39 @@ +From 24cbb6b482315d7659c04c9470ec9029e825e8ca Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?J=C3=B6rg=20Krause?= <[email protected]> +Date: Fri, 1 Apr 2016 20:45:35 +0200 +Subject: [PATCH] cmake: Fix static linking in parallel build +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Building yajl in a static context fails in a parallel build: + +[ 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 this by linking against the static library yajl_s as all other targets +in yajl does. + +Upstream status: Pending +https://github.com/lloyd/yajl/pull/187 + +Signed-off-by: J?rg Krause <[email protected]> +--- + test/api/CMakeLists.txt | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/test/api/CMakeLists.txt b/test/api/CMakeLists.txt +index e0ce2f6..efc85c5 100644 +--- a/test/api/CMakeLists.txt ++++ b/test/api/CMakeLists.txt +@@ -21,5 +21,5 @@ LINK_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR}/../../${YAJL_DIST_NAME}/lib) + FOREACH (test ${TESTS}) + GET_FILENAME_COMPONENT(testProg ${test} NAME_WE) + ADD_EXECUTABLE(${testProg} ${test}) +- TARGET_LINK_LIBRARIES(${testProg} yajl m) ++ TARGET_LINK_LIBRARIES(${testProg} yajl_s m) + ENDFOREACH() +-- +2.8.0 +
Signature · 1 line
2.8.0
PATCH v2 1/1 yajl: disable parallel build
Quoted 84 lines · J?rg Krause
The yajl build system contains a race condition, which gets triggered by
highBR2_JLEVELsettings - 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 objectsrc/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 -lyajlFix it by linking against the static library
libyajl_slike all other targets of
the yajl build system do.Fixes:
http://autobuild.buildroot.net/results/a9b/a9b5209377acb51e69f376e0c0
08ee71fe00397a/
http://autobuild.buildroot.net/results/55f/55fe22463d49addb42b635d10b
e5176522f4a561/
http://autobuild.buildroot.net/results/808/808acca0cfed93465845c2aa05
5a7a4fc56a8a17/
http://autobuild.buildroot.net/results/b92/b92a9c84b71a8a2d022d307245
ca6be36a000e6c/
http://autobuild.buildroot.net/results/55d/55df698ab53f7d94235166e857
6eb681ed68668e/
.. and more.Upstream status: Pending
https://github.com/lloyd/yajl/pull/187Signed-off-by J?rg Krause <[email protected]>---
?...make-Fix-static-linking-in-parallel-build.patch | 39
++++++++++++++++++++++
?1 file changed, 39 insertions(+)
?create mode 100644 package/yajl/0003-cmake-Fix-static-linking-in- parallel-build.patch(quoted diff) +0
-0build.patch b/package/yajl/0003-cmake-Fix-static-linking-in-parallel- build.patch
new file mode 100644
index 0000000..793e38fpackage/yajl/0003-cmake-Fix-static-linking-in-parallel- new file +0
-0build.patch
package/yajl/0003-cmake-Fix-static-linking-in-parallel- new file +1
-0@@ -0,0 +1,39 @@ +From 24cbb6b482315d7659c04c9470ec9029e825e8ca Mon Sep 17 00:00:002001
package/yajl/0003-cmake-Fix-static-linking-in-parallel- new file +12
-0+From: =?UTF-8?q?J=C3=B6rg=20Krause?= <[email protected]> +Date: Fri, 1 Apr 2016 20:45:35 +0200 +Subject: [PATCH] cmake: Fix static linking in parallel build +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Building yajl in a static context fails in a parallel build: + +[ 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
package/yajl/0003-cmake-Fix-static-linking-in-parallel- new file +2
-0+ +Fix this by linking against the static library yajl_s as all othertargets
package/yajl/0003-cmake-Fix-static-linking-in-parallel- new file +15
-0+in yajl does. + +Upstream status: Pending +https://github.com/lloyd/yajl/pull/187 + +Signed-off-by: J?rg Krause <[email protected]> +--- + test/api/CMakeLists.txt | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/test/api/CMakeLists.txt b/test/api/CMakeLists.txt +index e0ce2f6..efc85c5 100644 +--- a/test/api/CMakeLists.txt ++++ b/test/api/CMakeLists.txt +@@ -21,5 +21,5 @@
LINK_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR}/../../${YAJL_DIST_NAME}/ lib)
+ FOREACH (test ${TESTS})
Quoted 8 lines
+???GET_FILENAME_COMPONENT(testProg ${test}
NAME_WE) +???ADD_EXECUTABLE(${testProg} ${test}) +-??TARGET_LINK_LIBRARIES(${testProg} yajl m) ++??TARGET_LINK_LIBRARIES(${testProg}yajl_sm)
+ENDFOREACH()
+--?
+2.8.0
+
Oops, I forgot to update the commit message. Sorry! I'll resend with a new commit header.
J?rg