maxnet / berryboot

Berryboot -- Boot menu / OS installer
http://www.berryboot.com/
Other
799 stars 135 forks source link

build script breaks with error: libfakeroot.c:99:40: error: '_STAT_VER' undeclared (first use in this function) #722

Open bitstuffing opened 2 years ago

bitstuffing commented 2 years ago

When I launched the compilation script:

./build-berryboot.sh device_pi64

It throws this error:

`/bin/sh ./libtool --tag=CC --mode=compile /usr/bin/gcc -DHAVE_CONFIG_H -I. -I/home/user/workspace/berryboot/buildroot-2018.08/output/host/include -O2 -I/home/user/workspace/berryboot/buildroot-2018.08/output/host/include -c -o libfakeroot.lo libfakeroot.c libtool: compile: /usr/bin/gcc -DHAVE_CONFIG_H -I. -I/home/user/workspace/berryboot/buildroot-2018.08/output/host/include -O2 -I/home/user/workspace/berryboot/buildroot-2018.08/output/host/include -c libfakeroot.c -fPIC -DPIC -o .libs/libfakeroot.o In file included from communicate.h:20, from libfakeroot.c:60: 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) ^~~~~ fakerootconfig.h:9:43: note: in definition of macro 'NEXT_STAT64' 9 #define NEXT_STAT64(a,b,c) next___xstat64(a,b,c) ^ libfakeroot.c:810:5: note: in expansion of macro 'INT_NEXT_STAT' 810 r=INT_NEXT_STAT(path, &st); ^~~~~ libfakeroot.c:99:40: note: each undeclared identifier is reported only once for each function it appears in 99 #define INT_NEXT_STAT(a,b) NEXT_STAT64(_STAT_VER,a,b) ^~~~~ fakerootconfig.h:9:43: note: in definition of macro 'NEXT_STAT64' 9 #define NEXT_STAT64(a,b,c) next___xstat64(a,b,c) ^ libfakeroot.c:810:5: note: in expansion of macro 'INT_NEXT_STAT' 810 r=INT_NEXT_STAT(path, &st); ^~~~~ libfakeroot.c: In function 'lchown': libfakeroot.c:100:42: error: '_STAT_VER' undeclared (first use in this function) 100 #define INT_NEXT_LSTAT(a,b) NEXT_LSTAT64(_STAT_VER,a,b) ^~~~~ fakerootconfig.h:13:45: note: in definition of macro 'NEXT_LSTAT64' 13 #define NEXT_LSTAT64(a,b,c) next___lxstat64(a,b,c) ^ libfakeroot.c:842:5: note: in expansion of macro 'INT_NEXT_LSTAT' 842 r=INT_NEXT_LSTAT(path, &st); ^~~~~~ libfakeroot.c: In function 'fchown': libfakeroot.c:101:42: error: '_STAT_VER' undeclared (first use in this function) 101 #define INT_NEXT_FSTAT(a,b) NEXT_FSTAT64(_STAT_VER,a,b) ^~~~~ fakerootconfig.h:11:45: note: in definition of macro 'NEXT_FSTAT64' 11 #define NEXT_FSTAT64(a,b,c) next___fxstat64(a,b,c) ^ libfakeroot.c:863:5: note: in expansion of macro 'INT_NEXT_FSTAT' 863 r=INT_NEXT_FSTAT(fd, &st); ^~~~~~ libfakeroot.c: In function 'fchownat': libfakeroot.c:102:50: error: '_STAT_VER' undeclared (first use in this function) 102 #define INT_NEXT_FSTATAT(a,b,c,d) NEXT_FSTATAT64(_STAT_VER,a,b,c,d) ^~~~~ fakerootconfig.h:15:53: note: in definition of macro 'NEXT_FSTATAT64' 15 #define NEXT_FSTATAT64(a,b,c,d,e) next___fxstatat64(a,b,c,d,e) ^ libfakeroot.c:889:5: note: in expansion of macro 'INT_NEXT_FSTATAT' 889 r=INT_NEXT_FSTATAT(dir_fd, path, &st, (flags & AT_SYMLINK_NOFOLLOW)); ^~~~ libfakeroot.c: In function 'chmod': 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) ^~~~~ fakerootconfig.h:9:43: note: in definition of macro 'NEXT_STAT64' 9 #define NEXT_STAT64(a,b,c) next___xstat64(a,b,c) ^ libfakeroot.c:920:5: note: in expansion of macro 'INT_NEXT_STAT' 920 r=INT_NEXT_STAT(path, &st); ^~~~~ libfakeroot.c: In function 'lchmod': libfakeroot.c:100:42: error: '_STAT_VER' undeclared (first use in this function) 100 #define INT_NEXT_LSTAT(a,b) NEXT_LSTAT64(_STAT_VER,a,b) ^~~~~ fakerootconfig.h:13:45: note: in definition of macro 'NEXT_LSTAT64' 13 #define NEXT_LSTAT64(a,b,c) next___lxstat64(a,b,c) ^ libfakeroot.c:960:5: note: in expansion of macro 'INT_NEXT_LSTAT' 960 r=INT_NEXT_LSTAT(path, &st); ^~~~~~ libfakeroot.c: In function 'fchmod': libfakeroot.c:101:42: error: '_STAT_VER' undeclared (first use in this function) 101 #define INT_NEXT_FSTAT(a,b) NEXT_FSTAT64(_STAT_VER,a,b) ^~~~~ fakerootconfig.h:11:45: note: in definition of macro 'NEXT_FSTAT64' 11 #define NEXT_FSTAT64(a,b,c) next___fxstat64(a,b,c) ^ libfakeroot.c:994:5: note: in expansion of macro 'INT_NEXT_FSTAT' 994 r=INT_NEXT_FSTAT(fd, &st); ^~~~~~ libfakeroot.c: In function 'fchmodat': libfakeroot.c:102:50: error: '_STAT_VER' undeclared (first use in this function) 102 #define INT_NEXT_FSTATAT(a,b,c,d) NEXT_FSTATAT64(_STAT_VER,a,b,c,d) ^~~~~ fakerootconfig.h:15:53: note: in definition of macro 'NEXT_FSTATAT64' 15 #define NEXT_FSTATAT64(a,b,c,d,e) next___fxstatat64(a,b,c,d,e) ^ libfakeroot.c:1026:5: note: in expansion of macro 'INT_NEXT_FSTATAT' 1026 r=INT_NEXT_FSTATAT(dir_fd, path, &st, flags & AT_SYMLINK_NOFOLLOW); ^~~~ libfakeroot.c: In function '__xmknod': libfakeroot.c:100:42: error: '_STAT_VER' undeclared (first use in this function) 100 #define INT_NEXT_LSTAT(a,b) NEXT_LSTAT64(_STAT_VER,a,b) ^~~~~ fakerootconfig.h:13:45: note: in definition of macro 'NEXT_LSTAT64' 13 #define NEXT_LSTAT64(a,b,c) next___lxstat64(a,b,c) ^ libfakeroot.c:1073:5: note: in expansion of macro 'INT_NEXT_LSTAT' 1073 r=INT_NEXT_LSTAT(pathname, &st); ^~~~~~ libfakeroot.c: In function '__xmknodat': libfakeroot.c:102:50: error: '_STAT_VER' undeclared (first use in this function) 102 #define INT_NEXT_FSTATAT(a,b,c,d) NEXT_FSTATAT64(_STAT_VER,a,b,c,d) ^~~~~ fakerootconfig.h:15:53: note: in definition of macro 'NEXT_FSTATAT64' 15 #define NEXT_FSTATAT64(a,b,c,d,e) next___fxstatat64(a,b,c,d,e) ^ libfakeroot.c:1113:5: note: in expansion of macro 'INT_NEXT_FSTATAT' 1113 r=INT_NEXT_FSTATAT(dir_fd, pathname, &st, 0); ^~~~ libfakeroot.c: In function 'mkdir': 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) ^~~~~ fakerootconfig.h:9:43: note: in definition of macro 'NEXT_STAT64' 9 #define NEXT_STAT64(a,b,c) next___xstat64(a,b,c) ^ libfakeroot.c:1149:5: note: in expansion of macro 'INT_NEXT_STAT' 1149 r=INT_NEXT_STAT(path, &st); ^~~~~ libfakeroot.c: In function 'mkdirat': libfakeroot.c:102:50: error: '_STAT_VER' undeclared (first use in this function) 102 #define INT_NEXT_FSTATAT(a,b,c,d) NEXT_FSTATAT64(_STAT_VER,a,b,c,d) ^~~~~ fakerootconfig.h:15:53: note: in definition of macro 'NEXT_FSTATAT64' 15 #define NEXT_FSTATAT64(a,b,c,d,e) next___fxstatat64(a,b,c,d,e) ^ libfakeroot.c:1179:5: note: in expansion of macro 'INT_NEXT_FSTATAT' 1179 r=INT_NEXT_FSTATAT(dir_fd, path, &st, 0); ^~~~ libfakeroot.c: In function 'unlink': libfakeroot.c:100:42: error: '_STAT_VER' undeclared (first use in this function) 100 #define INT_NEXT_LSTAT(a,b) NEXT_LSTAT64(_STAT_VER,a,b) ^~~~~ fakerootconfig.h:13:45: note: in definition of macro 'NEXT_LSTAT64' 13 #define NEXT_LSTAT64(a,b,c) next___lxstat64(a,b,c) ^ libfakeroot.c:1213:5: note: in expansion of macro 'INT_NEXT_LSTAT' 1213 r=INT_NEXT_LSTAT(pathname, &st); ^~~~~~ libfakeroot.c: In function 'unlinkat': libfakeroot.c:102:50: error: '_STAT_VER' undeclared (first use in this function) 102 #define INT_NEXT_FSTATAT(a,b,c,d) NEXT_FSTATAT64(_STAT_VER,a,b,c,d) ^~~~~ fakerootconfig.h:15:53: note: in definition of macro 'NEXT_FSTATAT64' 15 #define NEXT_FSTATAT64(a,b,c,d,e) next___fxstatat64(a,b,c,d,e) ^ libfakeroot.c:1232:5: note: in expansion of macro 'INT_NEXT_FSTATAT' 1232 r=INT_NEXT_FSTATAT(dir_fd, pathname, &st, (flags&~AT_REMOVEDIR) AT_SYMLINK_NOFOLLOW); ^~~~ libfakeroot.c: In function 'rmdir': libfakeroot.c:100:42: error: '_STAT_VER' undeclared (first use in this function) 100 #define INT_NEXT_LSTAT(a,b) NEXT_LSTAT64(_STAT_VER,a,b) ^~~~~ fakerootconfig.h:13:45: note: in definition of macro 'NEXT_LSTAT64' 13 #define NEXT_LSTAT64(a,b,c) next___lxstat64(a,b,c) ^ libfakeroot.c:1256:5: note: in expansion of macro 'INT_NEXT_LSTAT' 1256 r=INT_NEXT_LSTAT(pathname, &st); ^~~~~~ libfakeroot.c: In function 'remove': libfakeroot.c:100:42: error: '_STAT_VER' undeclared (first use in this function) 100 #define INT_NEXT_LSTAT(a,b) NEXT_LSTAT64(_STAT_VER,a,b) ^~~~~ fakerootconfig.h:13:45: note: in definition of macro 'NEXT_LSTAT64' 13 #define NEXT_LSTAT64(a,b,c) next___lxstat64(a,b,c) ^ libfakeroot.c:1276:5: note: in expansion of macro 'INT_NEXT_LSTAT' 1276 r=INT_NEXT_LSTAT(pathname, &st); ^~~~~~ libfakeroot.c: In function 'rename': libfakeroot.c:100:42: error: '_STAT_VER' undeclared (first use in this function) 100 #define INT_NEXT_LSTAT(a,b) NEXT_LSTAT64(_STAT_VER,a,b) ^~~~~ fakerootconfig.h:13:45: note: in definition of macro 'NEXT_LSTAT64' 13 #define NEXT_LSTAT64(a,b,c) next___lxstat64(a,b,c) ^ libfakeroot.c:1306:5: note: in expansion of macro 'INT_NEXT_LSTAT' 1306 r=INT_NEXT_LSTAT(newpath, &st); ^~~~~~ libfakeroot.c: In function 'renameat': libfakeroot.c:102:50: error: '_STAT_VER' undeclared (first use in this function) 102 #define INT_NEXT_FSTATAT(a,b,c,d) NEXT_FSTATAT64(_STAT_VER,a,b,c,d) ^~~~~ fakerootconfig.h:15:53: note: in definition of macro 'NEXT_FSTATAT64' 15 #define NEXT_FSTATAT64(a,b,c,d,e) next___fxstatat64(a,b,c,d,e) ^ libfakeroot.c:1330:5: note: in expansion of macro 'INT_NEXT_FSTATAT' 1330 r=INT_NEXT_FSTATAT(newdir_fd, newpath, &st, AT_SYMLINK_NOFOLLOW); ^~~~ libfakeroot.c: In function 'setxattr': 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) ^~~~~ fakerootconfig.h:9:43: note: in definition of macro 'NEXT_STAT64' 9 #define NEXT_STAT64(a,b,c) next___xstat64(a,b,c) ^ libfakeroot.c:1664:5: note: in expansion of macro 'INT_NEXT_STAT' 1664 r=INT_NEXT_STAT(path, &st); ^~~~~ libfakeroot.c: In function 'lsetxattr': libfakeroot.c:100:42: error: '_STAT_VER' undeclared (first use in this function) 100 #define INT_NEXT_LSTAT(a,b) NEXT_LSTAT64(_STAT_VER,a,b) ^~~~~ fakerootconfig.h:13:45: note: in definition of macro 'NEXT_LSTAT64' 13 #define NEXT_LSTAT64(a,b,c) next___lxstat64(a,b,c) ^ libfakeroot.c:1685:5: note: in expansion of macro 'INT_NEXT_LSTAT' 1685 r=INT_NEXT_LSTAT(path, &st); ^~~~~~ libfakeroot.c: In function 'fsetxattr': libfakeroot.c:101:42: error: '_STAT_VER' undeclared (first use in this function) 101 #define INT_NEXT_FSTAT(a,b) NEXT_FSTAT64(_STAT_VER,a,b) ^~~~~ fakerootconfig.h:11:45: note: in definition of macro 'NEXT_FSTAT64' 11 #define NEXT_FSTAT64(a,b,c) next___fxstat64(a,b,c) ^ libfakeroot.c:1706:5: note: in expansion of macro 'INT_NEXT_FSTAT' 1706 r=INT_NEXT_FSTAT(fd, &st); ^~~~~~ libfakeroot.c: In function 'getxattr': 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) ^~~~~ fakerootconfig.h:9:43: note: in definition of macro 'NEXT_STAT64' 9 #define NEXT_STAT64(a,b,c) next___xstat64(a,b,c) ^ libfakeroot.c:1727:5: note: in expansion of macro 'INT_NEXT_STAT' 1727 r=INT_NEXT_STAT(path, &st); ^~~~~ libfakeroot.c: In function 'lgetxattr': libfakeroot.c:100:42: error: '_STAT_VER' undeclared (first use in this function) 100 #define INT_NEXT_LSTAT(a,b) NEXT_LSTAT64(_STAT_VER,a,b) ^~~~~ fakerootconfig.h:13:45: note: in definition of macro 'NEXT_LSTAT64' 13 #define NEXT_LSTAT64(a,b,c) next___lxstat64(a,b,c) ^ libfakeroot.c:1748:5: note: in expansion of macro 'INT_NEXT_LSTAT' 1748 r=INT_NEXT_LSTAT(path, &st); ^~~~~~ libfakeroot.c: In function 'fgetxattr': libfakeroot.c:101:42: error: '_STAT_VER' undeclared (first use in this function) 101 #define INT_NEXT_FSTAT(a,b) NEXT_FSTAT64(_STAT_VER,a,b) ^~~~~ fakerootconfig.h:11:45: note: in definition of macro 'NEXT_FSTAT64' 11 #define NEXT_FSTAT64(a,b,c) next___fxstat64(a,b,c) ^ libfakeroot.c:1769:5: note: in expansion of macro 'INT_NEXT_FSTAT' 1769 r=INT_NEXT_FSTAT(fd, &st); ^~~~~~ libfakeroot.c: In function 'listxattr': 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) ^~~~~ fakerootconfig.h:9:43: note: in definition of macro 'NEXT_STAT64' 9 #define NEXT_STAT64(a,b,c) next___xstat64(a,b,c) ^ libfakeroot.c:1790:5: note: in expansion of macro 'INT_NEXT_STAT' 1790 r=INT_NEXT_STAT(path, &st); ^~~~~ libfakeroot.c: In function 'llistxattr': libfakeroot.c:100:42: error: '_STAT_VER' undeclared (first use in this function) 100 #define INT_NEXT_LSTAT(a,b) NEXT_LSTAT64(_STAT_VER,a,b) ^~~~~ fakerootconfig.h:13:45: note: in definition of macro 'NEXT_LSTAT64' 13 #define NEXT_LSTAT64(a,b,c) next___lxstat64(a,b,c) ^ libfakeroot.c:1811:5: note: in expansion of macro 'INT_NEXT_LSTAT' 1811 r=INT_NEXT_LSTAT(path, &st); ^~~~~~ libfakeroot.c: In function 'flistxattr': libfakeroot.c:101:42: error: '_STAT_VER' undeclared (first use in this function) 101 #define INT_NEXT_FSTAT(a,b) NEXT_FSTAT64(_STAT_VER,a,b) ^~~~~ fakerootconfig.h:11:45: note: in definition of macro 'NEXT_FSTAT64' 11 #define NEXT_FSTAT64(a,b,c) next___fxstat64(a,b,c) ^ libfakeroot.c:1832:5: note: in expansion of macro 'INT_NEXT_FSTAT' 1832 r=INT_NEXT_FSTAT(fd, &st); ^~~~~~ libfakeroot.c: In function 'removexattr': 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) ^~~~~ fakerootconfig.h:9:43: note: in definition of macro 'NEXT_STAT64' 9 #define NEXT_STAT64(a,b,c) next___xstat64(a,b,c) ^ libfakeroot.c:1853:5: note: in expansion of macro 'INT_NEXT_STAT' 1853 r=INT_NEXT_STAT(path, &st); ^~~~~ libfakeroot.c: In function 'lremovexattr': libfakeroot.c:100:42: error: '_STAT_VER' undeclared (first use in this function) 100 #define INT_NEXT_LSTAT(a,b) NEXT_LSTAT64(_STAT_VER,a,b) ^~~~~ fakerootconfig.h:13:45: note: in definition of macro 'NEXT_LSTAT64' 13 #define NEXT_LSTAT64(a,b,c) next___lxstat64(a,b,c) ^ libfakeroot.c:1874:5: note: in expansion of macro 'INT_NEXT_LSTAT' 1874 r=INT_NEXT_LSTAT(path, &st); ^~~~~~ libfakeroot.c: In function 'fremovexattr': libfakeroot.c:101:42: error: '_STAT_VER' undeclared (first use in this function) 101 #define INT_NEXT_FSTAT(a,b) NEXT_FSTAT64(_STAT_VER,a,b) ^~~~~ fakerootconfig.h:11:45: note: in definition of macro 'NEXT_FSTAT64' 11 #define NEXT_FSTAT64(a,b,c) next___fxstat64(a,b,c) ^ libfakeroot.c:1895:5: note: in expansion of macro 'INT_NEXT_FSTAT' 1895 r=INT_NEXT_FSTAT(fd, &st); ^~~~~~ libfakeroot.c: In function 'fts_read': libfakeroot.c:1959:22: warning: passing argument 1 of 'send_get_stat64' from incompatible pointer type [-Wincompatible-pointer-types] 1959 SEND_GET_STAT64(r->fts_statp, _STAT_VER); ~^~~
struct stat *
libfakeroot.c:89:46: note: in definition of macro 'SEND_GET_STAT64' 89 #define SEND_GET_STAT64(a,b) send_get_stat64(a) ^ In file included from libfakeroot.c:60: communicate.h:209:44: note: expected 'struct stat64 ' but argument is of type 'struct stat ' 209 extern void send_get_stat64(struct stat64 *buf); ~~~^~~ libfakeroot.c: In function 'fts_children': libfakeroot.c:1982:24: warning: passing argument 1 of 'send_get_stat64' from incompatible pointer type [-Wincompatible-pointer-types] 1982 SEND_GET_STAT64(r->fts_statp, _STAT_VER); ~^~~
struct stat *

libfakeroot.c:89:46: note: in definition of macro 'SEND_GET_STAT64' 89 | #define SEND_GET_STAT64(a,b) send_get_stat64(a) | ^ In file included from libfakeroot.c:60: communicate.h:209:44: note: expected 'struct stat64 ' but argument is of type 'struct stat ' 209 | extern void send_get_stat64(struct stat64 *buf); | ~~~^~~ make[3]: [Makefile:642: libfakeroot.lo] Error 1 make[3]: se sale del directorio '/home/user/workspace/berryboot/buildroot-2018.08/output/build/host-fakeroot-1.20.2' make[2]: [Makefile:660: all-recursive] Error 1 make[2]: se sale del directorio '/home/user/workspace/berryboot/buildroot-2018.08/output/build/host-fakeroot-1.20.2' make[1]: [Makefile:434: all] Error 2 make[1]: se sale del directorio '/home/user/workspace/berryboot/buildroot-2018.08/output/build/host-fakeroot-1.20.2' make: [package/pkg-generic.mk:232: /home/user/workspace/berryboot/buildroot-2018.08/output/build/host-fakeroot-1.20.2/.stamp_built] Error 2 `

I've seen _STAT_VER is defined in builtroot/output/build/host-fakeroot-1.20.2/configure and configure.ac, but the same error is launched in next version, with a fixed .patch (old):

https://git.busybox.net/buildroot/commit/?id=f45925a951318e9e53bead80b363e004301adc6f

It happens launching the build script on ArchLinux with Linux bitlap 5.13.13-arch1-1 #1 SMP PREEMPT Thu, 26 Aug 2021 19:14:36 +0000 x86_64 GNU/Linux

symbios24 commented 2 years ago

Better use the script in ubuntu or raspbian

abc123me commented 1 month ago

This patched solved the problem for me: https://bugs.archlinux.org/attachments/69572/19705/no_STAT_VER.patch