From: Haiyue Wang <haiyuewa@163.com>
To: io-uring@vger.kernel.org
Cc: Haiyue Wang <haiyuewa@163.com>
Subject: [PATCH liburing v1 1/2] tests: fix bpf ops build error
Date: Sun, 26 Apr 2026 19:27:30 +0800 [thread overview]
Message-ID: <20260426112732.300165-1-haiyuewa@163.com> (raw)
If removed the previous install by 'rm -rf /usr/include/liburing', the
test build will fail:
make[1]: Entering directory '/root/linux/liburing/test'
CC helpers.o
mkdir -p output/bpf
CC output/bpf/nops.bpf.o
mkdir -p output/bpf
CC output/bpf/cp.bpf.o
In file included from /root/linux/liburing/test/bpf-progs/nops.bpf.c:2:
/root/linux/liburing/test/bpf-progs/../bpf_defs.h:9:10: fatal error: 'liburing/io_uring.h' file not found
9 | #include "liburing/io_uring.h"
| ^~~~~~~~~~~~~~~~~~~~~
1 error generated.
make[1]: *** [Makefile:387: output/bpf/nops.bpf.o] Error 1
make[1]: *** Waiting for unfinished jobs....
In file included from /root/linux/liburing/test/bpf-progs/cp.bpf.c:2:
/root/linux/liburing/test/bpf-progs/../bpf_defs.h:9:10: fatal error: 'liburing/io_uring.h' file not found
9 | #include "liburing/io_uring.h"
| ^~~~~~~~~~~~~~~~~~~~~
1 error generated.
make[1]: *** [Makefile:387: output/bpf/cp.bpf.o] Error 1
make[1]: Leaving directory '/root/linux/liburing/test'
make: *** [Makefile:14: all] Error 2
Add the include option in 'CPPFLAGS' for bpf build.
Fixes: fd8a6e66c739 ("tests: test io_uring bpf ops")
Signed-off-by: Haiyue Wang <haiyuewa@163.com>
---
test/Makefile | 1 +
1 file changed, 1 insertion(+)
diff --git a/test/Makefile b/test/Makefile
index bcb97da1..05e1f9e9 100644
--- a/test/Makefile
+++ b/test/Makefile
@@ -385,6 +385,7 @@ CLANG_BPF_SYS_INCLUDES ?= $(shell $(CLANG) -v -E - </dev/null 2>&1 \
$(BPF_OUTPUT)/%.bpf.o: $(BPF_PROGS_DIR)/%.bpf.c $(wildcard %.h)
mkdir -p ${BPF_OUTPUT}
$(QUIET_CC)$(CLANG) -g -O2 -target bpf \
+ -I../src/include/ \
-I$(BPF_OUTPUT) $(CLANG_BPF_SYS_INCLUDES) \
-Wno-missing-declarations \
-c $(filter %.c,$^) -o $(patsubst %.bpf.o,%.tmp.bpf.o,$@) -mcpu=v4
--
2.54.0
next reply other threads:[~2026-04-26 11:27 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-26 11:27 Haiyue Wang [this message]
2026-04-26 11:27 ` [PATCH liburing v1 2/2] .gitignore: add new test build output Haiyue Wang
2026-04-26 17:31 ` [PATCH liburing v1 1/2] tests: fix bpf ops build error Jens Axboe
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260426112732.300165-1-haiyuewa@163.com \
--to=haiyuewa@163.com \
--cc=io-uring@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox