问题现象: MIPS64 Architecture平台UOS V20 104x版本安装编译LTP 20200515版本,make阶段报错,报错信息如下: - In file included from ../../../../include/tst_test.h:14,
- from ustat01.c:9:
- **/usr/include/mips64el-linux-gnuabi64/sys/ustat.h:33**:12: error: conflicting types for ‘statfs’
- extern int ustat (__dev_t __dev, struct ustat *__ubuf) __THROW;
- ^~~~~
- In file included from /usr/include/mips64el-linux-gnuabi64/sys/vfs.h:4,
- from ../../../../include/tst_safe_macros.h:14,
- from ../../../../include/tst_test.h:90,
- from ustat01.c:9:
- /usr/include/mips64el-linux-gnuabi64/sys/statfs.h:31:12: note: previous declaration of ‘statfs’ was here
- extern int statfs (const char *__file, struct statfs *__buf)
- ^~~~~~
- make[4]: *** [<内置>:ustat01] 错误 1
- make[4]: 离开目录“/opt/software/ltp/ltp-full-20200515/testcases/kernel/syscalls/ustat”
- make[3]: *** [../../../include/mk/generic_trunk_target.inc:93:all] 错误 2
- make[3]: 离开目录“/opt/software/ltp/ltp-full-20200515/testcases/kernel/syscalls”
- make[2]: *** [../../include/mk/generic_trunk_target.inc:93:all] 错误 2
- make[2]: 离开目录“/opt/software/ltp/ltp-full-20200515/testcases/kernel”
- make[1]: *** [../include/mk/generic_trunk_target.inc:93:all] 错误 2
- make[1]: 离开目录“/opt/software/ltp/ltp-full-20200515/testcases”
- 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行
|