Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

compilation error with g++ 13 from missing header #2712

Closed
correaa opened this issue Jul 1, 2023 · 4 comments
Closed

compilation error with g++ 13 from missing header #2712

correaa opened this issue Jul 1, 2023 · 4 comments

Comments

@correaa
Copy link

correaa commented Jul 1, 2023

Describe the bug
missing header

Expected behavior
compile correctly

Reproduction steps
include the catch2 header and compile with g++ 13.

Platform information:

  • OS: Fedora 38
  • Compiler+version: GCC v13
  • Catch version: devel (v3)

Additional context
This problem is fixed by adding #include <cstdint> header to internal/catch_string_manip.hpp.

[  4%] Building CXX object _deps/catch2-build/src/CMakeFiles/Catch2.dir/catch2/internal/catch_clara.cpp.o
cd /home/correaa/inq/build/_deps/catch2-build/src && /usr/lib64/ccache/c++  -I/home/correaa/inq/build/_deps/catch2-src/src/catch2/.. -isystem /usr/include/mpich-x86_64 -O3 -DNDEBUG -std=c++17 -ffile-prefix-map=/home/correaa/inq/build/_deps/catch2-src=. -MD -MT _deps/catch2-build/src/CMakeFiles/Catch2.dir/catch2/internal/catch_clara.cpp.o -MF CMakeFiles/Catch2.dir/catch2/internal/catch_clara.cpp.o.d -o CMakeFiles/Catch2.dir/catch2/internal/catch_clara.cpp.o -c /home/correaa/inq/build/_deps/catch2-src/src/catch2/internal/catch_clara.cpp
In file included from /home/correaa/inq/build/_deps/catch2-src/src/catch2/internal/catch_clara.cpp:12:
/home/correaa/inq/build/_deps/catch2-src/src/catch2/../catch2/internal/catch_string_manip.hpp:47:32: error: expected ‘)’ before ‘count’
   47 |         pluralise(std::uint64_t count, StringRef label):
      |                  ~             ^~~~~~
      |                                )
/home/correaa/inq/build/_deps/catch2-src/src/catch2/../catch2/internal/catch_string_manip.hpp:54:14: error: ‘uint64_t’ in namespace ‘std’ does not name a type; did you mean ‘wint_t’?
   54 |         std::uint64_t m_count;
      |              ^~~~~~~~
      |              wint_t
make[2]: *** [_deps/catch2-build/src/CMakeFiles/Catch2.dir/build.make:303: _deps/catch2-build/src/CMakeFiles/Catch2.dir/catch2/internal/catch_clara.cpp.o] Error 1
make[2]: Leaving directory '/home/correaa/inq/build'
make[1]: *** [CMakeFiles/Makefile2:1167: _deps/catch2-build/src/CMakeFiles/Catch2.dir/all] Error 2
make[1]: Leaving directory '/home/correaa/inq/build'
make: *** [Makefile:149: all] Error 2
[correaa@proart build]$  code /home/correaa/inq/build/_deps/catch2-src/src/catch2/../catch2/internal/catch_string_manip.hpp
[correaa@proart build]$ c++ --version
c++ (GCC) 13.1.1 20230614 (Red Hat 13.1.1-4)
Copyright (C) 2023 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
@correaa correaa changed the title compilation error with g++ 13 compilation error with g++ 13 from missing header Jul 1, 2023
@correaa
Copy link
Author

correaa commented Jul 1, 2023

same problem is found in headers: catch_test_case_info.hpp #2713 and catch_xmlwriter.cpp

@VJSchneid
Copy link

VJSchneid commented Jul 6, 2023

Hey @correaa, which version of Catch2 are you using?
This seems to be fixed with 52066db.
Versions since v3.3.0 should therefore be fine.

@horenmar
Copy link
Member

horenmar commented Jul 6, 2023

#2708 (comment)

@correaa
Copy link
Author

correaa commented Jul 6, 2023

you are right.

I made a mistake with my cmake.

my cmake was downloading the incorrect tag of catch2 because of a conflict with a dependency asking for an old version.

@correaa correaa closed this as completed Jul 6, 2023
Kevinjil added a commit to Kevinjil/CedarLogic that referenced this issue Feb 28, 2024
More information in issue catchorg/Catch2#2712
on GitHub.
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

No branches or pull requests

3 participants