Build failure with GCC 13 (missing <cstdint> include)
Categories
(Core :: Graphics, defect)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox111 | --- | fixed |
People
(Reporter: sam, Assigned: arsen)
References
Details
Attachments
(2 files)
|
224 bytes,
patch
|
Details | Diff | Splinter Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review |
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:109.0) Gecko/20100101 Firefox/109.0
Steps to reproduce:
- Build a pre-release of GCC 13.
- Attempt to build Firefox 109..0.
Actual results:
Build failed with GCC 13 like:
0:29.52 /var/tmp/portage/www-client/firefox-109.0/work/firefox_build/dist/include/mozilla/gfx/Rect.h:327:47: error: no member named 'int32_t' in namespace 'std'
0:29.52 float min = (float)std::numeric_limits<std::int32_t>::min();
0:29.53 ~~~~~^
0:29.53 /var/tmp/portage/www-client/firefox-109.0/work/firefox_build/dist/include/mozilla/gfx/Rect.h:328:47: error: no member named 'int32_t' in namespace 'std'
0:29.54 float max = (float)std::numeric_limits<std::int32_t>::max();
0:29.54 ~~~~~^
0:29.54 2 errors generated.
It's normal for compilers to shuffle around internal includes between releases, and indeed Rect.h uses int32_t without includg <cstdint.h>.
Expected results:
Successful build with GCC 13.
There are other issues with GCC 13 but they're not as simple and I figure it makes sense to handle them in another bug given this one has a simple cause & patch.
Comment 3•3 years ago
|
||
The Bugbug bot thinks this bug should belong to the 'Core::Graphics' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.
| Assignee | ||
Comment 4•3 years ago
|
||
GCC 13s libstdc++ reduced its dependency on some headers like <cstdint>,
so it's no longer transitively included through various headers.
Include it explicitly.
See also: https://gcc.gnu.org/gcc-13/porting_to.html#header-dep-changes
11:16.32 .../components/telemetry/pingsender/pingsender.cpp:30:7:
error: unknown type name 'uint32_t'
11:16.33 const uint32_t kConnectionTimeoutMs = 30 * 1000;
11:16.33 ^
11:16.33 ... /components/telemetry/pingsender/pingsender.cpp:76:9:
error: unknown type name 'uint32_t'
11:16.33 const uint32_t kBufferSize = 4 * 1024 - 1;
11:16.34 ^
11:16.44 2 errors generated.
(et al)
Updated•3 years ago
|
Comment 6•3 years ago
|
||
| bugherder | ||
Description
•