Xgboost: gcc-6을 통해 OSX Sierra에 설치하는 동안 "FATAL:/opt/local/bin/../libexec/as/x86_64/as: ''플래그'를 이해할 수 없습니다!"가 계속 표시됩니다. 오류

에 만든 2017년 01월 09일  ·  16코멘트  ·  출처: dmlc/xgboost

환경 정보

운영 체제:
macOS 10.12.2(16C68)

컴파일러:
gcc-6

재현 단계

gcc-6을 설치하고 필요에 따라 config.mk를 수정했습니다.

export CC = gcc-6
export CXX = g++-6

그러나이 오류가 계속 발생합니다.

g++-6 -c -std=c++0x -Wall -Wno-unknown-pragmas -Iinclude   -Idmlc-core/include -Irabit/include -O3 -funroll-loops -msse2 -fPIC -fopenmp src/learner.cc -o build/learner.o
FATAL:/opt/local/bin/../libexec/as/x86_64/as: I don't understand 'm' flag!

당신은 무엇을 시도 했습니까?

  1. XCode 재설치
  2. gcc 재설치
  3. make clean_all && make -4j 실행

그러나 여전히 잘못되었습니다. 어떤 아이디어라도?

가장 유용한 댓글

@Marswang92 @jialinzou @mcneale
as 버전은 어떻습니까? as -v 로 확인할 수 있습니다. 아마도 터미널이 GNU Assembler 와 같은 것을 표시할 것입니다.

그리고 올바른 as 는 다음과 같다고 생각합니다.

Apple LLVM version 8.0.0 (clang-800.0.38)
Target: x86_64-apple-darwin15.6.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
 "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang" -cc1as -triple x86_64-apple-macosx10.11.0 -filetype obj -main-file-name - -target-cpu core2 -fdebug-compilation-dir /Users/fcbruce -dwarf-debug-producer Apple LLVM version 8.0.0 (clang-800.0.38) -dwarf-version=2 -mrelocation-model pic -o a.out -
^C

그 이유는 시스템이 as 의 다른 경로를 사용하기 때문입니다(재정의됨). /opt/local/bin/../libexec/as/x86_64/as 를 만난 오류 로그에 주의하십시오. 올바른 as/usr/bin/as $ 이어야 합니다. cd /usr/bin ; ./as -v 로 확인할 수 있습니다.

내 솔루션은 export PATH=/usr/bin:$PATH 입니다. 나는 내 친구가 문제를 해결하도록 도왔다. 그리고 그것이 당신을 도울 수 있다고 생각합니다.

모든 16 댓글

나는 같은 문제가 있었고 'g++-mp-5'로 시도했고 작동했습니다. 'as'에 전달된 알 수 없는 옵션과 관련이 있는 것 같습니다. 누구나 어셈블러에 전달된 명령줄 옵션을 검사하는 방법을 알고 있으므로 옵션을 비교할 수 있습니다.

@yuntai 안녕하세요, config.mk에서 export CXX = g++-mp-5 설정을 말씀하시는 건가요? 나는 그것을 시도했지만 작동하지 않습니다. 아직 글로벌 gcc 버전을 사용하고 있는 것 같습니다. 오류는 다음과 같습니다
g++-6 -std=c++0x -Wall -Wno-unknown-pragmas -Iinclude -Idmlc-core/include -Irabit/include -O3 -funroll-loops -msse2 -fPIC -fopenmp -MM -MT build/learner.o src/learner.cc >build/learner.d g++-6 -std=c++0x -Wall -Wno-unknown-pragmas -Iinclude -Idmlc-core/include -Irabit/include -O3 -funroll-loops -msse2 -fPIC -fopenmp -MM -MT build/logging.o src/logging.cc >build/logging.d g++-6 -std=c++0x -Wall -Wno-unknown-pragmas -Iinclude -Idmlc-core/include -Irabit/include -O3 -funroll-loops -msse2 -fPIC -fopenmp -MM -MT build/c_api/c_api.o src/c_api/c_api.cc >build/c_api/c_api.d g++-6 -std=c++0x -Wall -Wno-unknown-pragmas -Iinclude -Idmlc-core/include -Irabit/include -O3 -funroll-loops -msse2 -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++-6 -c -std=c++0x -Wall -Wno-unknown-pragmas -Iinclude -Idmlc-core/include -Irabit/include -O3 -funroll-loops -msse2 -fPIC -fopenmp src/logging.cc -o build/logging.o g++-6 -c -std=c++0x -Wall -Wno-unknown-pragmas -Iinclude -Idmlc-core/include -Irabit/include -O3 -funroll-loops -msse2 -fPIC -fopenmp src/learner.cc -o build/learner.o g++-6 -c -std=c++0x -Wall -Wno-unknown-pragmas -Iinclude -Idmlc-core/include -Irabit/include -O3 -funroll-loops -msse2 -fPIC -fopenmp src/c_api/c_api_error.cc -o build/c_api/c_api_error.o g++-6 -c -std=c++0x -Wall -Wno-unknown-pragmas -Iinclude -Idmlc-core/include -Irabit/include -O3 -funroll-loops -msse2 -fPIC -fopenmp src/c_api/c_api.cc -o build/c_api/c_api.o FATAL:/opt/local/bin/../libexec/as/x86_64/as: I don't understand 'm' flag! make: *** [build/c_api/c_api_error.o] Error 1 make: *** Waiting for unfinished jobs.... FATAL:/opt/local/bin/../libexec/as/x86_64/as: I don't understand 'm' flag! make: *** [build/logging.o] Error 1 FATAL:/opt/local/bin/../libexec/as/x86_64/as: I don't understand 'm' flag! make: *** [build/c_api/c_api.o] Error 1 FATAL:/opt/local/bin/../libexec/as/x86_64/as: I don't understand 'm' flag! make: *** [build/learner.o] Error 1

여기에 같은 문제가 있습니다.

$ 만들다
g++-6 -std=c++11 -Wall -Wno-unknown-pragmas -Iinclude -Idmlc-core/include -Irabit/include -O3 -funroll-loops -msse2 -fPIC -fopenmp -MM -MT 빌드/학습기. o src/learner.cc >build/learner.d

g++-6 -c -std=c++11 -Wall -Wno-unknown-pragmas -Iinclude -Idmlc-core/include -Irabit/include -O3 -funroll-loops -msse2 -fPIC -fopenmp src/learner.cc - o 구축/학습자.o

치명적:/opt/local/bin/../libexec/as/x86_64/as: 'm' 플래그를 이해할 수 없습니다!

make: * [build/learner.o] 오류 1

같은 문제가 있습니다.
치명적:/opt/local/bin/../libexec/as/x86_64/as: 'm' 플래그를 이해할 수 없습니다!
매우 이상하고 이상하고 동일한 버전이 다른 Sierra OS X 10.4 시스템에서 정상적으로 작동합니다.

@Marswang92 @jialinzou @mcneale
as 버전은 어떻습니까? as -v 로 확인할 수 있습니다. 아마도 터미널이 GNU Assembler 와 같은 것을 표시할 것입니다.

그리고 올바른 as 는 다음과 같다고 생각합니다.

Apple LLVM version 8.0.0 (clang-800.0.38)
Target: x86_64-apple-darwin15.6.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
 "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang" -cc1as -triple x86_64-apple-macosx10.11.0 -filetype obj -main-file-name - -target-cpu core2 -fdebug-compilation-dir /Users/fcbruce -dwarf-debug-producer Apple LLVM version 8.0.0 (clang-800.0.38) -dwarf-version=2 -mrelocation-model pic -o a.out -
^C

그 이유는 시스템이 as 의 다른 경로를 사용하기 때문입니다(재정의됨). /opt/local/bin/../libexec/as/x86_64/as 를 만난 오류 로그에 주의하십시오. 올바른 as/usr/bin/as $ 이어야 합니다. cd /usr/bin ; ./as -v 로 확인할 수 있습니다.

내 솔루션은 export PATH=/usr/bin:$PATH 입니다. 나는 내 친구가 문제를 해결하도록 도왔다. 그리고 그것이 당신을 도울 수 있다고 생각합니다.

만세! 해결책은 경로에서 /opt/local/bin을 제거하는 것 같습니다. @fcbruce 감사합니다!

이 작업을 수행하는 방법은 셸에 따라 다르며 @fcbruce 는 sh 또는 bash로 가정합니다. tcsh에서
setenv 경로 /usr/local/bin
예를 들어, 트릭을 할 수 있습니다.

안녕하세요, 사실 저는 노트북을 다시 초기화하여 문제를 해결했습니다. 원인은 내 랩톱에 있는 여러 버전의 gcc일 수 있습니다. 확실하지 않습니다.

@mcneale 좋은 제안. 감사합니다.

@fcbruce 경로를 추가하여 동일한 문제가 해결되었습니다. 감사합니다.

여러분, 안녕하세요!
나는 같은 문제가 있었다 : ...나는 ''플래그를 이해하지 못한다!
나는 export PATH=/usr/bin:$PATH로 그것을 해결했고 잠시 동안 효과가 있었다.
하지만 더 이상 작동하지 않는다는 것을 알고 있습니다. ''' 플래그를 이해할 수 없습니다! 문제
오류 메시지는 전혀 없지만 간단한 hello world 프로그램의 출력은 다음과 같습니다.

œ˙Ì˛����������‡��Ö� ��������H���__PAGEZERO�... ........................................................................................................................................................................................................... ... . . . . . . . . . . . . . . . . . . . . ������__텍스트 .. . . . . . . . . . . . . . . . . �����������__스텁���������__텍스트
�������÷�������������������������__stub_helper���__TEXT... �����B�����Ù�������������Ä����������__cstring������� __텍스트 .. . . . . . . . . . . . .
�������6�����������������������__const�������__TEXT... ��������@�����,�������@������������������������ ��__eh_frame������__TEXT��������p�����à�������p��������� 데이터 ����������������������__nl_symbol_ptr�__DATA�... ������������������������__la_symbol_ptr�__DATA�... .......................................................................................................................................................................................................................................... ������� ��... ���������� ��†���¿ ��0��������� ��
���»!��»���
���P�������������������������������������� ò!��
... .. .. ..
���/usr/lib/dyld�����������·†i ÕÉ6ÑòΩhfEπ€H$������

��

�*������������(���������������
���P���������/usr/local/opt/gcc/lib/gcc/7/libgfortran.4.dylib������
���8�������2÷���/usr/lib/libSystem.B.dylib������
���@�������������/usr/local/lib/gcc/7/libgcc_s.1.dylib���
���P���������/usr/local/opt/gcc/lib/gcc/7/libquadmath.0.dylib��������&�� ���� �����)������ 미 ... . . . . . . . . . . ... . . . . . . . . . . ... . . . . . . . . . . ... . . . . . . . . . . ... . . . . . . . . . . ... . . . . . . . . . . ... . . . . . . . . . . ... . . . . . . . . . . ... . . . . . . . . . . ... . . . . . . . . . . ... . . . . . . . . . . ... . . . . . . . . . . ... . . . . . . . . . . ... . . . . . . . . . . ... . . . . . . . . . . ... . . . . . . . . . . ... . . . . . . . . . . ���������������� ... . . . . . . . . . . ... . . . . . . . . . . ... . . . . . . . . . . ... . . . . . . . . . . ... . . . . . . . . . . ... . . . . . . . . . . ... . . . . . . . . . . ... . . . . . . . . . . ... . . . . . . . . . . ... . . . . . . . . . . ... . . . . . . . . . . ... . . . . . . . . . . ... . . . . . . . . . . ... . . . . . . . . . . ... . . . . . . . . . . ... . . . . . . . . . . ... . . . . . . . . . . ... . . . . . . . . . . ... . . . . . . . . . . ... . . . . . . . . . . ... . . . . . . . . . . ... . . . . . . . . . . ... . . . . . . . . . . 쨔응 (˛ˇˇ«Ö0˛ˇˇ���«Ö ˛ˇˇÄ���«Ö$˛ˇˇ���HçÖ ˛ˇˇHâ«Ëv���HçÖ ˛ˇˇ∫
���Hç5¡���Hâ«Ëg���HçÖ ˛ˇˇHâ«ËR���ê…√UHâÂHÉÏâ}¸HâuHãUãE¸Hâ÷â«Ë
���Hç5ê���ø���Ë���ËWˇˇˇ∏����…√ˇ%4��ˇ%6��ˇ%8��ˇ%:��ˇ%<��Lç

��ASˇ%˝���êh����ÈÊˇˇˇh���È‹ˇˇˇh7���È“ˇˇˇhQ���È»ˇˇˇhp���Èæˇˇˇhello.F90.Hello World!����D��� ˇ .. .. .
�4���
���ñ˛ˇˇˇˇˇˇs���������Ü���
ㅇㅇ
�������4���T���—˛ˇˇˇˇˇˇ=���������Ü���
8���
..........................................................................".. ��,������������... ... . . . . . . . . . ... . . . . . . . . . ... . . . . . . . . . . ... . . . . . . . . . . ... . . . . . . . . . . ... . . . . . . . . . . ... . . . . . . . . . . ... . . . . . . . . . . ... . . . . . . . . . . ... . . . . . . . . . . ... . . . . . . . . . . ... . . . . . . . . . . ... . . . . . . . . . . ... . . . . . . . . . . ... . . . . . . . . . ... . . . . . . . . . . ... . . . . . . . . . ... . . . . . . . . . ... . . . . . . . . . . ... . . . . . . . . . . ... . . . . . . . . . . ... . . . . . . . . . . ... . . . . . . . . . . ... . . . . . . . . . . ... . . . . . . . . . . ... . . . . . . . . . . ... . . . . . . . . . . ... . . . . . . . . . . ... . . . . . . . . . . ... . . . . . . . . . . ... . . . . . . . . . . ... . . . . . . . . . . ... . . . . . . . . . . ... . . . . . . . . . . ... . . . . . . . . . . ... . . . . . . . . . . ... . . . . . . . . . . ... . . . . . . . . . . ... . . . . . . . . . . ... . . . . . . . . . . ... . . . . . . . . . . ... . . . . . . . . . . ... . . . . . . . . . . ... . . . . . . . . . . ... . . . . . . . . . . ... . . . . . . . . . . ... . . . . . . . . . . ... . . . . . . . . . . ... . . . . . . . . . . ... . . . . . . . . . . ... . . . . . . . . . . ... . . . . . . . . . . ... . . . . . . . . . . ... . . . . . . . . . . ... . . . . . . . . . . ... . . . . . . . . . . ... . . . . . . . . . . ... . . . . . . . . . . ... . . . . . . . . . . ... . . . . . . . . . . ... . . . . . . . . . . ... . . . . . . . . . . ... . . . . . . . . . . ... . . . . . . . . . . ... . . . . . . . . . . ... . . . . . . . . . . ... . . . . . . . . . . ... . . . . . . . . . . ... . . . . . . . . . . ... . . . . . . . . . . ... . . . . . . . . . . ... . . . . . . . . . . ... . . . . . . . . . . ... . . . . . . . . . . ... . . . . . . . . . . ... . . . . . . . . . . ... . . . . . . . . . . ... . . . . . . . . . . ... . . . . . . . . . ������������������... ����@dyld_stub_binder�Qr�ê�r@__gfortran_set_args�ê�r@__gfortran_set_options�ê�r @__gfortran_st_write�ê�r(@__gfortran_st_write_done�ê�r0@__gfortran_transfer_character_write�ê������ ��_mh_execute_header�!main�%����ô
�������¶
s�����©�����&�����±�����P���������������������� ��
..................................0............G......[.... �����t�����������ò... ����@������������� �__mh_execute_header�_main�__gfortran_set_args�__gfortran_set_options�__gfortran_st_write�__gfortran_st_write_done�__gfortran_transfer_character_write�dyld_stub_binder�_1.3.5options

나는 코드를 컴파일하고 싶고 내 Mac에서 간단한 gfortran 컴파일러를 실행하는 데 이미 몇 주가 걸립니다.

문제는 내보내기 PATH=/usr/bin:$PATH가 영구적이지 않다는 것입니다. 따라서 터미널이나 PC를 다시 시작하거나 /usr/bin/as가 아닌 /opt/local/bin/as에 있는 그대로 새 탭을 열면
OSX 버전: 10.12.6

누가 나를 도울 수 있습니까 ... 나는 죽어 가고 있습니다
인사
수학

.config 파일을 편집하여 export PATH=/usr/bin:$PATH를 추가하고 터미널을 다시 시작하면 컴파일러가 올바른 경로를 찾아야 합니다. /opt/local/bin을 사용하는 경우 .profile을 수정하여 거기에 넣습니다. 예를 들어
내보내기 경로=/usr/bin:/opt/local/bin:/opt/local/sbin:$PATH. 그것은 OS X 10.12.6을 실행하는 나를 위해 일했습니다.

나는 MacPorts가 .profile의 다음 행을 통해 $PATH 체인의 /usr/bin 앞에 /opt/local/bin을 추가하고 있음을 발견했습니다.

[hash] 2018-03-01_at_16:21:35에 MacPorts 설치 프로그램 추가: MacPorts와 함께 사용할 적절한 PATH 변수 추가.
내보내기 PATH="/opt/local/bin:/opt/local/sbin:$PATH"
[hash] MacPort와 함께 사용하기 위해 PATH 환경 변수 조정을 완료했습니다.

따라서 "as"는 /usr/bin의 기본(작업) 버전 이전에 /opt/local/bin/../libexec/as/x86_64/as에서 발견되었습니다.

.profile에서 이 줄을 제거하고 터미널을 다시 시작했습니다. 내 테스트 파일 hello world.f가 이제 컴파일 중입니다.

@netjjordan 정말 감사합니다! PATH="..." 시작 부분에 /usr/bin을 넣어 컴파일할 수 있었습니다.

@netjjordan 덕분에 저에게도 효과적이었습니다.

파티에 늦게 왔지만...

다음은 나를 위해 일했습니다. 이 솔루션은 시스템 경로 회전과 무관합니다.

$ cd /opt/local/bin
$ sudo mv ./as ./broken
$ sudo ln -s /usr/bin/as ./as

다음은 작동하는지 보여주는 테스트입니다.

$ mkdir ~/gcctest
$ cd ~/gcctest
$ echo 'int main(){return -1;}' > conftest.c
$ /opt/local/bin/gcc -o conftest conftest.c
치명적:/opt/local/bin/../libexec/as/x86_64/as: 'm' 플래그를 이해할 수 없습니다!
$ cd /opt/local/bin
$ sudo mv ./as ./broken
$ sudo ln -s /usr/bin/as ./as
$ cd -
$ /opt/local/bin/gcc -o conftest conftest.c
$ ./경쟁; 에코 $?
255

파티에 늦게 왔지만...

다음은 나를 위해 일했습니다. 이 솔루션은 시스템 경로 회전과 무관합니다.

$ cd /opt/local/bin
$ sudo mv ./as ./broken
$ sudo ln -s /usr/bin/as ./as

다음은 작동하는지 보여주는 테스트입니다.

$ mkdir ~/gcctest
$ cd ~/gcctest
$ echo 'int main(){return -1;}' > conftest.c
$ /opt/local/bin/gcc -o conftest conftest.c
치명적:/opt/local/bin/../libexec/as/x86_64/as: 'm' 플래그를 이해할 수 없습니다!
$ cd /opt/local/bin
$ sudo mv ./as ./broken
$ sudo ln -s /usr/bin/as ./as
$ cd -
$ /opt/local/bin/gcc -o conftest conftest.c
$ ./경쟁; 에코 $?
255

이것은 나를 위해 작동합니다. 매우 감사합니다

이 페이지가 도움이 되었나요?
0 / 5 - 0 등급

관련 문제

choushishi picture choushishi  ·  3코멘트

matthewmav picture matthewmav  ·  3코멘트

pplonski picture pplonski  ·  3코멘트

uasthana15 picture uasthana15  ·  4코멘트

XiaoxiaoWang87 picture XiaoxiaoWang87  ·  3코멘트