2017-11-22 8 views
0

OCaml 빌드에 문제가 있습니다. 그것은 libasmrun.a와 함께 문제가 될 것으로 보이지만 오류는 매우 이상합니다 (적어도 저에게는).OCaml 컴파일이 caml_oldify_local_roots로 인해 실패했습니다.

아무도 나에게 무슨 문제가 있다고 말할 수 있습니까? OCaml 4.04.0을 빌드하려고합니다. , GCC 버전 일반적으로 4.7.2

roots.c: In function ‘caml_oldify_local_roots’: 
roots.c:306:19: warning: implicit declaration of function ‘Saved_return_address’ [-Wimplicit-function-declaration] 
    retaddr = Saved_return_address(sp); 
      ^
roots.c:316:46: warning: implicit declaration of function ‘Callback_link’ [-Wimplicit-function-declaration] 
    struct caml_context * next_context = Callback_link(sp);ng 
             ^
roots.c:316:46: warning: initialization makes pointer from integer without a cast [-Wint-conversion] 
roots.c: In function ‘caml_do_local_roots’: 
roots.c:492:46: warning: initialization makes pointer from integer without a cast [-Wint-conversion] 
    struct caml_context * next_context = Callback_link(sp); 
             ^
backtrace_prim.c: In function ‘caml_next_frame_descriptor’: 
backtrace_prim.c:55:13: warning: implicit declaration of function ‘Saved_return_address’ [-Wimplicit-function-declaration] 
    *pc = Saved_return_address(*sp); 
     ^
backtrace_prim.c:63:44: warning: implicit declaration of function ‘Callback_link’ [-Wimplicit-function-declaration] 
    struct caml_context * next_context = Callback_link(*sp); 
             ^
backtrace_prim.c:63:44: warning: initialization makes pointer from integer without a cast [-Wint-conversion] 
make[4]: *** No rule to make target 'none.o', needed by 'libasmrun.a'. Stop. 
make[3]: *** [makeruntimeopt] Error 2 
make[2]: *** [opt-core] Error 2 
make[1]: *** [opt.opt] Error 2 
make: *** [world.opt] Error 2 
+0

, GCC 버전 4.7.2 – mabeloo52

+0

여기에 실제 것 같다 초기화하는 경우 다음, 거기

opam switch 4.04.0+bytecode-only 

을위한 특별한 컴파일러 스위치 또는 ** 'libasmrun.a'에 필요한 'none.o'대상을 만드는 규칙이 없습니다. **. 다른 것은 단지 경고입니다. make 타겟은 아마도 ./configure와 관련된 문제를 나타낼 수도 있습니다 (OCaml을 구축하거나 autotools와 그 문제에 관해서 많이 알지 못합니다). – glennsl

답변

3

을 우분투 16.04를 실행하면, 당신은 당신이 항상 구축하고 설치, 다운로드합니다 OPAM에서 최신 버전을 얻을 수있는, 소스에서 OCaml의 컴파일러를 구축 할 필요가 없습니다 너를 위해서. 그러나 실제로 필요한 경우 다음 단계를 따르십시오.

./configure 
make world 
sudo make install 

모든 단계가 성공하는지 확인하십시오. 즉, echo $?은 각 명령 다음에 0을 표시합니다.

configure 스크립트는 많은 흥미로운 옵션을 허용하므로 -prefix 옵션이 가장 중요합니다. 자세한 설치 및 빌드 방법은 소스 트리의 최상위 디렉토리에있는 INSTALL.adoc 파일을 참조하십시오.

에 대해서는 none.o입니다. none.o은 백엔드 구현을위한 자리 표시 자 모듈이며 대상 플랫폼에서 원시 코드 생성이 지원되지 않는 경우에 사용됩니다. 따라서 오류가 발생하면 make world.opt을 수행 할 수 없다는 것을 의미합니다. 아키텍처에 대한 원시 코드 컴파일러가 없기 때문입니다.

괜찮은 C 컴파일러가있는 아키텍처에서는 바이트 코드 전용 컴파일러를 사용하여 OCaml 시스템을 설치할 수 있습니다. 당신이 OPAM을 사용하는 경우 OPAM 우분투 16.04를 실행

opam init --comp=4.04.0+bytecode-only 
+0

이것은 실제로 OPAM의 출력입니다. 여러분이 설명한 것처럼해야합니다. – mabeloo52

+0

그러면 아키텍처가 지원되지 않는다는 의미입니다. – ivg

+0

이것은 효과가 있습니다. 이상하게도 내 아키텍처는 다음 문서에 따라 지원되어야합니다. Linux xxx 4.6.5-x86_64-xxxx71 # 2 SMP Fri Jul 29 16:16:25 EDT 2016 x86_64 x86_64 x86_64 GNU/Linux. 도와 주셔서 감사합니다. – mabeloo52