Closed Bug 1811714 Opened 1 year ago Closed 1 year ago

Build failure with GCC 13 (missing <cstdint> include)

Categories

(Core :: Graphics, defect)

Firefox 109
defect

Tracking

()

RESOLVED FIXED
111 Branch
Tracking Status
firefox111 --- fixed

People

(Reporter: sam, Assigned: arsen)

References

Details

Attachments

(2 files)

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:109.0) Gecko/20100101 Firefox/109.0

Steps to reproduce:

  1. Build a pre-release of GCC 13.
  2. 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.

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.

Component: Untriaged → Graphics
Product: Firefox → Core
See Also: → 1807652

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)

Assignee: nobody → arsen
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Pushed by lsalzman@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/61f052c26dd1
Add a few missing <cstdint> includes r=gfx-reviewers,nical
Status: ASSIGNED → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 111 Branch
Duplicate of this bug: 1816407
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: