gpt4 book ai didi

linux - ../util-linux-2.28.1/schedutils/chrt.c :88:17: error: ‘__NR_sched_setattr’ undeclared (first use in this function)

转载 作者:塔克拉玛干 更新时间:2023-11-02 23:22:24 24 4
gpt4 key购买 nike

我正在尝试在 yocto 项目中使用 bitbake 构建 os-image。我收到以下错误。

../util-linux-2.28.1/schedutils/chrt.c:88:17: error: ‘__NR_sched_setattr’ undeclared (first use in this function)

我按照 yocto Mega 手册中的说明进行操作。如何解决此构建错误?

最佳答案

当为不支持某些系统调用的内核构建某些用户空间程序或库时,会出现此类错误消息, sched_setattr 在这种情况下。要么你在非常老的 linux 上构建(出现在 3.14 中),要么你正在构建的架构最有可能不支持这个系统调用(你没有指定你正在构建的架构,所以我无法检查)。

无论哪种方式,都可以使用配置选项 --disable-schedutils 禁用 util-linux 的这个特定部分。在这种情况下,您不会在设备上获得 chrt、ionice、taskset(进程操作)工具,但它们可能对您不是很有用。

在 yocto 构建环境中,您可以先修改 util-linux 的配​​方,实际上包括配方文件 (meta/recipes-core/util-linux/util-linux.inc ),添加一行:

SHARED_EXTRA_OECONF = "--disable-use-tty-group \
--disable-makeinstall-chown \
...
--disable-schedutils \
"

并检查它是否适合您。稍后你可以添加

EXTRA_OECONF_append_util-linux = " --disable-schedutils" 

到您的 conf/local.conf 或工作元层中的 util-linux bbappend 文件(如果有的话)。

关于linux - ../util-linux-2.28.1/schedutils/chrt.c :88:17: error: ‘__NR_sched_setattr’ undeclared (first use in this function),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41257902/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com