Open Bug 1330551 Opened 7 years ago Updated 2 years ago

mach warnings-summary only reports two compiler warnings after building Firefox for Android

Categories

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

51 Branch
Unspecified
Android
defect

Tracking

(firefox51 unaffected, firefox52 unaffected, firefox53 fix-optional, firefox54 fix-optional, firefox55 fix-optional)

Tracking Status
firefox51 --- unaffected
firefox52 --- unaffected
firefox53 --- fix-optional
firefox54 --- fix-optional
firefox55 --- fix-optional

People

(Reporter: cpeterson, Unassigned)

Details

(Keywords: regression)

mach warnings-summary only reports two gcc warnings after building Firefox for Android (on macOS 10.12), even though I see many gcc warnings on the console. mach warnings-summary correctly reports clang warnings after building Firefox for Mac builds.

This is a regression. mach warnings-summary used to report all Android warnings, but I haven't identified the regression point. Is perhaps the $OBJDIR/.mozbuild/warnings.json file getting clobbered when mozglue is built?

$ ./mach warnings-summary
2	-Wmacro-redefined
2	Total

$ ./mach warnings-list
mozglue/linker/Logging.h:27:9 [-Wmacro-redefined] 'MOZ_CONCAT2' macro redefined
mozglue/linker/Logging.h:29:9 [-Wmacro-redefined] 'MOZ_CONCAT' macro redefined
This appears to be a regression in Nightly 53 because I can't reproduce it when I build Aurora 52 or Beta 51 for Android.

To test this without rebuilding Firefox for Android, I added a #error to a .cpp file in mfbt so the build would abort soon after reporting the first few compiler warnings. If you manually abort a mach build with CTRL+C, the compiler warnings logged to the console are not written out to $OBJDIR/.mozbuild/warnings.json.
Component: mach → Build Config
My guess is the warnings parser isn't identifying the warnings. https://hg.mozilla.org/mozilla-central/file/5a4412474c63/python/mozbuild/mozbuild/compilation/warnings.py#l302 is the code that gets called for every line of build backend output and tries to extract warnings. One can put a breakpoint in there and see where things are failing.

This /might/ be fallout from bug 1318044 and other related bugs where we changed how color output works. For example, the warnings parser may be confused by terminal color control byte sequences.
Curiously, -Wmacro-redefined in comment 0 is a clang warning, not a gcc warning, even though we build Firefox for Android with gcc.
Any word on fixing this and uplifting to 53?
Flags: needinfo?(gps)
No. And I'm disappearing for ~1 month very shortly. So you have to ask another build peer. Sorry :/
Flags: needinfo?(gps)
David - can you find an owner for this?  thanks
Flags: needinfo?(dburns)
I expect froydnj is likely the best person to hunt this down.  I know little about the CC integration into mach.  Nathan, is this in your wheelhouse?
Flags: needinfo?(nfroyd)
Nick, Thanks for looking into this
Flags: needinfo?(dburns)
(In reply to Nick Alexander :nalexander from comment #7)
> I expect froydnj is likely the best person to hunt this down.  I know little
> about the CC integration into mach.  Nathan, is this in your wheelhouse?

Sure, it can be.  But I can't reproduce this on Linux; a full clobber build for android gives me a bunch of warnings via `mach warnings-list` and `mach warnings-summary`.  Comment 3 also seems a bit suspicious.

Christ, does this problem persist even with a full clobber build on OS X, and a separate objdir than your normal OS X builds?
Flags: needinfo?(nfroyd) → needinfo?(cpeterson)
(In reply to Nathan Froyd [:froydnj] from comment #9)
> Christ, does this problem persist even with a full clobber build on OS X,
> and a separate objdir than your normal OS X builds?

Yes. I deleted my objdirs and rebuilt Firefox for Android without overriding the default objdir names. The build created two objdirs: obj-arm-linux-androideabi and obj-x86_64-apple-darwin16.4.0. obj-arm-linux-androideabi/.mozbuild/warnings.json lists the two -Wmacro-redefined clang warnings and there is no obj-x86_64-apple-darwin16.4.0/.mozbuild/warnings.json.
Flags: needinfo?(cpeterson)
(In reply to Chris Peterson [:cpeterson] from comment #3)
> Curiously, -Wmacro-redefined in comment 0 is a clang warning, not a gcc
> warning, even though we build Firefox for Android with gcc.

I would assume this is just from something we're building with the host compiler, which is clang.
Chris, are you still seeing this?

making fix-optional for 53.
Flags: needinfo?(cpeterson)
I still see this when building 55.
Flags: needinfo?(cpeterson)
(this hasn't stopped us from shipping, so let's let this be just a regular bug, rather than track as a regression)
Product: Core → Firefox Build System
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.