aarch64 下编译失败
- Dominant language
- C++
- Stars
- 17.6k
- Forks
- 4.1k
- Avg merge
- 2d 12h
- Merged PRs (30d)
- 69
Description
**Describe the bug**
Failed to make in aarch64(AWS Graviton4 instance)
> ......
Compiling src/brpc/nshead_meta.pb.o
In file included from ./src/butil/atomicops.h:34:0,
from src/bthread/butex.cpp:22:
./src/butil/macros.h:173:34: error: static assertion failed: butex_fits_in_one_cacheline
#define BAIDU_CASSERT(expr, msg) static_assert(expr, #msg)
^
src/bthread/butex.cpp:126:1: note: in expansion of macro ‘BAIDU_CASSERT’
BAIDU_CASSERT(sizeof(Butex) == BAIDU_CACHELINE_SIZE, butex_fits_in_one_cacheline);
^~~~~~~~~~~~~
......
**To Reproduce**
make -j CXXFLAGS="-fsigned-char -DGFLAGS_NS=gflags"
**Expected behavior**
Build successfully.
**Versions**
OS: Amazon Linux 2
Compiler: gcc version 7.3.1 20180712 (Red Hat 7.3.1-17) (GCC)
brpc: v0.9.7 , v1.4.0
protobuf: 2.5.0-8.amzn2.0.5
**Additional context/screenshots**
Contributor guide
Research direction
Start by reproducing the failure with make -j CXXFLAGS="-fsigned-char -DGFLAGS_NS=gflags" on an aarch64 AWS Graviton4 environment. Read src/bthread/butex.cpp and the BAIDU_CACHELINE_SIZE and BAIDU_CASSERT definitions in src/butil/macros.h; done means the static assertion passes and the project builds successfully with the reported compiler and versions.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- backend-api-design
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100