wrk: fix parallel build failure due to missing obj directory
PATCH 1/1 wrk: fix parallel build failure due to missing obj directory
The obj/bytecode.c rule in the wrk Makefile has no dependency on the obj/ directory, so with parallel make luajit can run before obj/ has been created and fails:
LUAJIT src/wrk.lua
luajit: .../obj/bytecode.c: No such file or directory
make: *** [Makefile:64: obj/bytecode.c] Error 1
Create ${S}/obj up front in do_compile.
--- meta-oe/recipes-benchmark/wrk/wrk_4.2.0.bb | 3 +++ 1 file changed, 3 insertions(+)
meta-oe/recipes-benchmark/wrk/wrk_4.2.0.bb +3 -0
@@ -25,6 +25,9 @@ EXTRA_OEMAKE = "\ do_compile() { export LUA_PATH="${RECIPE_SYSROOT_NATIVE}/usr/share/luajit-2.1/?.lua;;" + # The obj/bytecode.c rule has no dependency on obj/, so with parallel make + # luajit can run before the directory exists. Create it up front. + mkdir -p ${S}/obj oe_runmake }
Signature · 1 line
2.34.1
Quoted 28 lines · Vaibhav Jindal via lists.openembedded.org
The
obj/bytecode.crule in the wrkMakefilehas no dependency on the obj/ directory, so with parallel make luajit can run before obj/ has been created and fails:LUAJIT src/wrk.lua
luajit:.../obj/bytecode.c: No such file or directory
make: *** [Makefile:64:obj/bytecode.c] Error 1Create ${S}/obj up front in
do_compile.Signed-off-by Vaibhav Jindal <[email protected]>--- meta-oe/recipes-benchmark/wrk/wrk_4.2.0.bb | 3 +++ 1 file changed, 3 insertions(+)meta-oe/recipes-benchmark/wrk/wrk_4.2.0.bb +0
-0@@ -25,6 +25,9 @@ EXTRA_OEMAKE = "\ do_compile() { exportLUA_PATH="${RECIPE_SYSROOT_NATIVE}/usr/share/luajit-2.1/?.lua;;"
+ # Theobj/bytecode.crule has no dependency on obj/, so with parallel
make
meta-oe/recipes-benchmark/wrk/wrk_4.2.0.bb EXTRA_OEMAKE = "\ · line 30
Quoted 2 lines
meta-oe/recipes-benchmark/wrk/wrk_4.2.0.bb +2
-0+ # luajit can run before the directory exists. Create it up front. + mkdir -p ${S}/obj
I wonder why its looking for a obj dir inside source dir. Usually we build outside sourcedir. Please look into it secondly,
use do_compile[dirs] = "${S}/obj" if its needed
Quoted 18 lines
oe_runmake
}--
2.34.1-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group. View/Reply Online (#131641):
https://lists.openembedded.org/g/openembedded-devel/message/131641
Mute This Topic: https://lists.openembedded.org/mt/121990495/1997914
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub [ [email protected]]
-=-=-=-=-=-=-=-=-=-=-=-
PATCH v2 1/1 wrk: fix parallel build failure due to missing obj directory
The obj/bytecode.c rule in the wrk Makefile has no dependency on the obj/ directory, so with parallel make luajit can run before obj/ has been created and fails:
LUAJIT src/wrk.lua
luajit: .../obj/bytecode.c: No such file or directory
make: *** [Makefile:64: obj/bytecode.c] Error 1
wrk only supports in-tree builds (relative obj/ and src/ paths, B = S), so create ${S}/obj via do_compile[dirs], keeping ${S} last so make still runs from the source directory.
---
v2: use do_compile[dirs] = "${S}/obj ${S}" instead of mkdir in the function, as suggested by Khem Raj. wrk's Makefile is in-tree only (B = S), so obj/ is under ${S}; ${S} is kept last so make runs from the source dir.
meta-oe/recipes-benchmark/wrk/wrk_4.2.0.bb | 4 ++++ 1 file changed, 4 insertions(+)
meta-oe/recipes-benchmark/wrk/wrk_4.2.0.bb +4 -0
@@ -23,6 +23,10 @@ EXTRA_OEMAKE = "\ CFLAGS='${CFLAGS} -I${RECIPE_SYSROOT}/usr/include/luajit-2.1' \ " +# wrk's Makefile is in-tree only (relative obj/, src/) and its obj/bytecode.c +# rule doesn't depend on obj/, so create it before make runs in ${S}. +do_compile[dirs] = "${S}/obj ${S}" + do_compile() { export LUA_PATH="${RECIPE_SYSROOT_NATIVE}/usr/share/luajit-2.1/?.lua;;" oe_runmake
Signature · 1 line
2.34.1