Closed Bug 1415686 Opened 2 years ago Closed 2 years ago

Build failure due to failure to include mozilla/a11y/Logging.h in opt build on Mac


(Firefox Build System :: General, defect, blocker)

53 Branch
Not set


(firefox58 fixed)

Tracking Status
firefox58 --- fixed


(Reporter: bzbarsky, Assigned: glandium)




(1 file)

I am getting a failure like so while building a --disable-debug build on Mac:

 0:20.37 In file included from /Users/bzbarsky/mozilla/inbound/obj-firefox-opt/layout/base/Unified_cpp_layout_base0.cpp:74:
 0:20.37 /Users/bzbarsky/mozilla/inbound/mozilla/layout/base/PresShell.cpp:130:10: fatal error: 'mozilla/a11y/Logging.h' file not found
 0:20.37 #include "mozilla/a11y/Logging.h"

The relevant bit of PresShell.cpp is:

  #include "nsAccessibilityService.h"
  #include "mozilla/a11y/DocAccessible.h"
  #ifdef DEBUG
  #include "mozilla/a11y/Logging.h"

and clearly DEBUG ought not to be defined!

Bisect says this is caused by the fix for bug 1411156.  Which is at least _possible_, I guess, because the export condition for that Logging.h file in accessible/base/ is:

      EXPORTS.mozilla.a11y += [
Ah, this is a reprise of bug 861453 and bug 1281603 and so forth...
To summarize the irc discussion:

The problem is that having MOZ_DEBUG set in the environment leads to a franken-build, where configure thinks it's doing a --disable-debug build, but old-configure thinks it's doing a --enable-debug build, leading to DEBUG being defined. The franken-build situation is a consequence of bug 1411156.

One might ask why people would set MOZ_DEBUG in their environment, and the answer is because of bug 699538:
Assignee: nobody → mh+mozilla
Comment on attachment 8926597 [details]
Bug 1415686 - Ensure both configure and old-configure agree on what MOZ_DEBUG means.

Can we file a follow up to change the environment variable used for bug 699538?

::: moz.configure:112
(Diff revision 1)
>          return bool(debug)
>  set_config('MOZ_DEBUG', moz_debug)
>  set_define('MOZ_DEBUG', moz_debug)
> -add_old_configure_assignment('MOZ_DEBUG', moz_debug)
> +add_old_configure_assignment('MOZ_DEBUG',
> +                             depends('--enable-debug')(lambda x: bool(x)))

Because this is almost but not quite exactly the definition of `moz_debug` above, a comment would be nice here.
Attachment #8926597 - Flags: review+
Attachment #8926597 - Flags: review?(core-build-config-reviews)
Attachment #8926597 - Flags: review?(core-build-config-reviews)
Pushed by
Ensure both configure and old-configure agree on what MOZ_DEBUG means. r=chmanchester
This came up in bug 1281603 and bug 861453 in the past.  I filed bug 1415741 to use a different env var in the cocoa code...
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla58
Product: Core → Firefox Build System
You need to log in before you can comment on or make changes to this bug.