我正在用内核版本2.6.32开发Red 6,我正尝试在我的机器上构建glib2.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我可以找到at F_SETPIPE_SZ undeclared的解决方案,将#define _GNU_SOURCE放在文件gfile.c中所有包含的前面,但是它没有工作。正如第二个答案中提到的:旧内核(例如,在RHEL6中使用的2.6.32 )没有它们,无论您构建什么,我们都需要绕过它。我们怎么能这么做?
感谢你的帮助。
提前谢谢。
发布于 2020-03-29 10:34:18
错误已在此提交中修复。
没有F_SETPIPE_SZ和F_GETPIPE_SZ的F_SETPIPE_SZ体系结构,如or1k。如果这些变量未定义,请将先前的行为设置为1024 * 64。
https://gitlab.gnome.org/GNOME/glib/-/commit/0beb62f564072f3585762c9c55fe894485993b62
您可以将修补程序应用于您的代码。
https://stackoverflow.com/questions/58707467
复制相似问题