A cross build for uClibc on amd64 fails with various errors (undeclared var/const name, static assertion failure) Reproducible: Always Steps to Reproduce: 1. Cross build tar for uClibc/amd64 Actual Results: build failes with multiple errors Expected Results: clean build
Created attachment 404422 [details] build.log full build log
Seems the definition of SAVEDIR_SORT_INODE in savedir.h is conditional on D_INO_IN_DIRENT, whilst the value is used unconditional in tar.c:1351.
(In reply to Sven E. from comment #2) > Seems the definition of SAVEDIR_SORT_INODE in savedir.h is conditional on > D_INO_IN_DIRENT, whilst the value is used unconditional in tar.c:1351. Aside from this obvious bug, it might be interesting to find out why: checking for d_ino member in directory struct... guessing no Since d_ino seems to be in dirent. Even though fixing this would only work around the bug for cases where d_ino is not in dirent.
Created attachment 409118 [details, diff] tar-1.28-dirent-conditional.patch Patch fixing the issue
Verify against last year's commit: http://git.savannah.gnu.org/cgit/tar.git/commit/?id=e9ddc08da0982f36581ae5a8c7763453ff41cfe8
As the test for d_ino in dirent always assumes no except for glibc, no matter what, presetting gl_cv_struct_dirent_d_ino to yes works aswell. Adding gl_cv_struct_dirent_d_ino=yes to /usr/share/crossdev/include/site/x86_64-linux-uclibc Does fix the misdetection. Anyways the other fix is still missing from the tree.
Same problem here with musl and arm64. So I would prefer to have the workaround in /usr/share/crossdev/include/site/linux (or in the tar ebuild). The configure test is from gnulib and might also be used in other GNU packages.
prob fixed by now