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

Does not compile in gcc 13.2.1 #1068

Closed
balwierz opened this issue Oct 28, 2023 · 3 comments
Closed

Does not compile in gcc 13.2.1 #1068

balwierz opened this issue Oct 28, 2023 · 3 comments

Comments

@balwierz
Copy link

I am using Arch Linux and have gcc 13.2.1
It does not compile with the following errors:

$ make
Building BEDTools:
=========================================================
CXXFLAGS is [-g -Wall -O2 -std=c++11 ]
DETECTED_VERSION = v2.31.0
CURRENT_VERSION  = v2.31.0
  * compiling src/fisher/fisherHelp.cpp
  * compiling src/mapFile/mapHelp.cpp
  * compiling src/utils/general/ParseTools.cpp
In file included from src/utils/general/ParseTools.cpp:1:
src/utils/general/ParseTools.h: In function ‘void int2str(U, T&, bool)’:
src/utils/general/ParseTools.h:57:9: error: ‘uint32_t’ was not declared in this scope
   57 |         uint32_t n;
      |         ^~~~~~~~
src/utils/general/ParseTools.h:19:1: note: ‘uint32_t’ is defined in header ‘<cstdint>’; did you forget to ‘#include <cstdint>’?
   18 | #include <cstdlib>
  +++ |+#include <cstdint>
   19 | 
src/utils/general/ParseTools.h:58:13: error: ‘n’ was not declared in this scope
   58 |         for(n = 0; number; number /= 10)
      |             ^
src/utils/general/ParseTools.h:60:28: error: ‘n’ was not declared in this scope
   60 |         if(neg) tmp[12 - ++n] = '-';
      |                            ^
src/utils/general/ParseTools.h:62:50: error: ‘n’ was not declared in this scope
   62 |         if(appendToBuf) buffer.append(tmp + 12 - n, n);
      |                                                  ^
src/utils/general/ParseTools.h:63:39: error: ‘n’ was not declared in this scope
   63 |         else buffer.assign(tmp + 12 - n, n);
      |                                       ^
src/utils/general/ParseTools.cpp: In function ‘bool isHeaderLine(const std::string&)’:
src/utils/general/ParseTools.cpp:105:17: error: ‘uint32_t’ was not declared in this scope
  105 |                 uint32_t peek = *(uint32_t*)line.c_str() | 0x20202020u;
      |                 ^~~~~~~~
src/utils/general/ParseTools.cpp:8:1: note: ‘uint32_t’ is defined in header ‘<cstdint>’; did you forget to ‘#include <cstdint>’?
    7 | #include <sstream>
  +++ |+#include <cstdint>
    8 | 
src/utils/general/ParseTools.cpp:109:24: error: ‘peek’ was not declared in this scope
  109 |                 switch(peek) {
      |                        ^~~~
make: *** [src/utils/general/Makefile.frag:4: obj/ParseTools.o] Error 1
@balwierz
Copy link
Author

You may want to have a look at this commit from another project:
adelton/edgetx@e114428

@jmarshall
Copy link
Contributor

Duplicate of #1056; fixed by PR #1067 et al.

@arq5x
Copy link
Owner

arq5x commented Nov 7, 2023

fixed with PR #1067

@arq5x arq5x closed this as completed Nov 7, 2023
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