首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Casablanca: linux上的装配错误gcc 4.8.1

Casablanca: linux上的装配错误gcc 4.8.1
EN

Stack Overflow用户
提问于 2014-05-09 09:30:14
回答 2查看 9.2K关注 0票数 10

我正在尝试构建casablanca,就像他们在their page上说的那样。因为我已经使用gcc-4.8.1安装了CXX=gcc-4.8,所以我删除了它,只做了以下操作:

代码语言:javascript
复制
cmake .. -DCMAKE_BUILD_TYPE=Release

它创建文件,当我执行make时,我得到以下错误:

代码语言:javascript
复制
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吗?怎么修呢?

EN

回答 2

Stack Overflow用户

回答已采纳

发布于 2014-07-08 06:32:39

问题是gcc 4.8正在生成"rep;ret“指令,以避免AMD芯片的性能损失。旧的汇编程序会检测到这是一个错误。

详情如下:

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

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

票数 15
EN

Stack Overflow用户

发布于 2015-10-09 09:31:59

代码语言:javascript
复制
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将是一个更新

票数 4
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/23561136

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档