gpt4 book ai didi

c++ - 卡萨布兰卡:在 linux centos 上的汇编错误 gcc 4.8.1

转载 作者:IT王子 更新时间:2023-10-29 00:04:19 26 4
gpt4 key购买 nike

我正在尝试构建 casablanca ,就像他们在 their page 上所说的那样.因为我使用 CXX=gcc-4.8 安装了 gcc-4.8.1 是不行的,所以我删除了它:

cmake .. -DCMAKE_BUILD_TYPE=Release

它创建文件,当我执行 make 时,我收到这些错误:

Scanning dependencies of target casablanca
[ 1%] Building CXX object src/CMakeFiles/casablanca.dir/streams/linux/fileio_linux.cpp.o
/tmp/ccoWLl81.s: Assembler messages:
/tmp/ccoWLl81.s:97: Error: expecting string instruction after `rep'
/tmp/ccoWLl81.s:188: Error: expecting string instruction after `rep'
/tmp/ccoWLl81.s:298: Error: expecting string instruction after `rep'
/tmp/ccoWLl81.s:310: Error: expecting string instruction after `rep'
/tmp/ccoWLl81.s:322: Error: expecting string instruction after `rep'
/tmp/ccoWLl81.s:334: Error: expecting string instruction after `rep'
/tmp/ccoWLl81.s:371: Error: expecting string instruction after `rep'
/tmp/ccoWLl81.s:494: Error: expecting string instruction after `rep'
/tmp/ccoWLl81.s:508: Error: expecting string instruction after `rep'
/tmp/ccoWLl81.s:522: Error: expecting string instruction after `rep'
/tmp/ccoWLl81.s:536: Error: expecting string instruction after `rep'
/tmp/ccoWLl81.s:550: Error: expecting string instruction after `rep'
/tmp/ccoWLl81.s:2028: Error: expecting string instruction after `rep'
/tmp/ccoWLl81.s:2057: Error: expecting string instruction after `rep'
/tmp/ccoWLl81.s:2086: Error: expecting string instruction after `rep'
/tmp/ccoWLl81.s:3975: Error: expecting string instruction after `rep'
/tmp/ccoWLl81.s:6186: Error: expecting string instruction after `rep'
/tmp/ccoWLl81.s:10355: Error: expecting string instruction after `rep'
make[2]: *** [src/CMakeFiles/casablanca.dir/streams/linux/fileio_linux.cpp.o] Error 1
make[1]: *** [src/CMakeFiles/casablanca.dir/all] Error 2
make: *** [all] Error 2

有人遇到过这个问题吗?是因为gcc4.8.1吗?如何解决?

最佳答案

问题是 gcc 4.8 正在生成“rep; ret”指令以避免 AMD 芯片的性能损失。较旧的汇编程序将此检测为错误。

详情在这里:

https://gcc.gnu.org/ml/gcc-help/2011-03/msg00286.html

解决方法是更新您的 binutils,以便您获得接受此指令的较新版本的汇编器。

关于c++ - 卡萨布兰卡:在 linux centos 上的汇编错误 gcc 4.8.1,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23561136/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com