Mac に切り替えたところ、この問題はなくなりましたが、同様の問題があります。OCaml llvm "Unbound module ExecutionEngine"
これを機能させようとしています: https://github.com/llvm-mirror/llvm/tree/master/examples/OCaml-Kaleidoscope/Chapter7
このチュートリアルから http://llvm.org/docs/tutorial/OCamlLangImpl7.html
(この2つは同一人物によるものであると99%確信しています)
いくつかの問題を回避した後、最後の数時間のつまずきに達しました
me@mypc:~/Desktop/llvm-master/examples/OCaml-Kaleidoscope/Chapter7$ ocamlbuild -use-ocamlfind toy.byte -package llvm llvm_executionengine
Finished, 0 targets (0 cached) in 00:00:00.
File "_tags", line 4, characters 41-53:
Warning: the tag "use_bindings" is not used in any flag declaration, so it will have no effect; it may be a typo. Otherwise use `mark_tag_used` in your myocamlbuild.ml to disable this warning.
+ ocamlfind ocamlc -c -package llvm -o toplevel.cmo toplevel.ml
File "toplevel.ml", line 6, characters 5-24:
Error: Unbound module LlvmExecutionEngine
Command exited with code 2.
Compilation unsuccessful after building 13 targets (12 cached) in 00:00:00.
llvm_executionengine が適切なパッケージであると確信しています。他の何かを試してみると、それがどのパッケージであるかがわからないと言われます。
エラー行のあるコードの上位数行を次に示します。
(*===----------------------------------------------------------------------===
* Top-Level parsing and JIT Driver
*===----------------------------------------------------------------------===*)
open Llvm
open Llvm_executionengine
(* top ::= definition | external | expression | ';' *)
let rec main_loop the_fpm the_execution_engine stream =
match Stream.peek stream with
| None -> ()
どんな助けでも素晴らしいでしょう!
tobiasBora の回答の最初の部分を試したところ、次の結果が得られました。
$ ocamlbuild -use-ocamlfind test.byte -package llvm
Finished, 0 targets (0 cached) in 00:00:00.
File "_tags", line 4, characters 41-53:
Warning: the tag "use_bindings" is not used in any flag declaration, so it will have no effect; it may be a typo. Otherwise use `mark_tag_used` in your myocamlbuild.ml to disable this warning.
Solver failed:
Ocamlbuild cannot find or build test.ml. A file with such a name would usually be a source file. I suspect you have given a wrong target name to Ocamlbuild.
Compilation unsuccessful after building 0 targets (0 cached) in 00:00:00.