关于Apple Silicon Mac编译RocksDB可能出现的坑

问题描述

编译环境

  • MacOS
  • M1 Pro
  • gcc
/opt/homebrew/Cellar/gcc/10.2.0_4/lib/gcc/10/gcc/aarch64-apple-darwin20/10.2.1/include/arm_acle.h: In function 'int __rndr(uint64_t*)':
/opt/homebrew/Cellar/gcc/10.2.0_4/lib/gcc/10/gcc/aarch64-apple-darwin20/10.2.1/include/arm_acle.h:201:34: error: invalid conversion from 'uint64_t*' {aka 'long long unsigned int*'} to 'long unsigned int*' [-fpermissive]
  201 |   return __builtin_aarch64_rndr (__res);
      |                                  ^~~~~
      |                                  |
      |                                  uint64_t* {aka long long unsigned int*}
: note:   initializing argument 1 of 'int __builtin_aarch64_rndr(long unsigned int*)'
/opt/homebrew/Cellar/gcc/10.2.0_4/lib/gcc/10/gcc/aarch64-apple-darwin20/10.2.1/include/arm_acle.h: In function 'int __rndrrs(uint64_t*)':
/opt/homebrew/Cellar/gcc/10.2.0_4/lib/gcc/10/gcc/aarch64-apple-darwin20/10.2.1/include/arm_acle.h:207:36: error: invalid conversion from 'uint64_t*' {aka 'long long unsigned int*'} to 'long unsigned int*' [-fpermissive]
  207 |   return __builtin_aarch64_rndrrs (__res);
      |                                    ^~~~~
      |                                    |
      |                                    uint64_t* {aka long long unsigned int*}
: note:   initializing argument 1 of 'int __builtin_aarch64_rndrrs(long unsigned int*)'

解决问题

百思不得其解 最后终于在google搜到了和我一样问题的老哥
https://githubmemory.com/repo...

可能真的是gcc导致的问题
换成clang后,问题解决。

你可能感兴趣的:(关于Apple Silicon Mac编译RocksDB可能出现的坑)