10

我正在尝试建造casablanca,就像他们在页面上所说的那样。因为我已经gcc-4.8.1安装了 using CXX=gcc-4.8is not ok,所以我删除了它只是:

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吗?如何解决?

4

2 回答 2

15

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

详情在这里:

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

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

于 2014-07-08T06:32:39.127 回答
4
sudo yum update binutils

---> 软件包 binutils.x86_64 0:2.22.52.0.1-10.36.amzn1 将被更新

---> 软件包 binutils.x86_64 0:2.23.52.0.1-30.64.amzn1 将是一个更新

于 2015-10-09T09:31:59.343 回答