Skip to content

Fix compilation on GCC 15 by including <cstdint> - #2546

Merged
chearon merged 1 commit into
Automattic:masterfrom
skooch:fix-compilation-on-gcc-15-cstdint
Dec 16, 2025
Merged

chearon merged 1 commit into
Automattic:masterfrom
skooch:fix-compilation-on-gcc-15-cstdint

Conversation

@skooch

@skooch skooch commented Dec 16, 2025 •

Copy link
Copy Markdown
Contributor

As per the GCC 15 porting guide, section "Header dependency changes": https://gcc.gnu.org/gcc-15/porting_to.html#header-dep-changes

Some C++ Standard Library headers have been changed to no longer include other headers that were being used internally by the library. As such, C++ programs that used standard library components without including the right headers will no longer compile.

In particular, the following headers are used less widely within libstdc++ and may need to be included explicitly when compiling with GCC 15:

<stdint.h> (for int8_t, int32_t etc.) and <cstdint> (for std::int8_t, std::int32_t etc.)
<ostream> (for std::endl, std::flush etc.)

<cstdint> must now be explicitly included to use these types and was missing from CharData.h.

This resolves issue #2545

Thanks for contributing!

  • Have you updated CHANGELOG.md?

As per the GCC 15 porting guide, section "Header dependency changes": https://gcc.gnu.org/gcc-15/porting_to.html#header-dep-changes

> Some C++ Standard Library headers have been changed to no longer include other headers that were being used internally by the library. As such, C++ programs that used standard library components without including the right headers will no longer compile.
>
> In particular, the following headers are used less widely within libstdc++ and may need to be included explicitly when compiling with GCC 15:
>
> `<stdint.h>` (for `int8_t`, `int32_t` etc.) and `<cstdint>` (for `std::int8_t`, `std::int32_t` etc.)
> `<ostream>` (for `std::endl`, `std::flush` etc.)

`<cstdint>` must now be explicitly included to use these types and was missing from `CharData.h`.
@skooch skooch changed the title Fix compilation on GCC 15 by including <cstdint> (#2545) Fix compilation on GCC 15 by including <cstdint> Dec 16, 2025

@chearon chearon left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks

@chearon
chearon merged commit f2c570d into Automattic:master Dec 16, 2025
39 of 48 checks passed
@skooch

skooch commented Dec 16, 2025

Copy link
Copy Markdown
Contributor Author

@chearon No rush, but when would we expect a release to be cut after merging this? Just want to know when I should check back, since I have compiler flags littered in builds at work.

@skooch
skooch deleted the fix-compilation-on-gcc-15-cstdint branch December 16, 2025 15:12
@chearon

chearon commented Dec 16, 2025

Copy link
Copy Markdown
Collaborator

I plan to be working on node-canvas next week, and I can do a patch release then. No release is quick to do until we get our prebuilds overhauled 😕

@chearon

chearon commented Jan 10, 2026

Copy link
Copy Markdown
Collaborator

@skooch I did indeed run into a problem, but as of now 3.2.1 is released

@skooch

skooch commented Jan 15, 2026

Copy link
Copy Markdown
Contributor Author

@chearon Thank you!

sodiboo added a commit to sodiboo/system that referenced this pull request Mar 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants