我有两个版本的buildroot一个是buildroot-2021.02.3版本,另一个是buildroot2017.08.1(这个版本是荔枝派官方推荐的版本)
在21版本中并未遇到这个问题在17版本中碰到了
报错大致是这个内容
libfakeroot.c: In function ‘chown’:
libfakeroot.c:99:40: error: ‘_STAT_VER’ undeclared (first use in this function)
99 | #define INT_NEXT_STAT(a,b) NEXT_STAT64(_STAT_VER,a,b)
| ^~~~~~~~~
看过来就是没有定义这个**_STAT_VER**,但是这玩意是buildroot自己搞出来的我有没动过。打开源码查找了下_STAT_VER,确实没有定义过这个东西,所以我打开21版本找到文件libfakeroot.c比对了下,发现21版本内的文件里有确实有定义
#ifndef _STAT_VER
#if defined (__aarch64__)
#define _STAT_VER 0
#elif defined (__x86_64__)
#define _STAT_VER 1
#else
#define _STAT_VER 3
#endif
#endif
那就很简单了直接全部复制过来就可以了
重新编译,搞定!!