
#7592: Building the latest master branch on FreeBSD 9.1 fails ---------------------------------+------------------------------------------ Reporter: kazu-yamamoto | Owner: pgj Type: bug | Status: new Priority: normal | Milestone: Component: Build System | Version: 7.7 Keywords: | Os: FreeBSD Architecture: Unknown/Multiple | Failure: Building GHC failed Difficulty: Unknown | Testcase: Blockedby: | Blocking: Related: | ---------------------------------+------------------------------------------ Comment(by igloo): Here are the stat outputs: {{{ First time rules fires: Before copy: 100 10437839 -rwxr-xr-x 1 kazu kazu 20851248 9446798 "Feb 3 05:22:22 2013" "Feb 3 05:22:22 2013" "Feb 3 05:22:22 2013" "Feb 3 05:22:21 2013" 32768 18560 0 utils/ghc-cabal/dist/build/tmp/ghc-cabal (inplace/bin/ghc-cabal doesn't exist) After copy: 100 10437839 -rwxr-xr-x 1 kazu kazu 20851248 9446798 "Feb 3 05:22:22 2013" "Feb 3 05:22:22 2013" "Feb 3 05:22:22 2013" "Feb 3 05:22:21 2013" 32768 18560 0 utils/ghc-cabal/dist/build/tmp/ghc-cabal 100 9395816 -rwxr-xr-x 1 kazu kazu 18824736 9446798 "Feb 3 05:22:22 2013" "Feb 3 05:22:22 2013" "Feb 3 05:22:22 2013" "Feb 3 05:22:22 2013" 32768 18560 0 inplace/bin/ghc-cabal Second time rules fires: Before copy: 100 10437839 -rwxr-xr-x 1 kazu kazu 20851248 9446798 "Feb 3 05:22:22 2013" "Feb 3 05:22:22 2013" "Feb 3 05:22:22 2013" "Feb 3 05:22:21 2013" 32768 18560 0 utils/ghc-cabal/dist/build/tmp/ghc-cabal 100 9395816 -rwxr-xr-x 1 kazu kazu 18824736 9446798 "Feb 3 05:22:48 2013" "Feb 3 05:22:22 2013" "Feb 3 05:22:22 2013" "Feb 3 05:22:22 2013" 32768 18560 0 inplace/bin/ghc-cabal After copy: 100 10437839 -rwxr-xr-x 1 kazu kazu 20851248 9446798 "Feb 3 05:22:50 2013" "Feb 3 05:22:22 2013" "Feb 3 05:22:22 2013" "Feb 3 05:22:21 2013" 32768 18560 0 utils/ghc-cabal/dist/build/tmp/ghc-cabal 100 9395816 -rwxr-xr-x 1 kazu kazu 18821696 9446798 "Feb 3 05:22:48 2013" "Feb 3 05:22:50 2013" "Feb 3 05:22:50 2013" "Feb 3 05:22:22 2013" 32768 18560 0 inplace/bin/ghc-cabal }}} I can't see anything wrong there. I've just looked at the make 3.82 code, and it certainly looks like a dependency needs to be strictly newer than the target for it to be considered changed: {{{ d->changed |= noexist || d_mtime > this_mtime; }}} I think this will need someone who can reproduce the problem to diagnose exactly what's going on (it might be easiest to make a cut-down testcase first). One possibility is that the filesystem has sub-second precision, `stat` is ignoring the extra precision, and `cp` is giving inconsistent times (perhaps truncating the extra precision in the file it creates). Another is that the `stat` syscall is giving the wrong result for some reason. It's also not impossible that this is a `make` bug. -- Ticket URL: http://hackage.haskell.org/trac/ghc/ticket/7592#comment:12 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler