{"thread":{"id":"22368","subject":"git 1.6.6.1 on glibc 2.2","startedAt":"2010-01-24T11:35:05Z","lastAt":"2010-01-24T17:40:08Z","messageCount":4,"participants":["Gabor Z. Papp","Jonathan Nieder"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"132533","messageId":"x6y6jn4txy@gzp","threadId":"22368","inReplyTo":null,"subject":"git 1.6.6.1 on glibc 2.2","fromName":"Gabor Z. Papp","fromEmail":"gzp@papp.hu","sentAt":"2010-01-24T11:35:05Z","receivedAt":"2010-01-24T11:35:05Z","isPatch":false,"sender":{"key":"gzp@papp.hu","avatar":null},"body":"Hello all,\n\ntrying to compile git 1.6.6.1 on Linux 2.4.37.7, glibc 2.2.5:\n\nread-cache.c: In function 'fill_stat_cache_info':\nread-cache.c:72: error: 'struct stat' has no member named 'st_ctim'\nread-cache.c:73: error: 'struct stat' has no member named 'st_mtim'\nread-cache.c: In function 'read_index_from':\nread-cache.c:1316: error: 'struct stat' has no member named 'st_mtim'\nread-cache.c: In function 'write_index':\nread-cache.c:1581: error: 'struct stat' has no member named 'st_mtim'\nmake: *** [read-cache.o] Error 1\n\n"},{"id":"132534","messageId":"20100124122751.GA3265@progeny.tock","threadId":"22368","inReplyTo":"x6y6jn4txy@gzp","subject":"Re: git 1.6.6.1 on glibc 2.2","fromName":"Jonathan Nieder","fromEmail":"jrnieder@gmail.com","sentAt":"2010-01-24T12:27:51Z","receivedAt":"2010-01-24T12:27:51Z","isPatch":false,"sender":{"key":"jrnieder@gmail.com","avatar":"https://avatars.githubusercontent.com/u/281595?v=4"},"body":"Hi!\n\nGabor Z. Papp wrote:\n> Hello all,\n> \n> trying to compile git 1.6.6.1 on Linux 2.4.37.7, glibc 2.2.5:\n> \n> read-cache.c: In function 'fill_stat_cache_info':\n> read-cache.c:72: error: 'struct stat' has no member named 'st_ctim'\n\nThanks for the report.  Perhaps:\n\n$ grep -C3 st_ctim Makefile\n# randomly break unless your underlying filesystem supports those sub-second\n# times (my ext3 doesn't).\n#\n# Define USE_ST_TIMESPEC if your \"struct stat\" uses \"st_ctimespec\" instead of\n# \"st_ctim\"\n#\n# Define NO_NSEC if your \"struct stat\" does not have \"st_ctim.tv_nsec\"\n# available.  This automatically turns USE_NSEC off.\n#\n# Define USE_STDEV below if you want git to care about the underlying device\n\nHope that helps,\nJonathan\n"},{"id":"132542","messageId":"x6d40zmte6@gzp","threadId":"22368","inReplyTo":"20100124122751.GA3265@progeny.tock","subject":"Re: git 1.6.6.1 on glibc 2.2","fromName":"Gabor Z. Papp","fromEmail":"gzp@papp.hu","sentAt":"2010-01-24T15:09:37Z","receivedAt":"2010-01-24T15:09:37Z","isPatch":false,"sender":{"key":"gzp@papp.hu","avatar":null},"body":"* Jonathan Nieder <jrnieder@gmail.com>:\n\n| > trying to compile git 1.6.6.1 on Linux 2.4.37.7, glibc 2.2.5:\n| > \n| > read-cache.c: In function 'fill_stat_cache_info':\n| > read-cache.c:72: error: 'struct stat' has no member named 'st_ctim'\n\n| Thanks for the report.  Perhaps:\n| # Define NO_NSEC if your \"struct stat\" does not have \"st_ctim.tv_nsec\"\n| # available.  This automatically turns USE_NSEC off.\n\nThanks Jonathan, compiles fine defining NO_NSEC, but my glibc is 2.2.5\nand the comment abot USE_NSEC says it requires at least glibc\n2.2.4. Maybe the comment is wrong? glibc 2.3.6 compiles fine.\n"},{"id":"132545","messageId":"20100124174008.GA7622@progeny.tock","threadId":"22368","inReplyTo":"x6d40zmte6@gzp","subject":"Re: git 1.6.6.1 on glibc 2.2","fromName":"Jonathan Nieder","fromEmail":"jrnieder@gmail.com","sentAt":"2010-01-24T17:40:08Z","receivedAt":"2010-01-24T17:40:08Z","isPatch":false,"sender":{"key":"jrnieder@gmail.com","avatar":"https://avatars.githubusercontent.com/u/281595?v=4"},"body":"Gabor Z. Papp wrote:\n>| Gabor Z. Papp wrote:\n \n>|> trying to compile git 1.6.6.1 on Linux 2.4.37.7, glibc 2.2.5:\n>|> \n>|> read-cache.c: In function 'fill_stat_cache_info':\n>|> read-cache.c:72: error: 'struct stat' has no member named 'st_ctim'\n[...] \n> Thanks Jonathan, compiles fine defining NO_NSEC, but my glibc is 2.2.5\n> and the comment abot USE_NSEC says it requires at least glibc\n> 2.2.4. Maybe the comment is wrong? glibc 2.3.6 compiles fine.\n\nHmm, in the glibc changelog I find this, from ChangeLog.14:\n\n| 2003-01-04  Andreas Schwab  <schwab@suse.de>\n|\n|\t* sysdeps/unix/sysv/linux/m68k/bits/stat.h: Add nanosecond fields.\n\nThat’s around the time of glibc 2.3.2.\n\nThe stat(2) man page tells a little more:\n\n| Since kernel 2.5.48, the stat structure supports nanosecond resolution for\n| the  three  file timestamp fields.  Glibc exposes the nanosecond component\n| of each field using names either  of  the  form  st_atim.tv_nsec,  if  the\n| _BSD_SOURCE  or _SVID_SOURCE feature test macro is defined, or of the form\n| st_atimensec, if neither of these macros is defined.  On file systems that\n| do not support sub-second timestamps, these nanosecond fields are returned\n| with the value 0.\n\nSearching a little harder yields commit cvs/glibc-2_3_2~418\n(2002-12-31) of git://sourceware.org/git/glibc.git, in which the\nfeature was added.  There’s a lovely discussion about it from then on\nlibc-alpha. [1]\n\nThe comment you mention is from commit bdd4da5 (Make nsec checking\noptional, 2005-04-13); I am guessing 2.2.4 was just mentioned as a lower\nbound.\n\nSo how about something like the following?  Please feel free to\nwrite something better --- in particular, I am not sure the\ndocumentation for USE_NSEC is the most obvious place to look when\nsomething goes wrong.\n\nThanks,\nJonathan\n\n[1] http://sourceware.org/ml/libc-alpha/2002-12/threads.html#00011\n\n-- %< --\nSubject: Makefile: document minimal glibc version supporting tv_nsec\n\nCompiling git with the default settings and old glibc produces\nerrors like the following:\n\n| read-cache.c: In function 'fill_stat_cache_info':\n| read-cache.c:72: error: 'struct stat' has no member named 'st_ctim'\n\nThe Makefile seems to imply that versions after 2.2.4 should be\nokay, but that is not true: NO_NSEC must be set to build with\nglibc versions before 2.3.2.\n\nReported-by: Gabor Z. Papp <gzp@papp.hu>\nSigned-off-by: Jonathan Nieder <jrnieder@gmail.com>\n---\ndiff --git a/Makefile b/Makefile\nindex fd7f51e..8ebc966 100644\n--- a/Makefile\n+++ b/Makefile\n@@ -134,7 +134,7 @@ all::\n # \"-Wl,-rpath=/path/lib\" is used instead.\n #\n # Define USE_NSEC below if you want git to care about sub-second file mtimes\n-# and ctimes. Note that you need recent glibc (at least 2.2.4) for this, and\n+# and ctimes. Note that you need recent glibc (at least 2.3.2) for this, and\n # it will BREAK YOUR LOCAL DIFFS! show-diff and anything using it will likely\n # randomly break unless your underlying filesystem supports those sub-second\n # times (my ext3 doesn't).\n"}]}