The rpm ocaml-find-requires.sh enforces a requirement for the exact ocaml version for each *.cma/cmo/cmi
file in a rpm package.
I wonder if there is a theoretical way to compile such files once and reuse them with different compilers. I think each one already requires a certain ABI, which can be seen with ocamlobjinfo
. If these hashes do not match, the binary object will most likely be rejected by the toolchain. Are there additional checks in the compiler, or additional data in binaries, that would prevent such sharing?