2017-03-10 5 views
1

내가 명령 opam install ocamlbuild을 실행하고 내가 여기 ocamloptocamlopt 연결 오류 코드 2

에 어떤 문제가 보인다는 opam가 나에게 말하고있는 것이다 (나는 그냥 내 4.04을 좋아하지 않는다 같은데요 버전)

### stdout ### 
# [...] 
# mkdir -p tmp 
# ocamlopt.opt -pack src/const.cmx src/loc.cmx src/discard_printf.cmx src/signatures.cmi src/my_std.cmx src/my_unix.cmx src/tags.cmx src/display.cmx src/log.cmx src/shell.cmx src/bool.cmx src/glob_ast.cmx src/glob_lexer.cmx src/glob.cmx src/lexers.cmx src/param_tags.cmx src/command.cmx src/ocamlbuild_config.cmx src/ocamlbuild_where.cmx src/slurp.cmx src/options.cmx src/pathname.cmx src/configuration.cmx src/flags.cmx src/hygiene.cmx src/digest_cache.cmx src/resource.cmx src/rule.cmx src/solver.cmx src/report.cmx src/tools.cmx src/fda.cmx src/findlib.cmx src/ocaml_arch.cmx src/ocaml_utils.cmx src/ocaml_dependencies.cmx src/ocaml_compiler.cmx src/ocaml_tools.cmx src/ocaml_specific.cmx src/exit_codes.cmx src/plugin.cmx src/hooks.cmx src/main.cmx -o tmp/ocamlbuild_pack.cmx 
# mv tmp/ocamlbuild_pack.cmx src/ocamlbuild_pack.cmx 
# mv tmp/ocamlbuild_pack.o src/ocamlbuild_pack.o 
# ocamlopt.opt -for-pack Ocamlbuild_pack -w L -w R -w Z -I src -I +unix -safe-string -bin-annot -c src/ocamlbuild_plugin.ml 
# ocamlopt.opt -for-pack Ocamlbuild_pack -w L -w R -w Z -I src -I +unix -safe-string -bin-annot -c src/ocamlbuild_executor.ml 
# ocamlopt.opt -for-pack Ocamlbuild_pack -w L -w R -w Z -I src -I +unix -safe-string -bin-annot -c src/ocamlbuild_unix_plugin.ml 
# ocamlopt.opt -for-pack Ocamlbuild_pack -w L -w R -w Z -I src -I +unix -safe-string -bin-annot -c src/ocamlbuild.ml 
# ocamlopt.opt -I +unix -I src -o ocamlbuild.native unix.cmxa src/ocamlbuild_pack.cmx src/ocamlbuild_plugin.cmx src/ocamlbuild_executor.cmx src/ocamlbuild_unix_plugin.cmx src/ocamlbuild.cmx 
# Makefile:131: recipe for target 'ocamlbuild.native' failed 
### stderr ### 
# [...] 
# /usr/bin/ld: /home/oleg/.opam/4.04.0/lib/ocaml/libasmrun.a(finalise.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC 
# /usr/bin/ld: /home/oleg/.opam/4.04.0/lib/ocaml/libasmrun.a(custom.o): relocation R_X86_64_32 against symbol `caml_custom_table' can not be used when making a shared object; recompile with -fPIC 
# /usr/bin/ld: /home/oleg/.opam/4.04.0/lib/ocaml/libasmrun.a(unix.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC 
# /usr/bin/ld: /home/oleg/.opam/4.04.0/lib/ocaml/libasmrun.a(backtrace.o): relocation R_X86_64_32 against symbol `caml_backtrace_last_exn' can not be used when making a shared object; recompile with -fPIC 
# /usr/bin/ld: /home/oleg/.opam/4.04.0/lib/ocaml/libasmrun.a(startup.o): relocation R_X86_64_32S against symbol `caml_data_segments' can not be used when making a shared object; recompile with -fPIC 
# /usr/bin/ld: final link failed: Nonrepresentable section on output 
# collect2: error: ld returned 1 exit status 
# File "caml_startup", line 1: 
# Error: Error during linking 
# make: *** [ocamlbuild.native] Error 2 

고맙습니다.

답변

1

4.04.0 인 현재 스위치를 다시 설치해보십시오. 출력으로 판단하십시오.

opam switch reinstall 4.04.0을 실행하면 ocamlopt.opt 바이너리를 다시 컴파일해야합니다.