diff mbox series

[meta-oe,v2] wrk: fix parallel build failure due to missing obj directory

Message ID 20261030031634.3740225-1-vaibjind@qti.qualcomm.com
State Under Review
Headers show
Series [meta-oe,v2] wrk: fix parallel build failure due to missing obj directory | expand

Commit Message

Vaibhav Jindal Oct. 30, 2026, 3:16 a.m. UTC
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.

Signed-off-by: Vaibhav Jindal <vaibjind@qti.qualcomm.com>
---
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(+)
diff mbox series

Patch

diff --git a/meta-oe/recipes-benchmark/wrk/wrk_4.2.0.bb b/meta-oe/recipes-benchmark/wrk/wrk_4.2.0.bb
index 47ca9ada01..1eaf97a382 100644
--- a/meta-oe/recipes-benchmark/wrk/wrk_4.2.0.bb
+++ b/meta-oe/recipes-benchmark/wrk/wrk_4.2.0.bb
@@ -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