Skip to content

fix: add missing #include <cstdint> for GCC 15 / C++23 compatibility#44

Merged
luetge merged 3 commits intoluetge:masterfrom
ysginc:python314-compat
Apr 21, 2026
Merged

fix: add missing #include <cstdint> for GCC 15 / C++23 compatibility#44
luetge merged 3 commits intoluetge:masterfrom
ysginc:python314-compat

Conversation

@jeffreyschultz
Copy link
Copy Markdown
Contributor

Summary

GCC 15 and recent Clang versions with C++23 mode no longer transitively provide <cstdint> through other standard headers. This causes build failures because definitions.h uses uint32_t, int32_t, int64_t, int16_t, and uintptr_t without including the header that defines them.

Changes

  • Add #include <cstdint> to include/definitions.h

Motivation

This is required to build flagser (and downstream projects like pyflagser) with:

  • GCC 15+ (shipped with Ubuntu 25.04+)
  • Python 3.14+ (which ships with modern toolchains)

Without this fix, the build fails with:

error: 'uint32_t' does not name a type

Testing

  • Verified the fix compiles cleanly with GCC 15.2.0
  • Successfully built pyflagser wheels for Python 3.14.2 on Linux x86_64

- Add #include <cstdint> to definitions.h for uint32_t, int32_t,
  int64_t, int16_t, and uintptr_t which are no longer transitively
  provided by other headers in GCC 15
@luetge
Copy link
Copy Markdown
Owner

luetge commented Apr 21, 2026

Thanks for the contribution, very appreciated!

@luetge luetge merged commit 6763e96 into luetge:master Apr 21, 2026
4 checks passed
@jeffreyschultz
Copy link
Copy Markdown
Contributor Author

Sweet! Glad I could help.

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