From: Jonathan Nieder <jrnieder@gmail.com>
To: "Gabor Z. Papp" <gzp@papp.hu>
Cc: git@vger.kernel.org
Subject: Re: git 1.6.6.1 on glibc 2.2
Date: Sun, 24 Jan 2010 11:40:08 -0600 [thread overview]
Message-ID: <20100124174008.GA7622@progeny.tock> (raw)
In-Reply-To: <x6d40zmte6@gzp>
Gabor Z. Papp wrote:
>| Gabor Z. Papp wrote:
>|> trying to compile git 1.6.6.1 on Linux 2.4.37.7, glibc 2.2.5:
>|>
>|> read-cache.c: In function 'fill_stat_cache_info':
>|> read-cache.c:72: error: 'struct stat' has no member named 'st_ctim'
[...]
> Thanks Jonathan, compiles fine defining NO_NSEC, but my glibc is 2.2.5
> and the comment abot USE_NSEC says it requires at least glibc
> 2.2.4. Maybe the comment is wrong? glibc 2.3.6 compiles fine.
Hmm, in the glibc changelog I find this, from ChangeLog.14:
| 2003-01-04 Andreas Schwab <schwab@suse.de>
|
| * sysdeps/unix/sysv/linux/m68k/bits/stat.h: Add nanosecond fields.
That’s around the time of glibc 2.3.2.
The stat(2) man page tells a little more:
| Since kernel 2.5.48, the stat structure supports nanosecond resolution for
| the three file timestamp fields. Glibc exposes the nanosecond component
| of each field using names either of the form st_atim.tv_nsec, if the
| _BSD_SOURCE or _SVID_SOURCE feature test macro is defined, or of the form
| st_atimensec, if neither of these macros is defined. On file systems that
| do not support sub-second timestamps, these nanosecond fields are returned
| with the value 0.
Searching a little harder yields commit cvs/glibc-2_3_2~418
(2002-12-31) of git://sourceware.org/git/glibc.git, in which the
feature was added. There’s a lovely discussion about it from then on
libc-alpha. [1]
The comment you mention is from commit bdd4da5 (Make nsec checking
optional, 2005-04-13); I am guessing 2.2.4 was just mentioned as a lower
bound.
So how about something like the following? Please feel free to
write something better --- in particular, I am not sure the
documentation for USE_NSEC is the most obvious place to look when
something goes wrong.
Thanks,
Jonathan
[1] http://sourceware.org/ml/libc-alpha/2002-12/threads.html#00011
-- %< --
Subject: Makefile: document minimal glibc version supporting tv_nsec
Compiling git with the default settings and old glibc produces
errors like the following:
| read-cache.c: In function 'fill_stat_cache_info':
| read-cache.c:72: error: 'struct stat' has no member named 'st_ctim'
The Makefile seems to imply that versions after 2.2.4 should be
okay, but that is not true: NO_NSEC must be set to build with
glibc versions before 2.3.2.
Reported-by: Gabor Z. Papp <gzp@papp.hu>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
---
diff --git a/Makefile b/Makefile
index fd7f51e..8ebc966 100644
--- a/Makefile
+++ b/Makefile
@@ -134,7 +134,7 @@ all::
# "-Wl,-rpath=/path/lib" is used instead.
#
# Define USE_NSEC below if you want git to care about sub-second file mtimes
-# and ctimes. Note that you need recent glibc (at least 2.2.4) for this, and
+# and ctimes. Note that you need recent glibc (at least 2.3.2) for this, and
# it will BREAK YOUR LOCAL DIFFS! show-diff and anything using it will likely
# randomly break unless your underlying filesystem supports those sub-second
# times (my ext3 doesn't).
prev parent reply other threads:[~2010-01-24 17:40 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-01-24 11:35 git 1.6.6.1 on glibc 2.2 Gabor Z. Papp
2010-01-24 12:27 ` Jonathan Nieder
2010-01-24 15:09 ` Gabor Z. Papp
2010-01-24 17:40 ` Jonathan Nieder [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20100124174008.GA7622@progeny.tock \
--to=jrnieder@gmail.com \
--cc=git@vger.kernel.org \
--cc=gzp@papp.hu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).