Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

There is a problem with building the linux kernel. #3

Open
yunekorea opened this issue Apr 4, 2024 · 5 comments
Open

There is a problem with building the linux kernel. #3

yunekorea opened this issue Apr 4, 2024 · 5 comments

Comments

@yunekorea
Copy link

Hello. I'm trying to implement this project in our system with DaisyPlus.
I was trying to build the kernel and downgrade from kernel version 5.15.0-101-generic to 5.10.21 which you have suggested.
But an error saying that there is no lio.h header file in linux directory.

So I copied a file with the same name from "uebf-rt/include/" to the specified directory and built it.
The system says that it was successful but after installing the built kernel and running the "eval-one" program you provided,
another error occurs saying that seems to be failing at the function "set_back_file".

So, I'm wondering if there was a misbehavior of me when building the kernel.
I suspect that the reason was copying the lio.h from the other directory.
If it is true, can you provide me with a correct solution for getting the lio.h file?

@yzim
Copy link
Collaborator

yzim commented Jul 29, 2024

Hello. Apart from building and using the kernel source, please also compile and install the kernel module in the kmod folder. "set_back_file" relies on it.

@rookiewwj
Copy link

kernel/bpf/core.c:36:10: fatal error: linux/lio.h: no such file or directory exists
36 | #include <linux/lio.h>
| ^~~~~~~~~~~~~
compilation terminated.
I also encountered this problem while compiling the kernel, I copied linux-lio/ into the linux source and compiled with this error. Do I need to copy the kmod together with the linux source and then execute make?

@yzim
Copy link
Collaborator

yzim commented Sep 15, 2024

Sorry I missed the header file. Maybe the header file does not take effect? What will happen if you remove "#include <linux/lio.h" from the source code?

The error during set_back_file seems not related to linux/lio.h. Could you provide more details or logs?

@rookiewwj
Copy link

now i have removed "#include<linux/lio.h>" from core.c ,then i got another error
kernel/bpf/core.c: In function ‘bpf_prog_select_runtime’:
kernel/bpf/core.c:1810:3: error: implicit declaration of function ‘lio_pr’ [-Werror=implicit-function-declaration]
1810 | lio_pr(info, "prog_name=%s", fp->aux->name);
| ^~~~~~
kernel/bpf/core.c:1810:10: error: ‘info’ undeclared (first use in this function)
1810 | lio_pr(info, "prog_name=%s", fp->aux->name);
| ^~~~
kernel/bpf/core.c:1810:10: note: each undeclared identifier is reported only once for each function it appears in
cc1: some warnings being treated as errors
make[2]: *** [scripts/Makefile.build:279:kernel/bpf/core.o] 错误 1
make[1]: *** [scripts/Makefile.build:496:kernel/bpf] 错误 2
make[1]: *** 正在等待未完成的任务....
make: *** [Makefile:1801:kernel] 错误 2
make: *** 正在等待未完成的任务....

@yzim
Copy link
Collaborator

yzim commented Sep 15, 2024

A simple workaround is using uebpf-rt/include/lio.h. It disables lio_pr.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants