* git 1.6.6.1 on glibc 2.2
@ 2010-01-24 11:35 Gabor Z. Papp
2010-01-24 12:27 ` Jonathan Nieder
0 siblings, 1 reply; 4+ messages in thread
From: Gabor Z. Papp @ 2010-01-24 11:35 UTC (permalink / raw)
To: git
[-- Attachment #1: Type: text/plain, Size: 521 bytes --]
Hello all,
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'
read-cache.c:73: error: 'struct stat' has no member named 'st_mtim'
read-cache.c: In function 'read_index_from':
read-cache.c:1316: error: 'struct stat' has no member named 'st_mtim'
read-cache.c: In function 'write_index':
read-cache.c:1581: error: 'struct stat' has no member named 'st_mtim'
make: *** [read-cache.o] Error 1
[-- Attachment #2: log.make --]
[-- Type: application/octet-stream, Size: 5267 bytes --]
GIT_VERSION = 1.6.6.1
* new build flags or prefix
CC fast-import.o
CC abspath.o
CC advice.o
CC alias.o
CC alloc.o
CC archive.o
CC archive-tar.o
CC archive-zip.o
CC attr.o
CC base85.o
CC bisect.o
bisect.c: In function 'bisect_next_all':
bisect.c:869: warning: dereferencing pointer '__u' does break strict-aliasing rules
bisect.c:869: note: initialized from here
CC blob.o
CC branch.o
CC bundle.o
bundle.c: In function 'verify_bundle':
bundle.c:125: warning: dereferencing pointer '__u' does break strict-aliasing rules
bundle.c:125: note: initialized from here
CC cache-tree.o
CC color.o
CC combine-diff.o
combine-diff.c: In function 'show_patch_diff':
combine-diff.c:223: warning: dereferencing pointer '__u' does break strict-aliasing rules
combine-diff.c:223: note: initialized from here
CC commit.o
CC config.o
CC connect.o
CC convert.o
convert.c: In function 'apply_filter':
convert.c:291: warning: dereferencing pointer '__u' does break strict-aliasing rules
convert.c:291: note: initialized from here
convert.c:291: warning: dereferencing pointer '__u' does break strict-aliasing rules
convert.c:291: note: initialized from here
convert.c:291: warning: dereferencing pointer '__u' does break strict-aliasing rules
convert.c:291: note: initialized from here
convert.c:291: warning: dereferencing pointer '__u' does break strict-aliasing rules
convert.c:291: note: initialized from here
CC copy.o
CC csum-file.o
CC ctype.o
CC date.o
CC decorate.o
CC diffcore-break.o
CC diffcore-delta.o
CC diffcore-order.o
CC diffcore-pickaxe.o
CC diffcore-rename.o
CC diff-delta.o
CC diff-lib.o
CC diff-no-index.o
CC diff.o
diff.c: In function 'diff_words_show':
diff.c:711: warning: dereferencing pointer '__u' does break strict-aliasing rules
diff.c:711: note: initialized from here
diff.c: In function 'diff_get_patch_id':
diff.c:3317: warning: dereferencing pointer '__u' does break strict-aliasing rules
diff.c:3317: note: initialized from here
diff.c:3328: warning: dereferencing pointer '__u' does break strict-aliasing rules
diff.c:3328: note: initialized from here
diff.c: In function 'builtin_diffstat':
diff.c:1815: warning: dereferencing pointer '__u' does break strict-aliasing rules
diff.c:1815: note: initialized from here
diff.c: In function 'run_diff_cmd':
diff.c:1718: warning: dereferencing pointer '__u' does break strict-aliasing rules
diff.c:1718: note: initialized from here
diff.c: In function 'diff_flush':
diff.c:1862: warning: dereferencing pointer '__u' does break strict-aliasing rules
diff.c:1862: note: initialized from here
diff.c:3461: warning: dereferencing pointer '__u' does break strict-aliasing rules
diff.c:3461: note: initialized from here
CC dir.o
CC editor.o
CC entry.o
CC environment.o
CC exec_cmd.o
CC fsck.o
CC graph.o
CC grep.o
CC hash.o
CC help.o
help.c: In function 'help_unknown_cmd':
help.c:308: warning: dereferencing pointer '__u' does break strict-aliasing rules
help.c:308: note: initialized from here
help.c:309: warning: dereferencing pointer '__u' does break strict-aliasing rules
help.c:309: note: initialized from here
help.c:310: warning: dereferencing pointer '__u' does break strict-aliasing rules
help.c:310: note: initialized from here
CC ident.o
CC levenshtein.o
CC list-objects.o
CC ll-merge.o
ll-merge.c: In function 'll_xdl_merge':
ll-merge.c:79: warning: dereferencing pointer '__u' does break strict-aliasing rules
ll-merge.c:79: note: initialized from here
CC lockfile.o
CC log-tree.o
CC mailmap.o
CC match-trees.o
CC merge-file.o
merge-file.c: In function 'merge_file':
merge-file.c:64: warning: dereferencing pointer '__u' does break strict-aliasing rules
merge-file.c:64: note: initialized from here
merge-file.c:33: warning: dereferencing pointer '__u' does break strict-aliasing rules
merge-file.c:33: note: initialized from here
CC merge-recursive.o
CC name-hash.o
CC notes.o
CC object.o
CC pack-check.o
CC pack-refs.o
pack-refs.c: In function 'pack_refs':
pack-refs.c:89: warning: dereferencing pointer '__u' does break strict-aliasing rules
pack-refs.c:89: note: initialized from here
pack-refs.c:89: warning: dereferencing pointer '__u' does break strict-aliasing rules
pack-refs.c:89: note: initialized from here
pack-refs.c:89: warning: dereferencing pointer '__u' does break strict-aliasing rules
pack-refs.c:89: note: initialized from here
CC pack-revindex.o
CC pack-write.o
CC pager.o
CC parse-options.o
CC patch-delta.o
CC patch-ids.o
CC path.o
CC pkt-line.o
CC preload-index.o
CC pretty.o
CC progress.o
CC quote.o
CC reachable.o
CC read-cache.o
read-cache.c: In function 'fill_stat_cache_info':
read-cache.c:72: error: 'struct stat' has no member named 'st_ctim'
read-cache.c:73: error: 'struct stat' has no member named 'st_mtim'
read-cache.c: In function 'read_index_from':
read-cache.c:1316: error: 'struct stat' has no member named 'st_mtim'
read-cache.c: In function 'write_index':
read-cache.c:1581: error: 'struct stat' has no member named 'st_mtim'
make: *** [read-cache.o] Error 1
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: git 1.6.6.1 on glibc 2.2 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 0 siblings, 1 reply; 4+ messages in thread From: Jonathan Nieder @ 2010-01-24 12:27 UTC (permalink / raw) To: Gabor Z. Papp; +Cc: git Hi! Gabor Z. Papp wrote: > Hello all, > > 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 for the report. Perhaps: $ grep -C3 st_ctim Makefile # randomly break unless your underlying filesystem supports those sub-second # times (my ext3 doesn't). # # Define USE_ST_TIMESPEC if your "struct stat" uses "st_ctimespec" instead of # "st_ctim" # # Define NO_NSEC if your "struct stat" does not have "st_ctim.tv_nsec" # available. This automatically turns USE_NSEC off. # # Define USE_STDEV below if you want git to care about the underlying device Hope that helps, Jonathan ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: git 1.6.6.1 on glibc 2.2 2010-01-24 12:27 ` Jonathan Nieder @ 2010-01-24 15:09 ` Gabor Z. Papp 2010-01-24 17:40 ` Jonathan Nieder 0 siblings, 1 reply; 4+ messages in thread From: Gabor Z. Papp @ 2010-01-24 15:09 UTC (permalink / raw) To: Jonathan Nieder; +Cc: git * Jonathan Nieder <jrnieder@gmail.com>: | > 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 for the report. Perhaps: | # Define NO_NSEC if your "struct stat" does not have "st_ctim.tv_nsec" | # available. This automatically turns USE_NSEC off. 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. ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: git 1.6.6.1 on glibc 2.2 2010-01-24 15:09 ` Gabor Z. Papp @ 2010-01-24 17:40 ` Jonathan Nieder 0 siblings, 0 replies; 4+ messages in thread From: Jonathan Nieder @ 2010-01-24 17:40 UTC (permalink / raw) To: Gabor Z. Papp; +Cc: git 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). ^ permalink raw reply related [flat|nested] 4+ messages in thread
end of thread, other threads:[~2010-01-24 17:40 UTC | newest] Thread overview: 4+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 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 is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.