我正在尝试构建casablanca,就像他们在their page上说的那样。因为我已经使用gcc-4.8.1安装了CXX=gcc-4.8,所以我删除了它,只做了以下操作:
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吗?怎么修呢?
发布于 2014-07-08 06:32:39
问题是gcc 4.8正在生成"rep;ret“指令,以避免AMD芯片的性能损失。旧的汇编程序会检测到这是一个错误。
详情如下:
https://gcc.gnu.org/ml/gcc-help/2011-03/msg00286.html
修复方法是更新您的binutils,以便您获得一个接受此指令的较新版本的汇编程序。
发布于 2015-10-09 09:31:59
sudo yum update binutils->软件包binutils.x86_64 0:2.22.52.0.1-10.36将更新will 1
->包binutils.x86_64 0:2.23.52.0.1-30.64.amzn 1将是一个更新
https://stackoverflow.com/questions/23561136
复制相似问题