Bug 1026

Summary: Build failure for *xstat.c for Linux headers < 2.6.4
Product: glibc Reporter: Maciej W. Rozycki <macro>
Component: portsAssignee: Roland McGrath <roland>
Status: VERIFIED FIXED    
Severity: normal CC: glibc-bugs, gotom, vapier
Priority: P2    
Version: unspecified   
Target Milestone: ---   
Host: alpha-linux-gnu Target:
Build: Last reconfirmed:
Attachments: glibc-2.3.5-alpha-xstat64.patch
6001_all_alpha-glibc-2.4-xstat.patch

Description Maciej W. Rozycki 2005-06-20 17:25:03 UTC
As advised by Ulrich Drepper I'm putting this report for you to resolve
when possible.

  The Alpha/Linux port requires *stat64 calls for building
sysdeps/unix/sysv/linux/alpha/*xstat.c, but they have only been introduced
in Linux 2.6.4.  The attached patch fixes the problem by only using these
calls if their numbers are provided by the set of Linux headers used for
the build.

2005-06-20  Maciej W. Rozycki  <macro@linux-mips.org>

	* sysdeps/unix/sysv/linux/alpha/fxstat.c (__fxstat): Exclude code
	for calling the fstat64() syscall if its number is unavailable.
	* sysdeps/unix/sysv/linux/alpha/lxstat.c (__lxstat): Likewise for 
	lstat64().
	* sysdeps/unix/sysv/linux/alpha/xstat.c (__xstat): Likewise for
	stat64().

 Please consider -- for HEAD.

 See also "http://sourceware.org/ml/libc-alpha/2005-06/msg00042.html" and
the containing thread.
Comment 1 Maciej W. Rozycki 2005-06-20 17:28:31 UTC
Created attachment 523 [details]
glibc-2.3.5-alpha-xstat64.patch
Comment 2 Mike Frysinger 2006-03-14 06:14:46 UTC
mmm i'm pretty sure GOTO's patch is more correct:
http://sourceware.org/ml/libc-alpha/2005-02/msg00122.html
Comment 3 Mike Frysinger 2006-03-15 02:51:23 UTC
Created attachment 920 [details]
6001_all_alpha-glibc-2.4-xstat.patch

trunk has a new file that also needs to be updated:
sysdeps/unix/sysv/linux/alpha/fxstatat.c
Comment 4 GOTO Masanori 2006-03-15 05:44:21 UTC
Thanks for your submission.  This patch works more than one year with
Debian alpha platforms.  I'm happy if it'll be integrated in mainline.
Maciej, Richard, could you review it?
Comment 5 Mike Frysinger 2006-03-15 05:49:53 UTC
> This patch works more than one year with Debian alpha platforms.

yeah, we've need it for Gentoo/alpha too
Comment 6 Maciej W. Rozycki 2006-03-17 14:56:23 UTC
 Well, it looks like the resulting library won't work correctly if built
against headers from Linux 2.6.4 or later and run on an earlier kernel.
Comment 7 Mike Frysinger 2006-03-17 15:02:08 UTC
isnt that the point ?  glibc isnt supposed to work on any kernel lower than what
was passed to --enable-kernel at build time ...
Comment 8 Maciej W. Rozycki 2006-03-17 15:15:42 UTC
 It's not about what's been passed to --enable-kernel if at all, but
about what kernel headers are used for the build.  In this particular
case the option wasn't used.
Comment 9 Ulrich Drepper 2008-11-26 23:25:58 UTC
Alpha is not in the main tree anymore since we have no maintainer.  Somebody has
to step up and volunteer to be the maintainer of the alpha ports tree or nothing
will happen.
Comment 10 Matt Turner 2010-05-04 17:12:38 UTC
Richard Henderson committed GOTO Masanori's fix in commit 6a84c77c71 to
glibc-ports.git. Marking as fixed.
Comment 11 GOTO Masanori 2010-05-06 15:11:48 UTC
Thanks a lot, Matt and Richard!