Sun 18 May 2008 05:48:19 PM UTC, original submission:
I found this fascinating bug while compiling StepTalk. I'm
recording it here as I don't have time to fix it now, but
it needs fixing. :-)
What happened is that some header files got stored in the
framework Headers directly at 18:33 and the following ones
at 18:34. I guess I was unlucky and the headers were being
installed just as the clock was changing ?
Anyway, the directory containing the headers then is reported
as being last modified at 18:34.
When everything is built, and you type 'make', make will detect
that some header files are older than the directory that contains
them. And they depend on that directory! So, it will
rebuild them all :-)
To clarify, this is the dependency triggering the rebuild --
Prerequisite `StepTalk.framework/Versions/0/Headers' is newer than target `StepTalk.framework/Versions/0/Headers/STRemoteConversation.h'.
And that obviously then triggers a recompilation of the framework.
Now the fascinating bit is that this new (and pointless) rebuild
rewrites the 'old' header files to update them. And that
implicitly changes the last modified date of the directory
to now.
So the next time you type 'make', the other header files are
now older than the directory, so make does yet another
pointless rebuild to rebuild them - and yet another
compilation gets triggered.
And so on ... now the other half of the header files are
older than the directory ... and so on, for ever. ;-)
As an end result, every type you type 'make' you trigger
a rebuild, which is obviously wrong. :-(
Thanks
|