简体   繁体   English

如何建立自由

[英]how to build liburing

I am build liburing which is a user interface for io_uring features.我正在构建 liburing,它是 io_uring 功能的用户界面。 But when I run ./configure it throws this error:但是当我运行./configure时它会抛出这个错误:

/tmp/fio-conf--21449-.c:2:10: fatal error: linux/time_types.h: No such file or directory
 #include <linux/time_types.h>
          ^~~~~~~~~~~~~~~~~~~~
compilation terminated.

but I found in但我发现

/usr/src/linux-headers-5.3.0-46-generic/include/uapi/linux$ ls time_types.h 
time_types.h

My kernal version is我的内核版本是

uname -rs
Linux 5.3.0-46-generic

I'm sure that the 5.3 version is supporting io_uring (which has already been supported by 5.1)我确定 5.3 版本支持 io_uring(5.1 已经支持)

so how to Update kernel/libc headers to support this?那么如何更新内核/libc 头文件来支持这个呢?

First, you have to clone the repo:首先,您必须克隆存储库:

git clone https://github.com/axboe/liburing.git

Then you can build:然后你可以构建:

make -C ./liburing

After that, you can compile your program.c with liburing:之后,您可以使用 liburing 编译您的program.c 。c:

gcc program.c -o ./program -I./liburing/src/include/ -L./liburing/src/ -Wall -O2 -D_GNU_SOURCE -luring 

i have the same problem as yours,and my head files named the time_types.h lies in /usr/src/linux-headers-5.4.0-124-generic/include/uapi/linux i wonder how to change the cmakefile.txt to find the headerfiles...我和你有同样的问题,我的名为 time_types.h 的头文件位于 /usr/src/linux-headers-5.4.0-124-generic/include/uapi/linux 我想知道如何更改 cmakefile.txt找到头文件...

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM