Open Kakadu opened 2 months ago
I have a demo https://github.com/Kakadu/dune-sites-demo/tree/llvm where my plugin depends on LLVM and I want to load this plugin. It gives me an error undefined symbol: llvm_create_context.
undefined symbol: llvm_create_context
I created an ocamlfind demo (in the repo, works) and it looks like it passes more cmxa command line arguments. I tried to do the same by manually
(cd _build/default && /media/work2/.opam/llvm16/bin/ocamlopt.opt -g -linkall -shared -linkall -I plugin -o plugin/plugin1_impl.cmxs plugin/plugin1_impl.cmxa -I /media/work2/.opam/llvm16/lib/llvm /media/work2/.opam/llvm16/lib/llvm/shared/llvm.cmxa -verbose )
and after that it starts to give another error Dynlink.Uninitialized_global "Llvm". Any advice how to fix this? Do we need patching dune?
Dynlink.Uninitialized_global "Llvm"
https://github.com/Kakadu/dune-sites-demo/tree/llvm
dune 3.16
I discovered that the main app should explicitly depend on LLVM. https://github.com/ocaml/dune/blob/3.16.0/otherlibs/dune-site/test/plugin_require_thread.t/run.t Don't know why it is required...
Expected Behavior
I have a demo https://github.com/Kakadu/dune-sites-demo/tree/llvm where my plugin depends on LLVM and I want to load this plugin. It gives me an error
undefined symbol: llvm_create_context
.I created an ocamlfind demo (in the repo, works) and it looks like it passes more cmxa command line arguments. I tried to do the same by manually
and after that it starts to give another error
Dynlink.Uninitialized_global "Llvm"
. Any advice how to fix this? Do we need patching dune?Reproduction
https://github.com/Kakadu/dune-sites-demo/tree/llvm
Specifications
dune 3.16