hthao opened a new issue #1693: URL: https://github.com/apache/incubator-brpc/issues/1693
**Describe the bug (描述bug)** compile failed with error "error: macro "__has_attribute" requires an identifier". **To Reproduce (复现方法)** follow the steps: https://github.com/apache/incubator-brpc/blob/master/docs/cn/getting_started.md#ubuntulinuxmintwsl **Expected behavior (期望行为)** compile successful. **Versions (各种版本)** OS: ubuntu Compiler: gcc brpc: 1.0.0 protobuf: libprotoc 3.12.4 **Additional context/screenshots (更多上下文/截图)** test@NUC11PAHi7:~/github/brpc$ cd incubator-brpc-1.0.0/ test@NUC11PAHi7:~/github/brpc/incubator-brpc-1.0.0$ ls bazel CHANGES.md CODE_OF_CONDUCT.md config.h.in DISCLAIMER example leveldb.BUILD NOTICE python RELEASE_VERSION tools BUILD.bazel cmake community config.mk Dockerfile glog.BUILD LICENSE openssl.BUILD README_cn.md src WORKSPACE build_in_travis_ci.sh CMakeLists.txt config_brpc.sh CONTRIBUTING.md docs java Makefile package README.md test zlib.BUILD test@NUC11PAHi7:~/github/brpc/incubator-brpc-1.0.0$ sh config_brpc.sh --headers=/usr/include --libs=/usr/lib test@NUC11PAHi7:~/github/brpc/incubator-brpc-1.0.0$ make > Compiling src/mcpack2pb/generator.o g++ -c -I./src -I/usr/include/ -DBRPC_WITH_GLOG=0 -DGFLAGS_NS=google -g -DBTHREAD_USE_FAST_PTHREAD_MUTEX -D__const__= -D_GNU_SOURCE -DUSE_SYMBOLIZE -DNO_TCMALLOC -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS -DNDEBUG -DBRPC_REVISION=\"1.0.0\" -O2 -pipe -Wall -W -fPIC -fstrict-aliasing -Wno-invalid-offsetof -Wno-unused-parameter -fno-omit-frame-pointer -std=c++0x -msse4 -msse4.2 -Wno-aligned-new src/mcpack2pb/generator.cpp -o src/mcpack2pb/generator.o In file included from /usr/include/features.h:484, from /usr/include/x86_64-linux-gnu/c++/11/bits/os_defines.h:39, from /usr/include/x86_64-linux-gnu/c++/11/bits/c++config.h:586, from /usr/include/c++/11/bits/stl_algobase.h:59, from /usr/include/c++/11/bits/stl_tree.h:63, from /usr/include/c++/11/set:60, from src/mcpack2pb/generator.cpp:22: /usr/include/x86_64-linux-gnu/sys/cdefs.h:256:60: error: macro "__has_attribute" requires an identifier 256 | #if __GNUC_PREREQ (2,5) || __glibc_has_attribute (__const__) | ^ make: *** [Makefile:297: src/mcpack2pb/generator.o] Error 1 test@NUC11PAHi7:~/github/brpc/incubator-brpc-1.0.0$ uname -a Linux NUC11PAHi7 5.13.0-28-generic #31-Ubuntu SMP Thu Jan 13 17:41:06 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux test@NUC11PAHi7:~/github/brpc/incubator-brpc-1.0.0$ gcc --version gcc (Ubuntu 11.2.0-7ubuntu2) 11.2.0 Copyright (C) 2021 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. -- 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]
