分享

MIPS64 平台UOS V20 104x版本安装编译LTP 20200515报错解决方法

朵儿爸 2021-10-4 12:55:03 发表于 已解决 [显示全部楼层] 回帖奖励 阅读模式 关闭右栏 1 1361

问题现象:

MIPS64 Architecture平台UOS V20 104x版本安装编译LTP 20200515版本,make阶段报错,报错信息如下:

  1. In file included from ../../../../include/tst_test.h:14,
  2. from ustat01.c:9:
  3. **/usr/include/mips64el-linux-gnuabi64/sys/ustat.h:33**:12: error: conflicting types for ‘statfs’
  4. extern int ustat (__dev_t __dev, struct ustat *__ubuf) __THROW;
  5. ^~~~~
  6. In file included from /usr/include/mips64el-linux-gnuabi64/sys/vfs.h:4,
  7. from ../../../../include/tst_safe_macros.h:14,
  8. from ../../../../include/tst_test.h:90,
  9. from ustat01.c:9:
  10. /usr/include/mips64el-linux-gnuabi64/sys/statfs.h:31:12: note: previous declaration of ‘statfs’ was here
  11. extern int statfs (const char *__file, struct statfs *__buf)
  12. ^~~~~~
  13. make[4]: *** [<内置>:ustat01] 错误 1
  14. make[4]: 离开目录“/opt/software/ltp/ltp-full-20200515/testcases/kernel/syscalls/ustat”
  15. make[3]: *** [../../../include/mk/generic_trunk_target.inc:93:all] 错误 2
  16. make[3]: 离开目录“/opt/software/ltp/ltp-full-20200515/testcases/kernel/syscalls”
  17. make[2]: *** [../../include/mk/generic_trunk_target.inc:93:all] 错误 2
  18. make[2]: 离开目录“/opt/software/ltp/ltp-full-20200515/testcases/kernel”
  19. make[1]: *** [../include/mk/generic_trunk_target.inc:93:all] 错误 2
  20. make[1]: 离开目录“/opt/software/ltp/ltp-full-20200515/testcases”
  21. make: *** [Makefile:108:testcases-all] 错误 2
复制代码
原因分析:

glibc 2.28的发行说明说:
The obsolete function ustat is no longer available to newly linked binaries; the headers and have been removed. This function has been deprecated in favor of fstatfs and statfs.

根据报错提示修改/usr/include/mips64el-linux-gnuabi64/sys/ustat.h文件,注释掉第33行(extern int ustat (dev_t dev, struct ustat *ubuf) THROW;)

解决方法:

在make之前需要修改2处的ustat.h头文件信息
1、/usr/include/mips64el-linux-gnuabi64/sys/ustat.h文件注释掉第33行
2、/usr/include/mips64el-linux-gnuabi64/bits/ustat.h文件注释掉第24-30行

版权说明:论坛帖子主题均由合作第三方提供并上传,若内容存在侵权,请进行举报

已有(0)人评论

跳转到指定楼层
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

联系在线客服