Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 550958 - app-arch/tar-1.28-r1 fails to cross build against uClibc on amd64
Summary: app-arch/tar-1.28-r1 fails to cross build against uClibc on amd64
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: uclibc-porting
  Show dependency tree
 
Reported: 2015-06-01 15:28 UTC by Sven E.
Modified: 2021-11-04 05:14 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
build.log (build.log,49.71 KB, text/plain)
2015-06-01 15:30 UTC, Sven E.
Details
tar-1.28-dirent-conditional.patch (tar-1.28-dirent-conditional.patch,555 bytes, patch)
2015-08-15 23:42 UTC, Sven E.
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Sven E. 2015-06-01 15:28:45 UTC
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
Comment 1 Sven E. 2015-06-01 15:30:35 UTC
Created attachment 404422 [details]
build.log

full build log
Comment 2 Sven E. 2015-06-01 15:37:05 UTC
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.
Comment 3 Sven E. 2015-06-11 22:55:06 UTC
(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.
Comment 4 Sven E. 2015-08-15 23:42:48 UTC
Created attachment 409118 [details, diff]
tar-1.28-dirent-conditional.patch

Patch fixing the issue
Comment 5 Sven E. 2015-08-15 23:44:12 UTC
Verify against last year's commit:

http://git.savannah.gnu.org/cgit/tar.git/commit/?id=e9ddc08da0982f36581ae5a8c7763453ff41cfe8
Comment 6 Sven E. 2016-04-23 19:35:59 UTC
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.
Comment 7 Felix Janda 2016-09-10 00:31:11 UTC
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.
Comment 8 SpanKY gentoo-dev 2021-11-04 05:14:22 UTC
prob fixed by now