Ошибка сборки xgboost в CentOS 6.8

Операционная система: CentOS 6.8

Компилятор: gcc 4.8.2 и g++4.8.2

Действия по воспроизведению

Просто следуйте инструкциям в руководстве по установке

Мои шаги

git clone --recursive https://github.com/dmlc/xgboost git submodule init git submodule update cd xgboost make -j4

Тогда я получаю ошибку ниже

[root@xxx]# make -j4 g++ -std=c++0x -Wall -O3 -msse2 -Wno-unknown-pragmas -funroll-loops -Iinclude -Idmlc-core/include -Irabit/include -fPIC -fopenmp -MM -MT build/learner.o src/learner.cc >build/learner.d g++ -std=c++0x -Wall -O3 -msse2 -Wno-unknown-pragmas -funroll-loops -Iinclude -Idmlc-core/include -Irabit/include -fPIC -fopenmp -MM -MT build/logging.o src/logging.cc >build/logging.d g++ -std=c++0x -Wall -O3 -msse2 -Wno-unknown-pragmas -funroll-loops -Iinclude -Idmlc-core/include -Irabit/include -fPIC -fopenmp -MM -MT build/c_api/c_api.o src/c_api/c_api.cc >build/c_api/c_api.d g++ -std=c++0x -Wall -O3 -msse2 -Wno-unknown-pragmas -funroll-loops -Iinclude -Idmlc-core/include -Irabit/include -fPIC -fopenmp -MM -MT build/c_api/c_api_error.o src/c_api/c_api_error.cc >build/c_api/c_api_error.d g++ -c -std=c++0x -Wall -O3 -msse2 -Wno-unknown-pragmas -funroll-loops -Iinclude -Idmlc-core/include -Irabit/include -fPIC -fopenmp src/c_api/c_api_error.cc -o build/c_api/c_api_error.o g++ -c -std=c++0x -Wall -O3 -msse2 -Wno-unknown-pragmas -funroll-loops -Iinclude -Idmlc-core/include -Irabit/include -fPIC -fopenmp src/learner.cc -o build/learner.o g++ -c -std=c++0x -Wall -O3 -msse2 -Wno-unknown-pragmas -funroll-loops -Iinclude -Idmlc-core/include -Irabit/include -fPIC -fopenmp src/logging.cc -o build/logging.o g++ -c -std=c++0x -Wall -O3 -msse2 -Wno-unknown-pragmas -funroll-loops -Iinclude -Idmlc-core/include -Irabit/include -fPIC -fopenmp src/c_api/c_api.cc -o build/c_api/c_api.o g++ -std=c++0x -Wall -O3 -msse2 -Wno-unknown-pragmas -funroll-loops -Iinclude -Idmlc-core/include -Irabit/include -fPIC -fopenmp -MM -MT build/common/common.o src/common/common.cc >build/common/common.d g++ -c -std=c++0x -Wall -O3 -msse2 -Wno-unknown-pragmas -funroll-loops -Iinclude -Idmlc-core/include -Irabit/include -fPIC -fopenmp src/common/common.cc -o build/common/common.o g++ -std=c++0x -Wall -O3 -msse2 -Wno-unknown-pragmas -funroll-loops -Iinclude -Idmlc-core/include -Irabit/include -fPIC -fopenmp -MM -MT build/data/data.o src/data/data.cc >build/data/data.d g++ -c -std=c++0x -Wall -O3 -msse2 -Wno-unknown-pragmas -funroll-loops -Iinclude -Idmlc-core/include -Irabit/include -fPIC -fopenmp src/data/data.cc -o build/data/data.o g++ -std=c++0x -Wall -O3 -msse2 -Wno-unknown-pragmas -funroll-loops -Iinclude -Idmlc-core/include -Irabit/include -fPIC -fopenmp -MM -MT build/data/simple_csr_source.o src/data/simple_csr_source.cc >build/data/simple_csr_source.d g++ -c -std=c++0x -Wall -O3 -msse2 -Wno-unknown-pragmas -funroll-loops -Iinclude -Idmlc-core/include -Irabit/include -fPIC -fopenmp src/data/simple_csr_source.cc -o build/data/simple_csr_source.o /tmp/ccNp7oXM.s: Assembler messages: /tmp/ccNp7oXM.s:148: Error: expecting string instruction after `rep' /tmp/ccNp7oXM.s:1796: Error: expecting string instruction after `rep' /tmp/ccNp7oXM.s:4394: Error: expecting string instruction after `rep' make: *** [build/data/simple_csr_source.o] Error 1 make: *** Waiting for unfinished jobs.... /tmp/ccnxYuhm.s: Assembler messages: /tmp/ccnxYuhm.s:44: Error: expecting string instruction after `rep' /tmp/ccnxYuhm.s:272: Error: expecting string instruction after `rep' /tmp/ccnxYuhm.s:276: Error: expecting string instruction after `rep' /tmp/ccnxYuhm.s:316: Error: expecting string instruction after `rep' /tmp/ccnxYuhm.s:29012: Error: expecting string instruction after `rep' make: *** [build/learner.o] Error 1 /tmp/ccyHo0ol.s: Assembler messages: /tmp/ccyHo0ol.s:331: Error: expecting string instruction after `rep' /tmp/ccyHo0ol.s:386: Error: expecting string instruction after `rep' /tmp/ccyHo0ol.s:555: Error: expecting string instruction after `rep' /tmp/ccyHo0ol.s:11407: Error: expecting string instruction after `rep' /tmp/ccyHo0ol.s:17712: Error: expecting string instruction after `rep' make: *** [build/c_api/c_api.o] Error 1 /tmp/cc3gD7Gv.s: Assembler messages: /tmp/cc3gD7Gv.s:82: Error: expecting string instruction after `rep' make: *** [build/data/data.o] Error 1

Есть ли какие-либо предложения для первопричины?

1 ответ

Решение

Я не знаком с xgboost, однако из ошибки кажется очевидным, что некоторый код ASM не генерируется должным образом:

ожидание строковой инструкции после `rep'

Префикс ключевого слова REP в ASM означает "повторить эту инструкцию несколько раз (определяется регистром C)".

Однако это также может быть проблемой с вашей цепочкой инструментов. На самом деле, если код, который генерирует эту ошибку, не полагается на встроенный ASM, может показаться, что это ошибка цепочки инструментов.

Некоторые версии binutils считают rep ret быть недействительным, хотя на самом деле это действительная инструкция x86-64.

Попробуйте обновить до binutils 2.23.52.0.1

Другие вопросы по тегам