Skip to content

Fix build under GCC 15: include <cstdint>, pin C standard - #80

Open
krixkrix wants to merge 1 commit into
alexanderoster:developfrom
krixkrix:fix_gcc15_build
Open

krixkrix wants to merge 1 commit into
alexanderoster:developfrom
krixkrix:fix_gcc15_build

Conversation

@krixkrix

@krixkrix krixkrix commented Oct 9, 2026

Copy link
Copy Markdown

Summary

develop does not compile with GCC 15:

  • Missing <cstdint>: GCC 15's libstdc++ no longer pulls in <cstdint> transitively through <memory>, <string> and similar headers. Every header that uses uint32_t/uint64_t without including it fails, for example common_exportstream.hpp:44: error: 'uint64_t' has not been declared.
  • C23 default: GCC 15 defaults to C23, where bool is a keyword. That breaks the vendored libzip's typedef ... bool in zipint.h.

Fix:

  • #include <cstdint> in the 76 headers under Implementation/ and the 10 driver headers that rely on the transitive include (ADS, A3200, BuR journal group/value, CifX, Euler, Marlin serial controller, Pylon, Rasterizer algorithm, RayLase).
  • set (CMAKE_C_STANDARD 17) in CMakeLists.txt.

There are no functional changes. Older compilers are unaffected: <cstdint> is standard C++11, and the C code already targets C17 or earlier.

Evidence

GCC 15.2.0 (Ubuntu 15.2.0-16ubuntu1), ./build_clean_linux64.sh with default options (drivers included), no extra compiler flags:

  • Before: the build stops in build_resources with 'uint64_t' has not been declared errors.
  • After: the build completes and produces all 48 driver libraries.

Merge Danger

Door: two-way

Blast Radius: build only (include lines and the C standard setting)

GCC 15's libstdc++ no longer pulls <cstdint> in transitively via <memory>,
<string> and friends, so every header that names uint32_t/uint64_t without
including it fails to compile. 76 headers under Implementation/ and ten driver
headers (ADS, A3200, BuR journal group/value, CifX, Euler, Marlin serial
controller, Pylon, Rasterizer algorithm, RayLase) relied on that transitive
include; each now includes <cstdint> directly.

Separately, GCC 15 defaults to C23, where "bool" is a keyword, which rejects the
vendored libzip's "typedef ... bool" in zipint.h. Pin CMAKE_C_STANDARD to 17.

This branch has not been deployed

No deployments
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