- changed title to Option DEF_OPT breaks some camlp4-based builds
-
assigned issue to
Option DEF_OPT breaks some camlp4-based builds
The DEF_OPT patch that swaps out camlp4o.opt
with camlp4o
breaks a lot of OCaml builds, since camlp4 dynamically loads in syntax extension modules that are different in bytecode (.cma) and native code (.cmxs).
It would be safer to remove camlp4 from the MODOPT substitution list, or remove the entire option. Most build systems will look for the .opt
version of the compiler these days anyway (such as OASIS).
I've had at least one user report a failure that turned out to be due to DEF_OPT; https://github.com/ocaml/opam/issues/1044
Comments (5)
-
repo owner -
repo owner - changed status to open
-
reporter Thanks Michael! (and great work on the port -- I'm currently in the throes of separating out the bytecode and native code compilers on the OpenBSD package, which is no fun :-)
-
repo owner The build system used to produce the OCaml compiler suite is not very pleasant to work with, to say the least! It would be great to us, maintainers, if someone could improve it!
Have fun — despite the throes!
-
repo owner - changed status to resolved
Remove OPT_DEF option
The choice of using the optimised compiler should be left to the build system used by each individual OCaml project and not be enforced by the package installation.
Closes
#9→ <<cset ca5b1bb2e0d4>>
- Log in to comment
Hi Anil,
Thank you for your report!
I inherited the
DEF_OPT
option as I overtooklang/ocaml
and I second you thinking that the choice of the compiler to use should be made by the build system, not by the package installation!There should not be any hard regression for the user forced to switch back from
opt
-compilers to the standard ones, so I will phase out the option and add a notice toUPDATING
.I also opened a PR on FreeBSD's Gnats to track this issue.
Reference: ports/189176