- iOS/Objective-C 元类和类别
- objective-c - -1001 错误,当 NSURLSession 通过 httpproxy 和/etc/hosts
- java - 使用网络类获取 url 地址
- ios - 推送通知中不播放声音
我正在尝试在 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/
在我的工作中,我想将一个进程的调度策略从 SCHED_FIFO 设置为 SCHED_OTHER 以用于调试目的。但是我遇到了以下错误。 chrt 命令是否只支持实时调度策略设置?还是有其他原因?提前致
我正在尝试在 yocto 项目中使用 bitbake 构建 os-image。我收到以下错误。 ../util-linux-2.28.1/schedutils/chrt.c:88:17: error:
我是一名优秀的程序员,十分优秀!