Closed Bug 1659404 Opened 2 years ago Closed 2 years ago

Broken build in browser/app/nsBrowserApp.cpp if MOZ_GECKO_PROFILER is not defined

Categories

(Core :: Gecko Profiler, defect, P2)

Other
Linux
defect

Tracking

()

RESOLVED FIXED
82 Branch
Tracking Status
firefox-esr68 --- unaffected
firefox-esr78 --- unaffected
firefox79 --- unaffected
firefox80 --- unaffected
firefox81 --- fixed
firefox82 --- fixed

People

(Reporter: dan, Assigned: gerald)

References

(Regression)

Details

(Keywords: regression)

Attachments

(1 file)

A recent change (from Aug 13) broke builds on platforms without the GECKO_PROFILER feature.

gmake[4]: Entering directory '/home/sharkcz/projects/firefox/obj-s390x-ibm-linux-gnu/browser/app'
browser/app/nsBrowserApp.o
/usr/bin/g++ -std=gnu++17 -o nsBrowserApp.o -c  -I/home/sharkcz/projects/firefox/obj-s390x-ibm-linux-gnu/dist/system_wrappers -include /home/sharkcz/projects/firefox/config/gcc_hidden.h -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -fstack-protector-strong -DNDEBUG=1 -DTRIMMED=1 -DXPCOM_GLUE -DMOZ_HAS_MOZGLUE -DMOZ_GECKODRIVER '-DFIREFOX_ICO="/home/sharkcz/projects/firefox/browser/branding/unofficial/firefox.ico"' '-DDOCUMENT_ICO="/home/sharkcz/projects/firefox/browser/branding/unofficial/document.ico"' '-DNEWWINDOW_ICO="/home/sharkcz/projects/firefox/browser/branding/unofficial/newwindow.ico"' '-DNEWTAB_ICO="/home/sharkcz/projects/firefox/browser/branding/unofficial/newtab.ico"' '-DPBMODE_ICO="/home/sharkcz/projects/firefox/browser/branding/unofficial/pbmode.ico"' -I/home/sharkcz/projects/firefox/browser/app -I/home/sharkcz/projects/firefox/obj-s390x-ibm-linux-gnu/browser/app -I/home/sharkcz/projects/firefox/obj-s390x-ibm-linux-gnu/build -I/home/sharkcz/projects/firefox/toolkit/xre -I/home/sharkcz/projects/firefox/xpcom/base -I/home/sharkcz/projects/firefox/xpcom/build -I/home/sharkcz/projects/firefox/obj-s390x-ibm-linux-gnu/dist/include -I/home/sharkcz/projects/firefox/obj-s390x-ibm-linux-gnu/dist/include/nspr -I/home/sharkcz/projects/firefox/obj-s390x-ibm-linux-gnu/dist/include/nss -fPIC -DMOZILLA_CLIENT -include /home/sharkcz/projects/firefox/obj-s390x-ibm-linux-gnu/mozilla-config.h -Wall -Wempty-body -Wignored-qualifiers -Woverloaded-virtual -Wpointer-arith -Wsign-compare -Wtype-limits -Wunreachable-code -Wwrite-strings -Wno-invalid-offsetof -Wc++2a-compat -Wduplicated-cond -Wimplicit-fallthrough -Wunused-function -Wunused-variable -Wno-error=maybe-uninitialized -Wno-error=deprecated-declarations -Wno-error=array-bounds -Wno-error=coverage-mismatch -Wno-error=free-nonheap-object -Wno-multistatement-macros -Wno-error=class-memaccess -Wno-error=deprecated-copy -Wformat -Wformat-overflow=2 -Werror=implicit-function-declaration -Wno-psabi -fno-sized-deallocation -fno-aligned-new -fno-exceptions -fno-strict-aliasing -fno-rtti -fno-exceptions -fno-math-errno -pthread -pipe -g -freorder-blocks -O2 -fno-omit-frame-pointer -funwind-tables  -MD -MP -MF .deps/nsBrowserApp.o.pp  -fdiagnostics-color  /home/sharkcz/projects/firefox/browser/app/nsBrowserApp.cpp
cc1plus: warning: ‘-Werror=’ argument ‘-Werror=implicit-function-declaration’ is not valid for C++
In file included from /home/sharkcz/projects/firefox/browser/app/nsBrowserApp.cpp:41:
/home/sharkcz/projects/firefox/obj-s390x-ibm-linux-gnu/dist/include/BaseProfiler.h:64:5: error: ‘UniquePtr’ does not name a type
   64 |     UniquePtr<ProfilerBacktrace, ProfilerBacktraceDestructor>;
      |     ^~~~~~~~~
/home/sharkcz/projects/firefox/obj-s390x-ibm-linux-gnu/dist/include/BaseProfiler.h:65:15: error: ‘UniqueProfilerBacktrace’ does not name a type
   65 | static inline UniqueProfilerBacktrace profiler_get_backtrace() {
      |               ^~~~~~~~~~~~~~~~~~~~~~~
/home/sharkcz/projects/firefox/obj-s390x-ibm-linux-gnu/dist/include/BaseProfiler.h:73:5: error: ‘ProfileChunkedBuffer’ was not declared in this scope; did you mean ‘mozilla::ProfileChunkedBuffer’?
   73 |     ProfileChunkedBuffer& aChunkedBuffer) {
      |     ^~~~~~~~~~~~~~~~~~~~
      |     mozilla::ProfileChunkedBuffer
/home/sharkcz/projects/firefox/obj-s390x-ibm-linux-gnu/dist/include/BaseProfiler.h:70:7: note: ‘mozilla::ProfileChunkedBuffer’ declared here
   70 | class ProfileChunkedBuffer;
      |       ^~~~~~~~~~~~~~~~~~~~
/home/sharkcz/projects/firefox/obj-s390x-ibm-linux-gnu/dist/include/BaseProfiler.h:73:27: error: ‘aChunkedBuffer’ was not declared in this scope
   73 |     ProfileChunkedBuffer& aChunkedBuffer) {
      |                           ^~~~~~~~~~~~~~
/home/sharkcz/projects/firefox/obj-s390x-ibm-linux-gnu/dist/include/BaseProfiler.h:72:20: warning: ‘profiler_capture_backtrace’ defined but not used [-Wunused-variable]
   72 | static inline bool profiler_capture_backtrace(
      |                    ^~~~~~~~~~~~~~~~~~~~~~~~~~
gmake[4]: *** [/home/sharkcz/projects/firefox/config/rules.mk:725: nsBrowserApp.o] Error 1
gmake[4]: Leaving directory '/home/sharkcz/projects/firefox/obj-s390x-ibm-linux-gnu/browser/app'

Seems it came with https://phabricator.services.mozilla.com/D86514#change-vSme7plQKOHX

Regressed by: 1658232
Has Regression Range: --- → yes

There might be an additional issue caused by a profiler-related change from Aug 11 later in the build too.

Set release status flags based on info from the regressing bug 1658232

Thank you for the report.

Assignee: nobody → gsquelart
Severity: -- → S3
Priority: -- → P2
Duplicate of this bug: 1661200

The attached fix looks good, it allows building trunk on Fedora/ppc64le for me.

Comment on attachment 9172321 [details]
Bug 1659404 - Fix non-MOZ_GECKO_PROFILER build - r?canaltinova

This allows me to build 81.0b2 on OpenBSD, thanks !

Attachment #9172321 - Flags: feedback+

Great, thank you both for trying it.

Pushed by gsquelart@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/1efcaa71f465
Fix non-MOZ_GECKO_PROFILER build - r=canaltinova
Status: UNCONFIRMED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 82 Branch

Comment on attachment 9172321 [details]
Bug 1659404 - Fix non-MOZ_GECKO_PROFILER build - r?canaltinova

Beta/Release Uplift Approval Request

  • User impact if declined: Failure to build on certain Tier-3 platforms where the profiler is not defined.
  • Is this code covered by automated tests?: Yes
  • Has the fix been verified in Nightly?: Yes
  • Needs manual test from QE?: No
  • If yes, steps to reproduce:
  • List of other uplifts needed: None
  • Risk to taking this patch: Low
  • Why is the change risky/not risky? (and alternatives if risky): NPOTB.
  • String changes made/needed: none
Attachment #9172321 - Flags: approval-mozilla-beta?

Comment on attachment 9172321 [details]
Bug 1659404 - Fix non-MOZ_GECKO_PROFILER build - r?canaltinova

Approved for 81.0b4.

Attachment #9172321 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
You need to log in before you can comment on or make changes to this bug.