簡體   English   中英

卡薩布蘭卡:關於linux centos的匯編錯誤gcc 4.8.1

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

我正在嘗試建立卡薩布蘭卡 ,就像他們在自己的頁面上所說的那樣。 因為我使用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,以便獲得接受此指令的更新版本的匯編程序。

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將是一個更新

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM