[问题描述]:适配新版本LTP,make出现error: redefinition of 'struct mount_attr' make -C "/root/ltp-master/lib" -f "/root/ltp-master/lib/Makefile" all make[6]: Nothing to be done for 'all'. make[6]: Nothing to be done for 'all'. CC testcases/kernel/syscalls/fremovexattr/fremovexattr01 CC testcases/kernel/syscalls/fremovexattr/fremovexattr02 make -C "/root/ltp-master/lib" -f "/root/ltp-master/lib/Makefile" all make[6]: Nothing to be done for 'all'. make[6]: Nothing to be done for 'all'. In file included from fsconfig01.c:9: ../../../../include/lapi/fsmount.h:55:8: error: redefinition of 'struct mount_attr' 55 | struct mount_attr { | ^~~~~~~~~~ In file included from ../../../../include/lapi/fsmount.h:14: /usr/include/sys/mount.h:210:8: note: originally defined here 210 | struct mount_attr | ^~~~~~~~~~ make[4]: *** [../../../../include/mk/rules.mk:45: fsconfig01] Error 1 make[3]: *** [../../../include/mk/generic_trunk_target.inc:108: all] Error 2 make[2]: *** [../../include/mk/generic_trunk_target.inc:108: all] Error 2 make[1]: *** [../include/mk/generic_trunk_target.inc:108: all] Error 2 make[1]: Leaving directory '/root/ltp-master/testcases' make: *** [Makefile:94: testcases-all] Error 2 [环境信息]: 机器类型:ECS [内核信息]: [root@qibo-anolis23-nightly-func-arm-1 ltp-master]# uname -r 5.10.134-38.git.868a8003184f.an23.aarch64 [操作系统信息]: [root@qibo-anolis23-nightly-func-arm-1 ltp-master]# cat /etc/os-release NAME="Anolis OS" VERSION="23" ID="anolis" VERSION_ID="23" PLATFORM_ID="platform:an23" PRETTY_NAME="Anolis OS 23" ANSI_COLOR="0;31" HOME_URL="https://openanolis.cn/" BUG_REPORT_URL="https://bugzilla.openanolis.cn/" [问题发生概率]:必现 [复现步骤]: 1、GitHub下载最新版本的LTP 2、make autotools 3、./configure 4、make
make autotools阶段还有个设置语言环境的问题,是警告信息。 [root@qibo-anolis23-nightly-func-arm-1 ltp-master]# make autotools autoheader perl: warning: Setting locale failed. perl: warning: Please check that your locale settings: LANGUAGE = "en_US.UTF-8", LC_ALL = (unset), LC_NUMERIC = "C", LC_COLLATE = "C", LANG = "en_US:zh_CN.UTF-8" are supported and installed on your system. perl: warning: Falling back to the standard locale ("C"). perl: warning: Setting locale failed. perl: warning: Please check that your locale settings: LANGUAGE = "en_US.UTF-8", LC_ALL = (unset), LC_COLLATE = "C", LC_NUMERIC = "C", LANG = "en_US:zh_CN.UTF-8" are supported and installed on your system. perl: warning: Falling back to the standard locale ("C").
(In reply to anolislhy from comment #1) > make autotools阶段还有个设置语言环境的问题,是警告信息。 > > [root@qibo-anolis23-nightly-func-arm-1 ltp-master]# make autotools > autoheader > perl: warning: Setting locale failed. > perl: warning: Please check that your locale settings: > LANGUAGE = "en_US.UTF-8", > LC_ALL = (unset), > LC_NUMERIC = "C", > LC_COLLATE = "C", > LANG = "en_US:zh_CN.UTF-8" > are supported and installed on your system. > perl: warning: Falling back to the standard locale ("C"). > perl: warning: Setting locale failed. > perl: warning: Please check that your locale settings: > LANGUAGE = "en_US.UTF-8", > LC_ALL = (unset), > LC_COLLATE = "C", > LC_NUMERIC = "C", > LANG = "en_US:zh_CN.UTF-8" > are supported and installed on your system. > perl: warning: Falling back to the standard locale ("C"). dnf install glibc-langpack-en即可解决
(In reply to xuchunmei from comment #2) > (In reply to anolislhy from comment #1) > > make autotools阶段还有个设置语言环境的问题,是警告信息。 > > > > [root@qibo-anolis23-nightly-func-arm-1 ltp-master]# make autotools > > autoheader > > perl: warning: Setting locale failed. > > perl: warning: Please check that your locale settings: > > LANGUAGE = "en_US.UTF-8", > > LC_ALL = (unset), > > LC_NUMERIC = "C", > > LC_COLLATE = "C", > > LANG = "en_US:zh_CN.UTF-8" > > are supported and installed on your system. > > perl: warning: Falling back to the standard locale ("C"). > > perl: warning: Setting locale failed. > > perl: warning: Please check that your locale settings: > > LANGUAGE = "en_US.UTF-8", > > LC_ALL = (unset), > > LC_COLLATE = "C", > > LC_NUMERIC = "C", > > LANG = "en_US:zh_CN.UTF-8" > > are supported and installed on your system. > > perl: warning: Falling back to the standard locale ("C"). > > dnf install glibc-langpack-en即可解决 是的,安装了这个之后不会报语言问题了
升级Anolis23后问题没再复现
在前几个版本yum update之后此问题已经解决,但是换成新环境后,yum update之后仍有此问题,之前判断的应该是glibc的问题
An23 x86、arm 错误: redefinition of 'struct mount_attr' 问题,注释掉vim /usr/include/sys/mount.h 中定义的 mount_attr 方法可正常编译ltp 当前环境信息: [root@localhost ~]# cat /etc/os-release NAME="Anolis OS" VERSION="23" ID="anolis" VERSION_ID="23" PLATFORM_ID="platform:an23" PRETTY_NAME="Anolis OS 23" ANSI_COLOR="0;31" HOME_URL="https://openanolis.cn/" BUG_REPORT_URL="https://bugzilla.openanolis.cn/" [root@localhost ~]# uname -r 5.10.134-15.1.an23.aarch64 [root@localhost ~]# rpm -qa |grep glibc glibc-gconv-extra-2.36-7.an23.aarch64 glibc-langpack-en-2.36-7.an23.aarch64 glibc-common-2.36-7.an23.aarch64 glibc-2.36-7.an23.aarch64 glibc-devel-2.36-7.an23.aarch64 [root@localhost ~]# rpm -qi glibc Name : glibc Version : 2.36 Release : 7.an23 Architecture: aarch64 Install Date: Fri 07 Jul 2023 08:28:24 PM CST Group : Unspecified Size : 9989572 License : LGPLv2+ and LGPLv2+ with exceptions and GPLv2+ and GPLv2+ with exceptions and BSD and Inner-Net and ISC and Public Domain and GFDL Signature : RSA/SHA256, Sun 16 Apr 2023 12:11:13 AM CST, Key ID 619140084873f7c5 Source RPM : glibc-2.36-7.an23.src.rpm Build Date : Sat 15 Apr 2023 02:21:54 PM CST Build Host : iZ2zedi3462lmk3h9qy0noZ Packager : OpenAnolis Community Vendor : OpenAnolis Community URL : http://www.gnu.org/software/glibc/ Summary : The GNU libc libraries Description : The glibc package contains standard libraries which are used by multiple programs on the system. In order to save disk space and memory, as well as to make upgrading easier, common system code is kept in one place and shared between programs. This particular package contains the most important sets of shared libraries: the standard C library and the standard math library. Without these two libraries, a Linux system will not function.
具体是什么问题,后面贴的信息我看不懂想表达什么
ltp 是什么版本, gcc/glibc/util-linux 是什么版本,麻烦补充下
An23.1 5.10.134-16.2_rc2.an23.aarch64内核版本安装最新版ltp编译过程无此问题