2014-05-09 14 views
10

Sto cercando di costruire casablanca, come si dice su their page. Perché ho installato utilizzando CXX=gcc-4.8 non è ok, così ho tolto fare proprio:Casablanca: errore di assemblaggio gcc 4.8.1 su linux centos

cmake .. -DCMAKE_BUILD_TYPE=Release 

crea i file e quando lo faccio make sto ottenendo questi errori:

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 

ho nessuno incontrato questo problema? È a causa di gcc4.8.1? Come sistemarlo?

risposta

15

Il problema è che gcc 4.8 sta generando istruzioni "rep; ret" per evitare una penalizzazione delle prestazioni dei chip AMD. I vecchi assemblatori lo riconoscono come un errore.

dettagli sono qui:

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

La correzione è quello di aggiornare i binutils in modo da ottenere una nuova versione di un assemblatore che accetta questa istruzione.

+0

Questa risposta ha corretto lo stesso errore su una recente casella Amazon EC2 CentOS (3.4.37-40.44.amzn1.x86_64). Esegui 'yum update binutils' che lo ha portato a 2.23.52.0.1 e il mio problema è andato via. Non sono sicuro di quale versione fosse prima, sfortunatamente. –

+1

Per CentOS6, ho dovuto eseguire 'sudo yum install devtoolset-2-binutils-devel' – MarkHu

4
sudo yum update binutils 

---> Pacchetto binutils.x86_64 0: 2.22.52.0.1-10.36.amzn1 sarà aggiornato

---> Pacchetto binutils.x86_64 0: 2.23.52.0.1-30.64 .amzn1 sarà un aggiornamento

Problemi correlati