Open benedictleejh opened 7 years ago
Thank you, I will investigate. From a first look, though, obuild doesn't link with compiler-libs, it adds the directory to -I, so the linker is confused by your Parser and the one already there. compiler-libs is a dependency of ppx_tools, that is a dependency of ppx_conv. So, I need to understand how ocamlfind (through ocamlbuild) deals with that.
As far as I understand from https://whitequark.org/blog/2014/04/16/a-guide-to-extension-points-in-ocaml/ and https://blogs.janestreet.com/extension-points-or-how-ocaml-is-becoming-more-like-lisp/, ppx is a pre-processing step in the compilation process. As such, once pre-processing is complete, the ppx libraries should no longer be needed.
However, obuild attempts to link in the ppx library and their dependencies into the final product. This should be unnecessary.
Edit: I've created a repo that shows the problem: https://github.com/benedictleejh/obuild-issue-161
If you compile using ocamlbuild (
ocamlbuild -use-ocamlfind calc.{byte|native}
) everything works out fine. But compiling with obuild causes it to throw the error:Which shows it attempting to link the compiler-libs into the final compilation product.