Skip to content

Conversation

GiorgioCaculli
Copy link
Contributor

Host information:

  • uname -a: Linux gaming 6.16.8-200.fc42.x86_64 #1 SMP PREEMPT_DYNAMIC Fri Sep 19 17:47:18 UTC 2025 x86_64 GNU/Linux
  • GCC version: 15.2.1 20250808 (Red Hat 15.2.1-1) (GCC)
  • make version: GNU Make 4.4.1
  • cmake version: 3.31.6
  • CMAKE detected CXX compiler: GNU 15.2.1
  • CMAKE detected C compiler: GNU 15.2.1

Compilation steps:

  • mkdir build
  • cd build
  • cmake ..
  • make
  • sudo make install

Errors encountered during make step:

  • File name: src/util/Value.h
  • Error(s):
    • 'uint32_t' does not name a type
    • 'uint32_t' is defined in header '<cstdint>': this is probably fixable by adding '#include <cstdint>'
Value h_and_Classfield h_cstdint_error
  • File name: src/util/String.h
  • Error(s):
    • 'uint32_t' does not name a type
    • 'uint32_t' is defined in header '<cstdint>': this is probably fixable by adding '#include <cstdint>'
SimpleLogger h_cstdint_error
  • File name: src/util/SimpleLogger.h
  • Error(s):
    • 'uint64_t' does not name a type
    • 'uint64_t' is defined in header '<cstdint>': this is probably fixable by adding '#include <cstdint>'
String h_and_String cpp_cstdint_error
  • File name: include/conncpp/ParameterMetaData.hpp
  • Error(s):
    • 'uint32_t' does not name a type
    • 'uint32_t' is defined in header '<cstdint>': this is probably fixable by adding '#include <cstdint>'
ParameterMetaData hpp_cstdint_error

Fix:

Adding #include <cstdint> in the files fixed the compilation errors.

@lawrinn
Copy link
Collaborator

lawrinn commented Sep 29, 2025

Thank you for the PR.
I have recently merged couple of PR's about inclusion, but apparently not enough. Please say in the comment, that you arecontributing the new code of the whole pull request, including one or several files that are either new files or modified ones, under the BSD-new license, and I'll merge.

@GiorgioCaculli
Copy link
Contributor Author

I am contributing the new code of the whole pull request, including one or several files that are either new files or modified ones, under the BSD-new license

@lawrinn lawrinn merged commit 4d0ea2e into mariadb-corporation:cpp-1.1 Sep 30, 2025
10 of 11 checks passed
@lawrinn
Copy link
Collaborator

lawrinn commented Sep 30, 2025

Thanks! One question though, or not a question, it's just strange. I assume that is all that needed to fix compilation on your system. I guess this happens with newest compiler versions that are not covered yet by our testing(cuz we are in transition with our CI system). But it's not the first such PR as I mentioned already, and previous PR's must have fixed compilation for their respective authors, but the problem re-emerging.

@GiorgioCaculli
Copy link
Contributor Author

Before pushing this Pull Request I had a conversation with a friend of mine who is running Gentoo, his compiler also highlighted the same error in the same spots and both of us seem to be running nearly the same versions of GCC 15.
We looked up on various conversations online and all of them seem to be pointing out to a missing inclusion that more often than not gets included in a general file.

We found conversations as old as from 12 years ago talking about this issue and more often than not it depends on how the compiler is bundled within the system.

I tested the cpp-1.0 yesterday on Mac OS 26 with AppleClang 17 and it did not raise any issue though when I tested Clang on my Fedora machine using the following commands:

  • $ export CC=/usr/bin/clang
  • $ export CXX=/usr/bin/clang++
  • $ cmake ..
  • $ make

It raised the same errors (along with a couple of extra warnings).
Chances are that in your case the inclusion might happen in the background without you having to explicitly declare it in your project, but other compiling environments might not have that implicit declaration setup.

Here are some of the conversations I read through which sort of gave me these pointers:

Not sure if this answers your question or doubt but chances are that other developers might also encounter the same issue down the line.

@lawrinn
Copy link
Collaborator

lawrinn commented Sep 30, 2025

My guess it is/was included implicitly via some other headers, which probably has changed now in new compiler versions. We did not have this issue in years on all our build systems, and recently I got like 3 PR's about this very issue. and 13y ago it could also be caused by headers change in then newer compiler versions.

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