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

example/rdma_performance compile error in gcc 11: error: macro "__has_attribute" requires an identifier #2740

Closed
ivanallen opened this issue Aug 20, 2024 · 1 comment · Fixed by #2741

Comments

@ivanallen
Copy link
Contributor

Describe the bug (描述bug)

g++ -c -I/usr/include/ -I../../output/include -std=c++0x -DBRPC_WITH_GLOG=0 -DGFLAGS_NS=google -D__const__=__unused__ -g -DBRPC_WITH_RDMA -std=c++0x -DNDEBUG -O2 -D__const__= -pipe -W -Wall -Wno-unused-parameter -fPIC -fno-omit-frame-pointer test.pb.cc -o test.pb.o
<command-line>: warning: "__const__" redefined
<command-line>: note: this is the location of the previous definition
In file included from /usr/include/features.h:486,
                 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/limits:42,
                 from test.pb.h:7,
                 from test.pb.cc:4:
/usr/include/x86_64-linux-gnu/sys/cdefs.h:314:60: error: macro "__has_attribute" requires an identifier
  314 | #if __GNUC_PREREQ (2,5) || __glibc_has_attribute (__const__)
      |                                                            ^
make: *** [Makefile:98: test.pb.o] Error 1
rm test.pb.cc

To Reproduce (复现方法)

Expected behavior (期望行为)

Versions (各种版本)
OS:
Compiler:
brpc:
protobuf:

Additional context/screenshots (更多上下文/截图)

@chenBright
Copy link
Contributor

相关issue:#1693

chenBright pushed a commit that referenced this issue Aug 22, 2024
Co-authored-by: ivanallen <ivanallen@qq.com>
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 a pull request may close this issue.

2 participants