简体   繁体   English

卡萨布兰卡:关于linux centos的汇编错误gcc 4.8.1

[英]Casablanca: Assembly error gcc 4.8.1 on linux centos

I am trying to build casablanca , like they say on their page . 我正在尝试建立卡萨布兰卡 ,就像他们在自己的页面上所说的那样。 Because I have gcc-4.8.1 installed using CXX=gcc-4.8 is not ok, so I have removed it doing just: 因为我使用CXX=gcc-4.8安装了gcc-4.8.1是不行的,所以我删除了它只做:

cmake .. -DCMAKE_BUILD_TYPE=Release

It creates the files and when I do make I am getting these errors: 它创建的文件,当我这样做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

Have anyone met this problem? 有人遇到过这个问题吗? Is it because of gcc4.8.1? 是因为gcc4.8.1吗? How to fix it? 怎么解决?

The problem is that gcc 4.8 is generating "rep; ret" instructions to avoid a performance penalty for AMD chips. 问题是gcc 4.8正在生成“rep; ret”指令以避免AMD芯片的性能损失。 Older assemblers detect this as an error. 较旧的汇编程序将此检测为错误。

Details are here: 细节在这里:

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

The fix is to update your binutils so that you get a newer version of an assembler which accepts this instruction. 解决方法是更新binutils,以便获得接受此指令的更新版本的汇编程序。

sudo yum update binutils

---> Package binutils.x86_64 0:2.22.52.0.1-10.36.amzn1 will be updated --->包binutils.x86_64 0:2.22.52.0.1-10.36.amzn1将被更新

---> Package binutils.x86_64 0:2.23.52.0.1-30.64.amzn1 will be an update --->包binutils.x86_64 0:2.23.52.0.1-30.64.amzn1将是一个更新

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM