Skip to content

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

Open
jeffreyschultz wants to merge 2 commits intoluetge:masterfrom
ysginc:python314-compat
Open

fix: add missing #include <cstdint> for GCC 15 / C++23 compatibility#44
jeffreyschultz wants to merge 2 commits intoluetge:masterfrom
ysginc:python314-compat

Conversation

@jeffreyschultz
Copy link
Copy Markdown

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
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.

1 participant