Description
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:
File "_none_", line 1:
Error: Files dist/build/calc/Parser.cmx
and ~/.opam/4.02.3/lib/ocaml/compiler-libs/ocamlcommon.cmxa
both define a module named Parser
Which shows it attempting to link the compiler-libs into the final compilation product.
Activity