Compilation failure on modern GCC (GCC 16+) due to missing <cstdint> in config.hpp

Open Beginner friendly
#1 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
1/5
Estimated time
Under an hour
Newbie friendliness
88/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Quiet
Tech stack
cpp
Domain
build-system

Research direction

Start in src/config.hpp and inspect the standard-library includes around the digit_token_ids declaration. Reproduce the failure with the provided CMake and Ninja commands, then verify the project builds and tests pass with GCC 16.1.0 after the missing include is addressed.

Written by the indexing model from the issue text.

Description

Describe the bug

When attempting to compile moss-transcribe.cpp on a fresh environment using a modern compiler (GCC 16.1.0 via MinGW/Ninja on Windows), the compilation fails at src/model_loader.cpp due to an unhandled template argument and undeclared types (int32_t). Modern GCC versions are much stricter with implicit header inclusions and no longer automatically pull in <cstdint> through other standard library files.

Error Log
[path/to/project]/src/config.hpp:21:17: error: 'int32_t' was not declared in this scope
   21 |      std::vector<int32_t> digit_token_ids; // 10 ids for "0".."9"
      |                  ^~~~~~~
[path/to/project]/src/config.hpp:4:1: note: 'int32_t' is defined in header '<cstdint>'; this is probably fixable by adding '#include <cstdint>'

Environment
  • OS: Windows 11
  • Compiler: GCC 16.1.0 (MinGW-W64)
  • Build System: CMake + Ninja
Steps to Reproduce
  1. Clone the repository recursively.
  2. Configure the build: cmake -B build -G "Ninja" -DMT_BUILD_TESTS=ON
  3. Run the build step: cmake --build build -j
Suggested Fix

Explicitly include <cstdint> inside src/config.hpp. Adding #include <cstdint> right below #include <vector> fixes the compilation error entirely, allowing the project to compile and run tests successfully.

Dominant language
C++
Stars
57
Forks
11
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from localai-org/moss-transcribe.cpp

All issues in localai-org/moss-transcribe.cpp

Similar issues

More C++ issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.