Missing include (mozilla/Attributes.h) in build/unix/profiling/profiling.cpp
Categories
(Firefox Build System :: General, defect)
Tracking
(firefox138 fixed)
Tracking | Status | |
---|---|---|
firefox138 | --- | fixed |
People
(Reporter: elsandosgrande, Assigned: elsandosgrande, NeedInfo)
Details
Attachments
(2 files)
600 bytes,
patch
|
Details | Diff | Splinter Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review |
When building Firefox Nightly with libc++ on Linux — tested with libc++19 and both Clang 19 and GCC 14 — the following error occurs:
8 1:32.60 /var/tmp/portage/www-client/firefox-9999/work/firefox-9999/build/unix/profiling/profiling.cpp:40:1: error: unknown type name 'MOZ_RUNINIT'
8 1:32.60 40 | MOZ_RUNINIT int __llvm_profile_runtime = CustomRegisterRuntime();
8 1:32.60 | ^
After digging through the code on Searchfox and GitHub, I concluded that mfbt/Attributes.h
is the only header which defines MOZ_RUNINIT
and that there is thus a missing include in build/unix/profiling/profiling.cpp
: #include "mozilla/Attributes.h"
Then, when trying to build Firefox Nightly with GCC 14 and libstdc++, I saw that I wasn't getting the aforementioned error. After digging a bit further with the help of GCC's preprocessor output (which I can only barely parse), I concluded that the aforementioned include was present in libstdc++ builds as a transitive include thanks to stl_wrappers
magic: https://searchfox.org/mozilla-central/diff/13d864c116029fe5d067d589005f49c1c46f74b5/memory/mozalloc/throw_gcc.h#13
I chose the product based on https://firefox-source-docs.mozilla.org/mots/index.html#core-build-config and the component based on its description, that is I could not find a more specific component which seemed like a better fit. My apologies if I chose the wrong product and/or component.
Comment 1•4 days ago
|
||
Hi :gerard-majax !
Can you help me move this bug into a more proper component? I am asking you because you wrote the file build/unix/profiling/profiling.cpp
Thank you.
Comment 2•3 days ago
|
||
I'm not sure I'll ask around but build is likely the best place
Updated•3 days ago
|
Comment 3•3 days ago
|
||
Updated•3 days ago
|
Updated•3 days ago
|
Updated•3 days ago
|
Comment 6•3 days ago
|
||
Backed out for causing bustages complaining about mfbt/Attributes.h.
Backout link: https://hg.mozilla.org/integration/autoland/rev/29ca7ddfb7762e3b16be4961eff0e7b5b2755dd9
Failure log: https://treeherder.mozilla.org/logviewer?job_id=497785443&repo=autoland&lineNumber=8468
Updated•3 days ago
|
Comment 8•1 day ago
|
||
bugherder |
Description
•