Skip to content

Conversation

@skooch
Copy link
Contributor

@skooch skooch commented Dec 16, 2025

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
Copy link
Collaborator

@chearon chearon left a comment

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
Copy link
Contributor Author

skooch commented Dec 16, 2025

@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
Copy link
Collaborator

chearon commented Dec 16, 2025

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 😕

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