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

49次阅读

共计 1123 个字符,预计需要花费 3 分钟才能阅读完成。

问题形容

编译环境

  • 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*}
<built-in>: 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*}
<built-in>: note:   initializing argument 1 of 'int __builtin_aarch64_rndrrs(long unsigned int*)'

解决问题

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

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

正文完
 0