adonis0147 opened a new issue, #2240:
URL: https://github.com/apache/brpc/issues/2240
**Describe the bug (描述bug)**
无法使用GCC-13去编译,编译过程报错。
**To Reproduce (复现方法)**
使用GCC-13去编译项目。
**Expected behavior (期望行为)**
正常编译。
**Versions (各种版本)**
OS: Ubuntu 23.04
Compiler: gcc (Ubuntu 13-20230320-1ubuntu1) 13.0.1 20230320
brpc: master
protobuf: libprotobuf-dev/lunar,now 3.21.12-1ubuntu7
**Additional context/screenshots (更多上下文/截图)**
```shell
g++ -c -I./src -I/usr/include/ -DBRPC_WITH_GLOG=0 -DGFLAGS_NS=google
-D__const__=__unused__ -g -fno-gcse -DBTHREAD_USE_FAST_PTHREAD_MUTEX
-D_GNU_SOURCE -DUSE_SYMBOLIZE -DNO_TCMALLOC -D__STDC_FORMAT_MACROS
-D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS -DNDEBUG
-DBRPC_REVISION=\"1.5.0\|master\|86427a50\|2023-05-08T09:47:55+08:00\" -O2
-pipe -Wall -W -fPIC -fstrict-aliasing -Wno-invalid-offsetof
-Wno-unused-parameter -fno-omit-frame-pointer -std=c++0x -Wno-aligned-new
src/brpc/grpc.cpp -o src/brpc/grpc.o
In file included from ./src/brpc/grpc.h:23,
from src/brpc/grpc.cpp:22:
./src/brpc/http2.h:41:18: error: 'uint32_t' does not name a type
41 | static const uint32_t DEFAULT_HEADER_TABLE_SIZE = 4096;
| ^~~~~~~~
./src/brpc/http2.h:22:1: note: 'uint32_t' is defined in header '<cstdint>';
did you forget to '#include <cstdint>'?
21 | #include "brpc/http_status_code.h"
+++ |+#include <cstdint>
22 |
./src/brpc/http2.h:42:5: error: 'uint32_t' does not name a type
42 | uint32_t header_table_size;
| ^~~~~~~~
./src/brpc/http2.h:42:5: note: 'uint32_t' is defined in header '<cstdint>';
did you forget to '#include <cstdint>'?
./src/brpc/http2.h:63:5: error: 'uint32_t' does not name a type
63 | uint32_t max_concurrent_streams;
| ^~~~~~~~
./src/brpc/http2.h:63:5: note: 'uint32_t' is defined in header '<cstdint>';
did you forget to '#include <cstdint>'?
./src/brpc/http2.h:70:18: error: 'uint32_t' does not name a type
70 | static const uint32_t DEFAULT_INITIAL_WINDOW_SIZE = 65535;
| ^~~~~~~~
./src/brpc/http2.h:70:18: note: 'uint32_t' is defined in header '<cstdint>';
did you forget to '#include <cstdint>'?
./src/brpc/http2.h:71:18: error: 'uint32_t' does not name a type
71 | static const uint32_t MAX_WINDOW_SIZE = (1u << 31) - 1;
| ^~~~~~~~
./src/brpc/http2.h:71:18: note: 'uint32_t' is defined in header '<cstdint>';
did you forget to '#include <cstdint>'?
./src/brpc/http2.h:72:5: error: 'uint32_t' does not name a type
72 | uint32_t stream_window_size;
| ^~~~~~~~
./src/brpc/http2.h:72:5: note: 'uint32_t' is defined in header '<cstdint>';
did you forget to '#include <cstdint>'?
./src/brpc/http2.h:77:5: error: 'uint32_t' does not name a type
77 | uint32_t connection_window_size;
| ^~~~~~~~
./src/brpc/http2.h:77:5: note: 'uint32_t' is defined in header '<cstdint>';
did you forget to '#include <cstdint>'?
./src/brpc/http2.h:84:18: error: 'uint32_t' does not name a type
84 | static const uint32_t DEFAULT_MAX_FRAME_SIZE = 16384;
| ^~~~~~~~
./src/brpc/http2.h:84:18: note: 'uint32_t' is defined in header '<cstdint>';
did you forget to '#include <cstdint>'?
./src/brpc/http2.h:85:18: error: 'uint32_t' does not name a type
85 | static const uint32_t MAX_OF_MAX_FRAME_SIZE = 16777215;
| ^~~~~~~~
./src/brpc/http2.h:85:18: note: 'uint32_t' is defined in header '<cstdint>';
did you forget to '#include <cstdint>'?
./src/brpc/http2.h:86:5: error: 'uint32_t' does not name a type
86 | uint32_t max_frame_size;
| ^~~~~~~~
./src/brpc/http2.h:86:5: note: 'uint32_t' is defined in header '<cstdint>';
did you forget to '#include <cstdint>'?
./src/brpc/http2.h:95:5: error: 'uint32_t' does not name a type
95 | uint32_t max_header_list_size;
| ^~~~~~~~
./src/brpc/http2.h:95:5: note: 'uint32_t' is defined in header '<cstdint>';
did you forget to '#include <cstdint>'?
make: *** [Makefile:302: src/brpc/grpc.o] Error 1
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]