GNU bug report logs -
#68808
subsecond mtime discovery code insufficient
Previous Next
Full log
Message #14 received at 68808 <at> debbugs.gnu.org (full text, mbox):
I found the problem! The default GNU make on macOS (even Sonoma) is 3.81 from 2006! The configure script for GNU make versions <4.0 did not have the right test for subsecond resolution in the macOS stat() function, so 3.81 was built with resolution only to the second, not subsecond, thus needing at least one second sleep. (Why, then, does Apple continue to include 3.81 in the software 18 years later? Beyond me.)
Installing the most recent release of GNU make (4.4.1) fixes the problem. Tests all run successfully.
Erik
----------------------------------------
Details ... With make 3.81, if I create a simple Makefile with
foo: bar
touch foo
then
touch foo
touch bar
make
should make (touch) foo because bar is newer. However, if these are done immediately after each other
touch foo; touch bar; make
then, most of the time, make just responds with "make: `foo' is up to date." The following
n=0; while make | grep -q 'up to date'; do touch foo; touch bar; printf .; n=$(($n+1)); done; echo $n
varies from a handful of trials to several thousand trials before foo's mtime's integer is one less than bar's mtime's integer.
This bug report was last modified 1 year and 13 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.