brpc icon indicating copy to clipboard operation
brpc copied to clipboard

aarch64 下编译失败

Open eric-yq opened this issue 3 months ago • 0 comments

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

eric-yq avatar Sep 12 '25 05:09 eric-yq