2014-05-09 8 views
10

Ich versuche zu bauen casablanca, wie sie auf their page sagen. Weil ich installiert mit CXX=gcc-4.8 nicht ok ist, so habe ich es nur tun, entfernt:Casablanca: Assembly Fehler gcc 4.8.1 auf Linux Centos

cmake .. -DCMAKE_BUILD_TYPE=Release 

die Dateien erstellt und wenn ich make ich bin diese Fehler bekommen:

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 

jemand diesem Problem begegnet? Liegt es an gcc4.8.1? Wie man es repariert?

Antwort

15

Das Problem ist, dass gcc 4.8 "rep; ret" Anweisungen generiert, um eine Leistungseinbuße für AMD-Chips zu vermeiden. Ältere Assembler erkennen dies als Fehler.

Einzelheiten sind hier:

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

Das Update ist Ihr binutils zu aktualisieren, so dass Sie eine neuere Version eines Assembler erhalten, die diese Anweisung akzeptiert.

+0

Diese Antwort behebt den gleichen Fehler auf einer aktuellen Amazon EC2 CentOS-Box (3.4.37-40.44.amzn1.x86_64). Ran 'yum update binutils', was es zu 2.23.52.0.1 brachte und mein Problem verschwand. Nicht sicher, welche Version es vorher war. –

+1

Für CentOS6 musste ich 'sudo yum install devtoolset-2-binutils-devel 'tun – MarkHu

4
sudo yum update binutils 

---> Paket binutils.x86_64 0: 2.22.52.0.1-10.36.amzn1 wird

---> Paket binutils.x86_64 0 aktualisiert werden: 2.23.52.0.1-30.64 .amzn1 wird ein Update sein

Verwandte Themen