{"id":1558,"date":"2012-01-05T18:59:15","date_gmt":"2012-01-05T07:59:15","guid":{"rendered":"http:\/\/blog.mozilla.org\/nnethercote\/?p=1558"},"modified":"2012-01-05T18:59:15","modified_gmt":"2012-01-05T07:59:15","slug":"a-fix-for-an-11-year-old-bug-in-the-build-system","status":"publish","type":"post","link":"https:\/\/blog.mozilla.org\/nnethercote\/2012\/01\/05\/a-fix-for-an-11-year-old-bug-in-the-build-system\/","title":{"rendered":"A fix for an 11-year-old bug in the build system"},"content":{"rendered":"<p>I have noticed for months that when building Firefox, sometimes <code>configure<\/code> will run when it shouldn&#8217;t, e.g. when I haven&#8217;t changed any makefiles or other build system files.\u00a0 This is annoying, because it increases the time taken for a complete no-change build on my Linux box from ~50 seconds to ~70 seconds.\u00a0 And it happens reasonable frequently, but I haven&#8217;t been able to reproduce it reliably.<\/p>\n<p>Until yesterday, that is! I realized it happened reliably if I alternated building two different objdirs (e.g. debug and opt).\u00a0 Once I could reproduce it reliably, it wasn&#8217;t hard to use make&#8217;s <code>-d<\/code> option to find out what was causing <code>configure<\/code> to re-run.\u00a0 The answer was a file called <code>$(topsrcdir)\/.mozconfig.mk<\/code>.\u00a0 Because it is put in <code>$(topsrcdir)<\/code> instead of <code>$(objdir)<\/code>, the building of one objdir can affect the building of another objdir.<\/p>\n<p>The <a href=\"https:\/\/bugzilla.mozilla.org\/show_bug.cgi?id=715048\">fix<\/a> was pretty easy &#8212; it&#8217;s hard to move <code>.mozconfig.mk<\/code> out of <code>$(topsrcdir)<\/code>, but there&#8217;s no good reason to re-run <code>configure<\/code> every time it changes, because it doesn&#8217;t contain anything that affects <code>configure<\/code>. So it was a one-line change in <code>clienk.mk<\/code>.<\/p>\n<p>Kyle Huey tells me this bug has been present since 2000!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I have noticed for months that when building Firefox, sometimes configure will run when it shouldn&#8217;t, e.g. when I haven&#8217;t changed any makefiles or other build system files.\u00a0 This is annoying, because it increases the time taken for a complete no-change build on my Linux box from ~50 seconds to ~70 seconds.\u00a0 And it happens [&hellip;]<\/p>\n","protected":false},"author":139,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4561,30],"tags":[],"_links":{"self":[{"href":"https:\/\/blog.mozilla.org\/nnethercote\/wp-json\/wp\/v2\/posts\/1558"}],"collection":[{"href":"https:\/\/blog.mozilla.org\/nnethercote\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.mozilla.org\/nnethercote\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.mozilla.org\/nnethercote\/wp-json\/wp\/v2\/users\/139"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.mozilla.org\/nnethercote\/wp-json\/wp\/v2\/comments?post=1558"}],"version-history":[{"count":0,"href":"https:\/\/blog.mozilla.org\/nnethercote\/wp-json\/wp\/v2\/posts\/1558\/revisions"}],"wp:attachment":[{"href":"https:\/\/blog.mozilla.org\/nnethercote\/wp-json\/wp\/v2\/media?parent=1558"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.mozilla.org\/nnethercote\/wp-json\/wp\/v2\/categories?post=1558"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.mozilla.org\/nnethercote\/wp-json\/wp\/v2\/tags?post=1558"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}