【问题标题】:glib : glib 2.5 installation issueglib : glib 2.5 安装问题
【发布时间】:2020-03-01 14:21:30
【问题描述】:

我正在使用内核版本 2.6.32 开发 Red Hat 6,我正在尝试在我的机器上构建 glib 2.5。并因以下错误而失败:-

日志:-

../../gio/gfile.c: In function ‘splice_stream_with_progress’:
../../gio/gfile.c:3019: error: ‘F_SETPIPE_SZ’ undeclared (first use in this function)
../../gio/gfile.c:3019: error: (Each undeclared identifier is reported only once
../../gio/gfile.c:3019: error: for each function it appears in.)
../../gio/gfile.c:3023: error: ‘F_GETPIPE_SZ’ undeclared (first use in this function)
make[4]: *** [libgio_2_0_la-gfile.lo] Error 1

我可以在 F_SETPIPE_SZ undeclared 找到解决方案,将 #define _GNU_SOURCE 放在文件 gfile.c 中的所有包含之前,但它不起作用。如第二个答案中所述:较旧的内核(例如 RHEL6 中使用的 2.6.32)没有它们,我们需要在您正在构建的任何内容中绕过它。我们怎么能这样做?

感谢您的帮助。

提前致谢。

【问题讨论】:

    标签: c glibc glib


    【解决方案1】:

    此提交中修复了该错误。

    没有 F_SETPIPE_SZ 和 F_GETPIPE_SZ 的架构,例如 or1k。 如果这些变量未定义,则放回以前的行为,缓冲 大小设置为 1024 * 64

    https://gitlab.gnome.org/GNOME/glib/-/commit/0beb62f564072f3585762c9c55fe894485993b62

    您可以将补丁应用到您的代码中。

    【讨论】:

      猜你喜欢
      • 2020-03-06
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多